#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 100
Default Range selection

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.
  #2   Report Post  
Posted to microsoft.public.excel.misc
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.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 100
Default Range selection

Thanks for immediate response. Can we do it without macros meaning with
formulas in the range.

"Gary''s Student" wrote:

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.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Range selection

In A3 enter:

=IF(ROWS($A$1:A1)-1<$A$2,$A$1,"") and copy down

This is not a "true" copy, but it does the job
--
Gary''s Student - gsnu200749


"Naveen" wrote:

Thanks for immediate response. Can we do it without macros meaning with
formulas in the range.

"Gary''s Student" wrote:

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.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Narrow Range based on Selection in Another Range David Excel Discussion (Misc queries) 3 July 1st 07 05:12 PM
Identifying a selection of a selection of a range swimfast Excel Worksheet Functions 1 March 1st 07 02:51 AM
Range selection rule? dk_ Excel Discussion (Misc queries) 11 December 7th 06 10:00 AM
Range Selection cfspahn24 Excel Discussion (Misc queries) 3 April 14th 06 01:29 PM
Selection Range ch Excel Discussion (Misc queries) 5 July 15th 05 05:50 AM


All times are GMT +1. The time now is 07:16 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"