Require Columns data in different sheet

harinsh

Active Member
Joined
Feb 7, 2012
Messages
273
Hi Team

Looking for some help here.....I have Rawdata in sheet2 and column headers info in sheet1 (as mentioned below) ....in required columns data I need it in Sheet3 ....I need help in automating this process via vba....

I need formula to get the columns headers names in sheet1 based on Rawdata sheet...this is because to validate the which column to take (my requirement on column selection may change every time) so, I will update the require column data so, that those column data only need in sheet 3

it should copy entire column and maintain same order as per require column headers....in case require column not exist but still I given in the list that should only create the header and column should be leave blank....


[TABLE="width: 247"]
<colgroup><col><col></colgroup><tbody>[TR]
[TD]Raw Data Column Names[/TD]
[TD]Require Columns[/TD]
[/TR]
[TR]
[TD]Names[/TD]
[TD]Names[/TD]
[/TR]
[TR]
[TD]Gender[/TD]
[TD]Gender[/TD]
[/TR]
[TR]
[TD]City[/TD]
[TD]City[/TD]
[/TR]
[TR]
[TD]Address[/TD]
[TD]Exp3[/TD]
[/TR]
[TR]
[TD]Phone[/TD]
[TD]Income1[/TD]
[/TR]
[TR]
[TD]Mobile[/TD]
[TD]Mobile[/TD]
[/TR]
[TR]
[TD]State[/TD]
[TD]State[/TD]
[/TR]
[TR]
[TD]Assets[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Pin Code[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Exp1 [/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Exp2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Exp3[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Income1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Income2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Income3[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]etc.,[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

Please help me on this requirement....thank you,
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.

Forum statistics

Threads
1,223,243
Messages
6,170,971
Members
452,371
Latest member
Frana

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