Copy/paste values on the specific column

Solved/Closed
tinissane - 6 Mar 2010 à 22:57
rizvisa1 Posts 4478 Registration date Thursday 28 January 2010 Status Contributor Last seen 5 May 2022 - 7 Mar 2010 à 03:54
Hello,
I want to, copy/paste values on the specific column based on cell A2. i.e.
if cell A2= 1 then copy/paste values for the January column (range B2:B10), if
A2 = 2 then copy/paste values for column February range C2:C10, the report will
change every month. i.e. the range will change accordingly to the value on cell A2. if value on
A2 = 1 then B2:B10 , if A2 = 2 then the range is C2:C10.

I will really appreciate your thoughts.

1 response

rizvisa1 Posts 4478 Registration date Thursday 28 January 2010 Status Contributor Last seen 5 May 2022 766
7 Mar 2010 à 03:54
you can define your paste range as

Range(cells(2, (range("A2").value + 1)), cells(10, (range("A2").value + 1)))