PDA

View Full Version : Solved: Use reference table data to copy paste to worksheet



lokewolf
11-20-2008, 11:59 AM
I am trying to use the reference table on the attached file to goto Sheet "Main" and Find each Column header in the table list and copy each column and paste to the sheet and cell reference given on the right of the table. The column headers can change location from time to time without notice so I need to find them in Row 1 first and then copy the active column when the macro finds the header on sheet"Main". My objective is to be able to use this table for many different named worksheets within the workbook to go find the data and paste to the worksheets and cells I tell it to on the table.

Any Ideas?
Thanks!

stanleydgrom
11-20-2008, 08:15 PM
lokewolf,

Here you go.

See the attached workbook "Utilize a reference table to copy data - lokewolf - SDG.xls".

Run the "FindCopyPaste" macro.


Have a great day,
Stan

lokewolf
11-21-2008, 08:56 AM
stanleydgrom---That works pretty slick! :bow: Doesn't show up on the clipboard either. Did you put in hidden formulas in Col E, that are dependent on data in Col C and D? When I put in the sheet name and then the Cell reference...it populates in the cell in col E for the Goto/paste reference. (Seems like you selected the "Locked & Hidden" buttons on cell format protection..so I can't see the formula or overwrite them..am I right?):think:

ok...say I had multiple sheets I was copying from say..."Main,Tolerances, Market Moves, Sum, Compare"..etc, but I didn't want this macro to run through the whole table of sheets at once and copy/paste everything. Find/Copy/Paste one sheet at a time when I need the data copied and pasted. Would we need to have a column added/inserted for Col A and have it Numbered so we could direct VBA to the number instead of the sheet name?

Let me know if I'm not making sense, above...

I think I may need to have the flexibility to call this macro and tell it to find/copy/paste based on a number at certain points in my other macro code.