Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 68
Default help with the macro or with the formula

Hi,

I have 250 lines in A column and I need to paste them 20 times each line,
could you please help out with the macros.

For Eg:
If I have in A1, number as 12, these 12 should be repeated 20 times in the B
column.

Let me know how this can be done.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default help with the macro or with the formula

=REPT(A1,20)
--
David Biddulph

"Igneshwara reddy" wrote in
message ...
Hi,

I have 250 lines in A column and I need to paste them 20 times each line,
could you please help out with the macros.

For Eg:
If I have in A1, number as 12, these 12 should be repeated 20 times in the
B
column.

Let me know how this can be done.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 68
Default help with the macro or with the formula

No, this is not my result.

If 50 is in cell A1, it should repeat 20 time in B column from B1:B20 and
accordingly for A2,A3,A4..................

My results should come as
A B
50 50
25 50
35 50
45 50
50
50
50
50
50
50
50
50
50
50
50
50
50
50
50
50
25
25
25
25
25
25
25
25
25
25
25
25
25
25
25
25
25
25
25
25


"David Biddulph" wrote:

=REPT(A1,20)
--
David Biddulph

"Igneshwara reddy" wrote in
message ...
Hi,

I have 250 lines in A column and I need to paste them 20 times each line,
could you please help out with the macros.

For Eg:
If I have in A1, number as 12, these 12 should be repeated 20 times in the
B
column.

Let me know how this can be done.




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 68
Default help with the macro or with the formula

Hi, your forumla was good but I have 150 lines in Column 'A; to use, I cannot
do it manually selecting each cell which leads to more time.

can I use A1:A150

let me know.


"Sandy Mann" wrote:

Try:

=CHOOSE(CEILING(ROW(),20)/20,$A$1,$A$2,$A$3,$A$4)

copy down as far as you need

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


with @tiscali.co.uk


"Igneshwara reddy" wrote in
message ...
No, this is not my result.

If 50 is in cell A1, it should repeat 20 time in B column from B1:B20 and
accordingly for A2,A3,A4..................

My results should come as
A B
50 50
25 50
35 50
45 50
50
50
50
50
50
50
50
50
50
50
50
50
50
50
50
50
25
25
25
25
25
25
25
25
25
25
25
25
25
25
25
25
25
25
25
25


"David Biddulph" wrote:

=REPT(A1,20)
--
David Biddulph

"Igneshwara reddy" wrote in
message ...
Hi,

I have 250 lines in A column and I need to paste them 20 times each
line,
could you please help out with the macros.

For Eg:
If I have in A1, number as 12, these 12 should be repeated 20 times in
the
B
column.

Let me know how this can be done.








  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,345
Default help with the macro or with the formula

I don't quite understand what it is that you are saying. If you mean you
now want to copy each entry 150 times then change the formula to:

=CHOOSE(CEILING(ROW(),150)/150,$A$1,$A$2,$A$3,$A$4)

If you mean that you want to copy cells in Column A down Column B 20 at a
time to row 150 then use:

=IF(ROW()150,"",CHOOSE(CEILING(ROW(),20)/20,$A$1,$A$2,$A$3,$A$4,$A$5,$A$6,$A$7,$A$8))

If you do not have data in all of A1:A8 then use:

=IF(OR(OFFSET($A$1,FLOOR(ROW(),20)/20,0)="",ROW()150),"",CHOOSE(CEILING(ROW(),20)/20,$A$1,$A$2,$A$3,$A$4,$A$5,$A$6,$A$7,$A$8))

If you mean something else, then post back..

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


with @tiscali.co.uk


"Igneshwara reddy" wrote in
message ...
Hi, your forumla was good but I have 150 lines in Column 'A; to use, I
cannot
do it manually selecting each cell which leads to more time.

can I use A1:A150

let me know.


"Sandy Mann" wrote:

Try:

=CHOOSE(CEILING(ROW(),20)/20,$A$1,$A$2,$A$3,$A$4)

copy down as far as you need

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


with @tiscali.co.uk


"Igneshwara reddy" wrote in
message ...
No, this is not my result.

If 50 is in cell A1, it should repeat 20 time in B column from B1:B20
and
accordingly for A2,A3,A4..................

My results should come as
A B
50 50
25 50
35 50
45 50
50
50
50
50
50
50
50
50
50
50
50
50
50
50
50
50
25
25
25
25
25
25
25
25
25
25
25
25
25
25
25
25
25
25
25
25


"David Biddulph" wrote:

=REPT(A1,20)
--
David Biddulph

"Igneshwara reddy" wrote
in
message ...
Hi,

I have 250 lines in A column and I need to paste them 20 times each
line,
could you please help out with the macros.

For Eg:
If I have in A1, number as 12, these 12 should be repeated 20 times
in
the
B
column.

Let me know how this can be done.









  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default help with the macro or with the formula

=OFFSET($A$1,INT((ROW()-1)/20),0)
--
David Biddulph

"Igneshwara reddy" wrote in
message ...
No, this is not my result.

If 50 is in cell A1, it should repeat 20 time in B column from B1:B20 and
accordingly for A2,A3,A4..................

My results should come as
A B
50 50
25 50
35 50
45 50
50
50
50
50
50
50
50
50
50
50
50
50
50
50
50
50
25
25
25
25
25
25
25
25
25
25
25
25
25
25
25
25
25
25
25
25


"David Biddulph" wrote:

=REPT(A1,20)
--
David Biddulph

"Igneshwara reddy" wrote in
message ...
Hi,

I have 250 lines in A column and I need to paste them 20 times each
line,
could you please help out with the macros.

For Eg:
If I have in A1, number as 12, these 12 should be repeated 20 times in
the
B
column.

Let me know how this can be done.






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
Formula Macro Secret Squirrel Excel Discussion (Misc queries) 7 January 27th 07 04:16 PM
Macro Formula for Max value Gary''s Student Excel Worksheet Functions 0 November 30th 06 05:20 PM
formula to a macro help PLEASE Hemming Excel Discussion (Misc queries) 2 March 9th 06 03:16 PM
Macro and Formula strung Excel Worksheet Functions 3 September 6th 05 02:43 PM
Macro - formula for end of last row JN Excel Worksheet Functions 1 June 1st 05 11:47 AM


All times are GMT +1. The time now is 06:15 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"