PC Review


Reply
Thread Tools Rate Thread

Copy + paste macro

 
 
Leigh Douglass
Guest
Posts: n/a
 
      28th Jan 2008
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 With Quote
 
 
 
 
Otto Moehrbach
Guest
Posts: n/a
 
      28th Jan 2008
Leigh
I answered this in your previous post. Otto
"Leigh Douglass" <(E-Mail Removed)> wrote in message
news:42B857F2-D3A6-4F2A-846E-(E-Mail Removed)...
> 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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to copy and paste values (columns)I have a macro file built C02C04 Microsoft Excel Programming 2 2nd May 2008 01:51 PM
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 Steven Microsoft Excel Programming 1 17th Oct 2005 08:56 AM
Copy and Paste macro needs to paste to a changing cell reference =?Utf-8?B?bG91bG91?= Microsoft Excel Programming 0 24th Feb 2005 10:29 AM
how to count/sum by function/macro to get the number of record to do copy/paste in macro tango Microsoft Excel Programming 1 15th Oct 2004 01:16 PM
Macro to Copy/Paste then Paste to Next Line tomkarakowski Microsoft Excel Programming 1 28th May 2004 01:19 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:39 AM.