View Single Post
  #1   Report Post  
DKehl
 
Posts: n/a
Default visual basic in excel -

Hi - I would like to Copy/Paste an area dependant on how many rows there are
on a spreadsheet. I was thinking of using something like the below:

X = COUNT("D:D")

Range("A1:A" & X).Select
Selection.Copy
Range("D1:D" & X).Select
ActiveSheet.Paste
Range("E4:E" & X).Select

Setting X as the COUNT of Column D, then adding '&' X to the Range to set
the length of the Copy/Paste.
I haven't gotten it to work. Any advice?

Thanks!