Copy cells to another column with VBA

  • Thread starter Thread starter Joe E via OfficeKB.com
  • Start date Start date
J

Joe E via OfficeKB.com

I need to write a line of code in a VBA macro for Excel that says "copy the contents of the current cell to column H in this same row." I am trying to do this as I traverse through a range of cells R (which represents a column). I have tried to use R.copy(destination), but I don't know what to use for the destination parameter to accomplish my goal. The task is simple but i'm new to Excel macro programming. Can anyone help?
 
Joe

If the column is say A, you could use

r.Copy Destination:=r.Offset(0,7)

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top