Covert cellrange from one long range/column to multiple columns based on column value

ZEROSPIN

New Member
Joined
May 26, 2011
Messages
1
Hi

I need a little help, or a VBA script that can convert a quite big dataset (960000 rows) in the format like below.

Code:
TRIP_ID | OBJECTID  + (4 more columns )
2626    | value   
2626    | value        
64646   | value     
64646   | value     
13455   | value

All the data are in one column.

The number of rows vary for each trip_id, from a few to several tousands. The number og columb is the same, 6 in all.

I would like to convert the data into multiple columns, one column for each TRIP_ID, like this:

Code:
TRIP_ID |(+5  columns)  |  | TRIP_ID  | (+5  columns)|  | TRIP_ID | ..... | And so on for 1800 trip_id's
2626    | (+5  columns) |  | 64646    | (+5  columns) |  |  13455  | ..... |
2626    | (+5  columns) |  | 64646    | (+5  columns) |  |

And so on, I have around 1800 TRIP_ID's. I would like a few empty columbs between each trip_id range.

In short terms i would like to, Convert from one long column, to multiple columns based on TRIP_ID
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!

Forum statistics

Threads
1,224,521
Messages
6,179,291
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