How to collate onto one line VBA? Lookup?

DaveR

Board Regular
Joined
May 10, 2006
Messages
176
We have a webform that generates an excel file. Sadly the webform appears to be particularly stupid and is generating a new line of every piece of new data. What I want to do is have the data on one line.

For example;

Code:
AF174665	2011-07-27 13:51:19.763000+0100	Fostering					
AF174665	2011-07-27 13:51:19.763000+0100		ISP CENTRE				
AF174665	2011-07-27 13:51:19.763000+0100			Wendy Fields			
AF174665	2011-07-27 13:51:19.763000+0100				Referrals Manager		
AF174665	2011-07-27 13:51:19.763000+0100					April - June	
AF174665	2011-07-27 13:51:19.763000+0100						275

The first column is the unique ID code (although to be fair the second column has the same data).

Which is the best way to do this? There are 23,000 odd lines of data so I suspect VBA would be quickest?
 
After an hour, the routine completed. However, it doesn't appear to have done it correctly.

Using the second macro (meant to be faster - took just under an hour on the work computer!) it seems to have done what is requested but the data in the rows D-KM don't appear to have been copied at all (i.e. there is no data in these columns?

Using the first macro, this is also bereft of any data in the other columns?

Not sure why the information isn't being retained?
 
Upvote 0

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)

Forum statistics

Threads
1,224,522
Messages
6,179,292
Members
452,902
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top