Merge Data From Multiple Columns - Sharepoint Survery Results - VBA

jfs2j

New Member
Joined
Mar 10, 2016
Messages
2
Hello,

I am using SharePoint to collect data through its survey feature. However, I want to make the output data more manageable. As such, I want to take the multiple columns and consolidate them into a few.

Currently, it looks like this:

Name 1 Address 1 Age 1 Name 2 Address 2 Age 2 Name 3 Address 3 Age 3
John My Home 50 Mary Your Home 40 James Our Home 70


I want it to look like this:

Name Address Age
John My Home 50
Mary Your Home 40
James Our Home 70


The survey is continuously updates, so, ideally a macro/vba that extract the data from one sheet and produces it this way would be better.

Also, a word of caution is that sometimes the cells in either column may be empty. So I want to make sure the formula just doesn't stop because it sees a blank cell, but rather copy from top to bottom from one column to the other.

Last but not least, there is other data in the cells, with other steps I would probably add to the macro, but this is the bulk of the steps I couldn't figure.

Thanks in advance for your help !
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Forgot to add a uniform date entry

So, Currently, it looks like this:

[TABLE="width: 500"]
<tbody>[TR]
[TD]Name 1[/TD]
[TD]Address 1[/TD]
[TD]Age 1[/TD]
[TD]Name 2[/TD]
[TD]Address 2[/TD]
[TD]Age 2[/TD]
[TD]Name 3[/TD]
[TD]Address 3[/TD]
[TD]Age 3[/TD]
[TD]Date[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]My Home[/TD]
[TD]50[/TD]
[TD]Mary[/TD]
[TD]Your Home[/TD]
[TD]40[/TD]
[TD]James[/TD]
[TD]Our Home[/TD]
[TD]70[/TD]
[TD]01/31/1991[/TD]
[/TR]
</tbody>[/TABLE]



and, I want it to look like this:


[TABLE="width: 500"]
<tbody>[TR]
[TD]Name[/TD]
[TD]Address[/TD]
[TD]Age[/TD]
[TD]Date[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]My Home[/TD]
[TD]50[/TD]
[TD]01/31/1991[/TD]
[/TR]
[TR]
[TD]Mary[/TD]
[TD]Your Home[/TD]
[TD]40[/TD]
[TD]01/31/1991[/TD]
[/TR]
[TR]
[TD]James[/TD]
[TD]Our Home[/TD]
[TD]70[/TD]
[TD]01/31/1991[/TD]
[/TR]
</tbody>[/TABLE]



Thank you !
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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