Macro to Copy / Paste data from one sheet to a new sheet

maggiej0531

New Member
Joined
Apr 24, 2015
Messages
1
Hi all --

I have a csv file with data from the Twitter API. Each row has an uneven number of data points so the two data points I am interested in -- the tweet, labeled "text" -- and the coordinate --labeled "coordinates:"-- do not fall into straight columns. I would like to line up the columns so that I can sort by coordinates (collecting all similar geographies).

I tried recording a macro to do this by searching for "text," copying into a new sheet, then searching for "coordinates" and copying into the new sheet. I'm stuck now, though, because I don't know how to loop this macro to search in the next line, paste in the new line of the next sheet, then do the same task to the end of the sheet. An added complication is that after the initial coordinate data point, there can sometimes be additional coordinate data points later in any given row. Any help would be very helpful!!!

Thanks in advance.
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
have you thought about using filters to identify all of the items that meet your criteria, then copying and pasting without looping.
You can search vba autofilters to copy and paste which will show you how.
 
Upvote 0

Forum statistics

Threads
1,214,968
Messages
6,122,506
Members
449,089
Latest member
RandomExceller01

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