Thread: Range selection
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Range selection

Sub naveen()
Set r1 = Range("A1")
Set r2 = Range("A3:A" & 2 + Range("A2").Value)
r1.Copy r2
End Sub

--
Gary''s Student - gsnu200749


"Naveen" wrote:

I need help to write a formula for the following ;

Say I have some value in A1, and I want it to copy to number of cells, given
in A2, in the same row starting from A3.
A1="xxx", A2=2, A3,A4="xxx"
Thanks for immediate help.