excel - automated solution for manual copy-paste-transpose? -
i have excel spreadsheet has data pulled different data source.
the problem have data 'repeated':
(site column , owner column b):
site owner http://website1.com john doe http://website1.com jane doe http://website2.com john smith http://website2.com jane smith http://website2.com john doe
what change this:
site owner1 owner 2 owner 3 http://website1.com john doe jane doe http://website2.com john smith jane smith john doe
i have copying "owners" each site, , pasting them using "transpose" method in order accomplish this. problem is, there lot of records , boring , wasteful work.
is there way accomplish automatically via macro, script, or otherwise?
thanks!
to make bad pivot table suggestion above...
sub tester() dim data, rngtl range, num dim long, f range dim site, owner data = selection.value 'select raw data before running 'where pivoted data goes: edit suit... set rngtl = thisworkbook.sheets("sheet1").range("a1") num = 0 = 1 ubound(data, 1) site = trim(data(i, 1)) owner = trim(data(i, 2)) set f = rngtl.resize(num + 1, 1).find(site, , xlvalues, xlwhole) if f nothing num = num + 1 rngtl.offset(num, 0).value = site rngtl.offset(num, 1).value = owner else f.end(xltoright).offset(0, 1).value = owner end if next end sub
Comments
Post a Comment