View Single Post
  #13   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default pasting data in different columns

I though you had the code for range R already writen. My code was meant to
follow the code you alrady had working. r would look something like this if
the data was in rowws A and B. Becuase you had an columnoffset in your code
0 & -1 the range r cannot include column A (A with column offset -1 would
give an error)

If data was in columns a & B
LastRow = Cells(Rows.Count, "A").End(xlUp).Row
Set r = Range(Cells(2, "B"), Cells(LastRow, "B"))



" wrote:

For Each r In MyRange

this line is failing