View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Otto Moehrbach Otto Moehrbach is offline
external usenet poster
 
Posts: 1,090
Default Macro for copying and pasting values based on criteria

Leigh
What you want is pretty easy to do but more information is needed from
you.
You say "I would like a macro to copy and paste the values of the columns as
I move into a different period."
What do you mean by "move into a different period"? Exactly what do you
want to do to make this macro run? Click on some cell? In a specific
column? Maybe click on the header cell of a specific column? Do you want
the macro to run each and every time you click on the same cell, or do you
want the macro to check if some criteria exists, or doesn't exist, and run
or not run depending on the criteria? Or maybe all this depends on the
month changing?
You say "as I enter P3 YTD.....". Exactly what does "enter" mean in this
context?
Please post back with this information and you'll get plenty of help. HTH
Otto
"Leigh Douglass" wrote in message
...
Hi

I need to write/record a macro to copy and paste special values of certain
columns depending on the column heading.

I have a table of data with headings P1 YTD, P2 YTD, etc up to 12. Some
columns are vlookups from other sheets. I would like a macro to copy and
paste the values of the columns as I move into a different period. So as
I
enter P3 YTD, i would like my macro to copy P2 YTD columns and paste the
values and so next month it would need to do the sam,e with P3 YTD.

Any help gratefully received.

Leigh Douglass