View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
GS[_2_] GS[_2_] is offline
external usenet poster
 
Posts: 3,514
Default better way to copy cells

Rick Rothstein was thinking very hard :
Try this single line of code...

Range("G" &CStr(rowNumber).Resize(1, 3).Copy Range("G" &
CSTR(rowNumber + 1))


How about this much shorter one-liner....

Cells(rowNumber, "G").Resize(2, 3).FillDown

and, if you don't mind using column numbers instead of letters, this even
shorter one still...

Cells(rowNumber, 7).Resize(2, 3).FillDown

Rick Rothstein (MVP - Excel)


Still shining!<g

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc