Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy + paste macro
Hi
I have a table of data with 12 column headings P1 YTD through to P12 YTD, these refer to the month in the year. For my current month, currently P9 YTD, the column has a vlookup to populate the data. I have a cell where I enter the current period, which is part of another formula. When i change that cell to P10 YTD, I would like a macro to copy the vlookup and paste the values for the column heading P9 YTD, and when i change the cell to P11 YTD, i would like the macro to copy and paste the P10 YTD heading, etc. I have all my vlookups in place for all periods, but once a period has ended the data never changes so i no longer need to keep the lookup. I am happy to have the macro assigned to a button, it doesnt have to happen automatically when the period cell is changed. I just need the macro to look for the period to ensure it copies the correct column. I am a macro novice so any help gratefully received. Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy + paste macro
Leigh
I answered this in your previous post. Otto "Leigh Douglass" wrote in message ... Hi I have a table of data with 12 column headings P1 YTD through to P12 YTD, these refer to the month in the year. For my current month, currently P9 YTD, the column has a vlookup to populate the data. I have a cell where I enter the current period, which is part of another formula. When i change that cell to P10 YTD, I would like a macro to copy the vlookup and paste the values for the column heading P9 YTD, and when i change the cell to P11 YTD, i would like the macro to copy and paste the P10 YTD heading, etc. I have all my vlookups in place for all periods, but once a period has ended the data never changes so i no longer need to keep the lookup. I am happy to have the macro assigned to a button, it doesnt have to happen automatically when the period cell is changed. I just need the macro to look for the period to ensure it copies the correct column. I am a macro novice so any help gratefully received. Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
HELP with macro for copy and paste | Excel Discussion (Misc queries) | |||
copy multiple worksheets of a workbook, and paste onto a Word document ( either create new doc file or paste onto an existing file.) I need this done by VBA, Excel Macro | Excel Programming | |||
Copy and Paste macro needs to paste to a changing cell reference | Excel Programming | |||
how to count/sum by function/macro to get the number of record to do copy/paste in macro | Excel Programming | |||
Macro to Copy/Paste then Paste to Next Line | Excel Programming |