Crazyivan76
New Member
- Joined
- May 15, 2014
- Messages
- 2
Greetings all.
I'm a bit of a neophyte when it comes to coding in VB for Excel. I've seen other posts (re: Multiple entries in one cell, split to multiple rows?) but have a dilemma that is similar. I suspect that it will use a form of the macro posted in this thread
http://www.mrexcel.com/forum/excel-...ple-entries-one-cell-split-multiple-rows.html
I dont want to basically transpose multiple columns cells into a single row into multiple row cells in a single column. I've 500 row entries that will then explode at an alarming rate.
I am currently using Excel 2013
I have a row with multiple columns. The row start off and is fixed to a point because its customer data
Market MemberID LASTNAME FIRSTNAME DOB GENDER ADDRESS CITY STATE ZIP PHONE COUNTY
The last column in the row(s) is PRODUCT. Here I have my dilemma . Product can have multiple cells in the row and each row for each customer can be of an indeterminate size. The PRODUCT colum
Short Example
CUSTOMER INFO ROWS ---- PRODUCT
Row1 John's info blahblahblah Cats Dogs Birds Pigs Cars (each entry after product is a seperate column/cell)
Row2 Jane's info blahblahblah Tickets Barn Shotgun
[TABLE="width: 1251"]
<tbody>[TR]
[TD]Market[/TD]
[TD]MEMBER ID[/TD]
[TD]LAST NAME[/TD]
[TD]FIRST NAME[/TD]
[TD]DOB[/TD]
[TD]GENDER[/TD]
[TD]ADDRESS 1[/TD]
[TD]ADDRESS 2[/TD]
[TD]CITY[/TD]
[TD]STATE[/TD]
[TD]ZIP[/TD]
[TD]PHONE[/TD]
[TD]COUNTY[/TD]
[TD]PRODUCT[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]North[/TD]
[TD="align: right"]1234[/TD]
[TD]John[/TD]
[TD]Doe[/TD]
[TD="align: right"]1/1/1970[/TD]
[TD]M[/TD]
[TD="colspan: 2"]123 nowhere[/TD]
[TD]dallas[/TD]
[TD]texas[/TD]
[TD="align: right"]21312[/TD]
[TD="align: right"]12313[/TD]
[TD="align: right"]12132[/TD]
[TD]Apples and candy[/TD]
[TD]orange[/TD]
[TD]cars and squirrels[/TD]
[TD]baseballs[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]South[/TD]
[TD="align: right"]3214[/TD]
[TD]Jane[/TD]
[TD]Smith[/TD]
[TD="align: right"]2/5/1971[/TD]
[TD]f[/TD]
[TD="colspan: 2"]321 somewhere[/TD]
[TD]San antonio[/TD]
[TD]texas[/TD]
[TD="align: right"]31215[/TD]
[TD="align: right"]12333[/TD]
[TD="align: right"]12333[/TD]
[TD] Cats[/TD]
[TD]dogs[/TD]
[TD]pigs[/TD]
[TD]horses[/TD]
[TD]birds[/TD]
[TD]hammers[/TD]
[/TR]
</tbody>[/TABLE]
I would like to turn this into something like this
[TABLE="width: 931"]
<tbody>[TR]
[TD="colspan: 3"]WHAT I'D LIKE IT TO BECOME[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]North[/TD]
[TD="align: right"]1234[/TD]
[TD]John[/TD]
[TD]Doe[/TD]
[TD="align: right"]1/1/1970[/TD]
[TD]M[/TD]
[TD="colspan: 2"]123 nowhere[/TD]
[TD]dallas[/TD]
[TD]texas[/TD]
[TD="align: right"]21312[/TD]
[TD="align: right"]12313[/TD]
[TD="align: right"]12132[/TD]
[TD] Apples and candy[/TD]
[/TR]
[TR]
[TD]North[/TD]
[TD="align: right"]1234[/TD]
[TD]John[/TD]
[TD]Doe[/TD]
[TD="align: right"]1/1/1970[/TD]
[TD]M[/TD]
[TD="colspan: 2"]123 nowhere[/TD]
[TD]dallas[/TD]
[TD]texas[/TD]
[TD="align: right"]21312[/TD]
[TD="align: right"]12313[/TD]
[TD="align: right"]12132[/TD]
[TD] orange[/TD]
[/TR]
[TR]
[TD]North[/TD]
[TD="align: right"]1234[/TD]
[TD]John[/TD]
[TD]Doe[/TD]
[TD="align: right"]1/1/1970[/TD]
[TD]M[/TD]
[TD="colspan: 2"]123 nowhere[/TD]
[TD]dallas[/TD]
[TD]texas[/TD]
[TD="align: right"]21312[/TD]
[TD="align: right"]12313[/TD]
[TD="align: right"]12132[/TD]
[TD]cars and squirrels[/TD]
[/TR]
[TR]
[TD]North[/TD]
[TD="align: right"]1234[/TD]
[TD]John[/TD]
[TD]Doe[/TD]
[TD="align: right"]1/1/1970[/TD]
[TD]M[/TD]
[TD="colspan: 2"]123 nowhere[/TD]
[TD]dallas[/TD]
[TD]texas[/TD]
[TD="align: right"]21312[/TD]
[TD="align: right"]12313[/TD]
[TD="align: right"]12132[/TD]
[TD]baseballs[/TD]
[/TR]
[TR]
[TD]South[/TD]
[TD="align: right"]3214[/TD]
[TD]Jane[/TD]
[TD]Smith[/TD]
[TD="align: right"]2/5/1971[/TD]
[TD]f[/TD]
[TD="colspan: 2"]321 somewhere[/TD]
[TD]San antonio[/TD]
[TD]texas[/TD]
[TD="align: right"]31215[/TD]
[TD="align: right"]12333[/TD]
[TD="align: right"]12333[/TD]
[TD] Cats[/TD]
[/TR]
[TR]
[TD]South[/TD]
[TD="align: right"]3214[/TD]
[TD]Jane[/TD]
[TD]Smith[/TD]
[TD="align: right"]2/5/1971[/TD]
[TD]f[/TD]
[TD="colspan: 2"]321 somewhere[/TD]
[TD]San antonio[/TD]
[TD]texas[/TD]
[TD="align: right"]31215[/TD]
[TD="align: right"]12333[/TD]
[TD="align: right"]12333[/TD]
[TD] dogs[/TD]
[/TR]
[TR]
[TD]South[/TD]
[TD="align: right"]3214[/TD]
[TD]Jane[/TD]
[TD]Smith[/TD]
[TD="align: right"]2/5/1971[/TD]
[TD]f[/TD]
[TD="colspan: 2"]321 somewhere[/TD]
[TD]San antonio[/TD]
[TD]texas[/TD]
[TD="align: right"]31215[/TD]
[TD="align: right"]12333[/TD]
[TD="align: right"]12333[/TD]
[TD] pigs[/TD]
[/TR]
[TR]
[TD]South[/TD]
[TD="align: right"]3214[/TD]
[TD]Jane[/TD]
[TD]Smith[/TD]
[TD="align: right"]2/5/1971[/TD]
[TD]f[/TD]
[TD="colspan: 2"]321 somewhere[/TD]
[TD]San antonio[/TD]
[TD]texas[/TD]
[TD="align: right"]31215[/TD]
[TD="align: right"]12333[/TD]
[TD="align: right"]12333[/TD]
[TD] horses[/TD]
[/TR]
[TR]
[TD]South[/TD]
[TD="align: right"]3214[/TD]
[TD]Jane[/TD]
[TD]Smith[/TD]
[TD="align: right"]2/5/1971[/TD]
[TD]f[/TD]
[TD="colspan: 2"]321 somewhere[/TD]
[TD]San antonio[/TD]
[TD]texas[/TD]
[TD="align: right"]31215[/TD]
[TD="align: right"]12333[/TD]
[TD="align: right"]12333[/TD]
[TD] birds[/TD]
[/TR]
[TR]
[TD]South[/TD]
[TD="align: right"]3214[/TD]
[TD]Jane[/TD]
[TD]Smith[/TD]
[TD="align: right"]2/5/1971[/TD]
[TD]f[/TD]
[TD="colspan: 2"]321 somewhere[/TD]
[TD]San antonio[/TD]
[TD]texas[/TD]
[TD="align: right"]31215[/TD]
[TD="align: right"]12333[/TD]
[TD="align: right"]12333[/TD]
[TD] hammers[/TD]
[/TR]
</tbody>[/TABLE]
As to how this can be achieved, I do not know. I'm half tempted to just slog through it (well, I am) and transpose the data by hand then autofill until I start the next entry, but I know there's got to be a better way to do this. Any assistance would be greatly appreciated.
I'm a bit of a neophyte when it comes to coding in VB for Excel. I've seen other posts (re: Multiple entries in one cell, split to multiple rows?) but have a dilemma that is similar. I suspect that it will use a form of the macro posted in this thread
http://www.mrexcel.com/forum/excel-...ple-entries-one-cell-split-multiple-rows.html
I dont want to basically transpose multiple columns cells into a single row into multiple row cells in a single column. I've 500 row entries that will then explode at an alarming rate.
I am currently using Excel 2013
I have a row with multiple columns. The row start off and is fixed to a point because its customer data
Market MemberID LASTNAME FIRSTNAME DOB GENDER ADDRESS CITY STATE ZIP PHONE COUNTY
The last column in the row(s) is PRODUCT. Here I have my dilemma . Product can have multiple cells in the row and each row for each customer can be of an indeterminate size. The PRODUCT colum
Short Example
CUSTOMER INFO ROWS ---- PRODUCT
Row1 John's info blahblahblah Cats Dogs Birds Pigs Cars (each entry after product is a seperate column/cell)
Row2 Jane's info blahblahblah Tickets Barn Shotgun
[TABLE="width: 1251"]
<tbody>[TR]
[TD]Market[/TD]
[TD]MEMBER ID[/TD]
[TD]LAST NAME[/TD]
[TD]FIRST NAME[/TD]
[TD]DOB[/TD]
[TD]GENDER[/TD]
[TD]ADDRESS 1[/TD]
[TD]ADDRESS 2[/TD]
[TD]CITY[/TD]
[TD]STATE[/TD]
[TD]ZIP[/TD]
[TD]PHONE[/TD]
[TD]COUNTY[/TD]
[TD]PRODUCT[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]North[/TD]
[TD="align: right"]1234[/TD]
[TD]John[/TD]
[TD]Doe[/TD]
[TD="align: right"]1/1/1970[/TD]
[TD]M[/TD]
[TD="colspan: 2"]123 nowhere[/TD]
[TD]dallas[/TD]
[TD]texas[/TD]
[TD="align: right"]21312[/TD]
[TD="align: right"]12313[/TD]
[TD="align: right"]12132[/TD]
[TD]Apples and candy[/TD]
[TD]orange[/TD]
[TD]cars and squirrels[/TD]
[TD]baseballs[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]South[/TD]
[TD="align: right"]3214[/TD]
[TD]Jane[/TD]
[TD]Smith[/TD]
[TD="align: right"]2/5/1971[/TD]
[TD]f[/TD]
[TD="colspan: 2"]321 somewhere[/TD]
[TD]San antonio[/TD]
[TD]texas[/TD]
[TD="align: right"]31215[/TD]
[TD="align: right"]12333[/TD]
[TD="align: right"]12333[/TD]
[TD] Cats[/TD]
[TD]dogs[/TD]
[TD]pigs[/TD]
[TD]horses[/TD]
[TD]birds[/TD]
[TD]hammers[/TD]
[/TR]
</tbody>[/TABLE]
I would like to turn this into something like this
[TABLE="width: 931"]
<tbody>[TR]
[TD="colspan: 3"]WHAT I'D LIKE IT TO BECOME[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]North[/TD]
[TD="align: right"]1234[/TD]
[TD]John[/TD]
[TD]Doe[/TD]
[TD="align: right"]1/1/1970[/TD]
[TD]M[/TD]
[TD="colspan: 2"]123 nowhere[/TD]
[TD]dallas[/TD]
[TD]texas[/TD]
[TD="align: right"]21312[/TD]
[TD="align: right"]12313[/TD]
[TD="align: right"]12132[/TD]
[TD] Apples and candy[/TD]
[/TR]
[TR]
[TD]North[/TD]
[TD="align: right"]1234[/TD]
[TD]John[/TD]
[TD]Doe[/TD]
[TD="align: right"]1/1/1970[/TD]
[TD]M[/TD]
[TD="colspan: 2"]123 nowhere[/TD]
[TD]dallas[/TD]
[TD]texas[/TD]
[TD="align: right"]21312[/TD]
[TD="align: right"]12313[/TD]
[TD="align: right"]12132[/TD]
[TD] orange[/TD]
[/TR]
[TR]
[TD]North[/TD]
[TD="align: right"]1234[/TD]
[TD]John[/TD]
[TD]Doe[/TD]
[TD="align: right"]1/1/1970[/TD]
[TD]M[/TD]
[TD="colspan: 2"]123 nowhere[/TD]
[TD]dallas[/TD]
[TD]texas[/TD]
[TD="align: right"]21312[/TD]
[TD="align: right"]12313[/TD]
[TD="align: right"]12132[/TD]
[TD]cars and squirrels[/TD]
[/TR]
[TR]
[TD]North[/TD]
[TD="align: right"]1234[/TD]
[TD]John[/TD]
[TD]Doe[/TD]
[TD="align: right"]1/1/1970[/TD]
[TD]M[/TD]
[TD="colspan: 2"]123 nowhere[/TD]
[TD]dallas[/TD]
[TD]texas[/TD]
[TD="align: right"]21312[/TD]
[TD="align: right"]12313[/TD]
[TD="align: right"]12132[/TD]
[TD]baseballs[/TD]
[/TR]
[TR]
[TD]South[/TD]
[TD="align: right"]3214[/TD]
[TD]Jane[/TD]
[TD]Smith[/TD]
[TD="align: right"]2/5/1971[/TD]
[TD]f[/TD]
[TD="colspan: 2"]321 somewhere[/TD]
[TD]San antonio[/TD]
[TD]texas[/TD]
[TD="align: right"]31215[/TD]
[TD="align: right"]12333[/TD]
[TD="align: right"]12333[/TD]
[TD] Cats[/TD]
[/TR]
[TR]
[TD]South[/TD]
[TD="align: right"]3214[/TD]
[TD]Jane[/TD]
[TD]Smith[/TD]
[TD="align: right"]2/5/1971[/TD]
[TD]f[/TD]
[TD="colspan: 2"]321 somewhere[/TD]
[TD]San antonio[/TD]
[TD]texas[/TD]
[TD="align: right"]31215[/TD]
[TD="align: right"]12333[/TD]
[TD="align: right"]12333[/TD]
[TD] dogs[/TD]
[/TR]
[TR]
[TD]South[/TD]
[TD="align: right"]3214[/TD]
[TD]Jane[/TD]
[TD]Smith[/TD]
[TD="align: right"]2/5/1971[/TD]
[TD]f[/TD]
[TD="colspan: 2"]321 somewhere[/TD]
[TD]San antonio[/TD]
[TD]texas[/TD]
[TD="align: right"]31215[/TD]
[TD="align: right"]12333[/TD]
[TD="align: right"]12333[/TD]
[TD] pigs[/TD]
[/TR]
[TR]
[TD]South[/TD]
[TD="align: right"]3214[/TD]
[TD]Jane[/TD]
[TD]Smith[/TD]
[TD="align: right"]2/5/1971[/TD]
[TD]f[/TD]
[TD="colspan: 2"]321 somewhere[/TD]
[TD]San antonio[/TD]
[TD]texas[/TD]
[TD="align: right"]31215[/TD]
[TD="align: right"]12333[/TD]
[TD="align: right"]12333[/TD]
[TD] horses[/TD]
[/TR]
[TR]
[TD]South[/TD]
[TD="align: right"]3214[/TD]
[TD]Jane[/TD]
[TD]Smith[/TD]
[TD="align: right"]2/5/1971[/TD]
[TD]f[/TD]
[TD="colspan: 2"]321 somewhere[/TD]
[TD]San antonio[/TD]
[TD]texas[/TD]
[TD="align: right"]31215[/TD]
[TD="align: right"]12333[/TD]
[TD="align: right"]12333[/TD]
[TD] birds[/TD]
[/TR]
[TR]
[TD]South[/TD]
[TD="align: right"]3214[/TD]
[TD]Jane[/TD]
[TD]Smith[/TD]
[TD="align: right"]2/5/1971[/TD]
[TD]f[/TD]
[TD="colspan: 2"]321 somewhere[/TD]
[TD]San antonio[/TD]
[TD]texas[/TD]
[TD="align: right"]31215[/TD]
[TD="align: right"]12333[/TD]
[TD="align: right"]12333[/TD]
[TD] hammers[/TD]
[/TR]
</tbody>[/TABLE]
As to how this can be achieved, I do not know. I'm half tempted to just slog through it (well, I am) and transpose the data by hand then autofill until I start the next entry, but I know there's got to be a better way to do this. Any assistance would be greatly appreciated.