Find and paste

EdwardBalani

New Member
Joined
Oct 2, 2014
Messages
19
Hi Guys appreciate your help with this.
I have an excel file, this will serve as my template
in sheet 1 of my template is where I will paste my data
here are the data for sheet1
COL A COL B COL C
FEED ID AMOUNT IB FLAG
feedid1 amount1 flag1
feedid2 amount2 flag2
feedid3 amount3 flag3
I will then need to paste this to sheet 2 based from the column name, ex. FEED ID in sheet 1 which is in COL A to FEED ID in sheet2 to in COL B
in sheet 2
COL A COL B COL C
FLAG FEED ID SUM
flag1 feedid1 amount1
flag2 feedid2 amount2
flag3 feedid3 amount3
and that the data I paste to sheet 1 is not always the same sequence, sometimes the column name FEED ID is in COL C, sometimes in COL D and so on.
and it is not only three columns that I paste to sheet 2, I got 30 more columns.
yeah, this is a killing task.
im thingking lets say, in sheet 3 that will be like this:
in sheet 3

COL A
COLUMN NAMES IN SHEET 1
FEED ID
IB FLAG
AMOUNTS


COL B
COLUMN NAMES IN SHEET 2
FEED ID
FLAG
SUM
the code will run like this
it will find the first column name FEED ID in sheet 1 then copy all the data in that column then will paste it to sheet 2 under column FEED ID
then it will go back to sheet 3 to get column name IB FLAG then get data data in IB FLAG in sheet 1 to paste it to column name FLAG in sheet 2 then same goes for AMOUNTS etc..
is this possible? Hehe. I hope it is.
so that I will list in sheet 3 the column names in sheet 1 with the corresponding column names to paste it to sheet 2
then paste the data in sheet 1 and then click the macro and I got data paste in sheet 2
hope this is clear and possible.
thank you in advance!
 
Last edited:

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

Forum statistics

Threads
1,215,064
Messages
6,122,941
Members
449,094
Latest member
teemeren

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