Copy column to column designated by cell value

  • Hello,


    I do not have Internet access for the next few days so I am asking this question from my phone. I am a Vba beginner so I hope I am able to adequately explain what I am trying to do here. Any help will be greatly appreciated, failing on my own here.


    Basically what I need to do is this, a bit simplified but enough to get the point across I hope:


    Cell A1 contains a cell coordinate that is entered by the user. Suppose the value of A1 is K1. I need the Vba code to copy C2:C100 to K2:K100. I know this is probably very easy. Thanks in advance for any help.

  • Re: Copy column to column designated by cell value


    you can try this


    Code
    Sub copypaste()
    Sheet1.Range("C2:C100").Copy Destination:=Sheet1.Range(Sheet1.Range("A1").Value)
    End Sub
  • Re: Copy column to column designated by cell value


    Thank you, that works great. I actually need it to paste 1 cell lower but I can figure out the offset I think.


    Thanks again for the help on this

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!