Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35
Default Repeat text a number define of times

Hi,

I want to repeat diferent names a number of times in diferent cells, for
example:

names number
bad 3
medium 9
good 3


A1

bad
bad
bad
medium
medium
medium
medium
medium
medium
medium
medium
medium
good
good
good



My dificult is that when I change the number of names, I want that this
writes the text the new number of times automatically.

Any suggestions?

Thanks in advance,
Alexandra
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 751
Default Repeat text a number define of times

Say your table <names, number below is located in A1:B4 (A1="names",
A2="bad"). You will build an auxiliary column in C:C. In C2 enter the
number 1. In C3 formula to copy down:

=C2+B2

Now say you want to start the repeating values in F2. Use the
following formula in F2:

=IF(ROWS($F$2:F2)<=SUM($B$2:$B$4),INDEX($A$2:$A$4, MATCH(ROW()-ROW($F
$2)+1,$C$2:$C$4,1)),"")

You can copy down this formula and it will exhaust your table and
afterwords leave blank cells.

HTH
Kostis Vezerides

On Nov 18, 5:22*pm, Alexandra Lopes wrote:
Hi,

I want to repeat diferent names a number of times in diferent cells, for
example:

names * number
bad * * 3 * * *
medium *9
good * *3

A1

bad
bad
bad
medium
medium
medium
medium
medium
medium
medium
medium
medium
good
good
good

My dificult is that when I change the number of names, I want that this
writes the text the new number of times automatically.

Any suggestions?

Thanks in advance,
Alexandra


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35
Default Repeat text a number define of times

Hi,

I have copied the formula, but it returns an error:

"The formula you typed contains an error"

Can you help me, please?

Thanks,

Alexandra




vezerid wrote:
Say your table <names, number below is located in A1:B4 (A1="names",
A2="bad"). You will build an auxiliary column in C:C. In C2 enter the
number 1. In C3 formula to copy down:

=C2+B2

Now say you want to start the repeating values in F2. Use the
following formula in F2:

=IF(ROWS($F$2:F2)<=SUM($B$2:$B$4),INDEX($A$2:$A$4, MATCH(ROW()-ROW($F
$2)+1,$C$2:$C$4,1)),"")

You can copy down this formula and it will exhaust your table and
afterwords leave blank cells.

HTH
Kostis Vezerides

On Nov 18, 5:22 pm, Alexandra Lopes wrote:
Hi,

I want to repeat diferent names a number of times in diferent cells, for
example:

names number
bad 3
medium 9
good 3

A1

bad
bad
bad
medium
medium
medium
medium
medium
medium
medium
medium
medium
good
good
good

My dificult is that when I change the number of names, I want that this
writes the text the new number of times automatically.

Any suggestions?

Thanks in advance,
Alexandra


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 751
Default Repeat text a number define of times

Don;t copy the formula as it is, it depends on where exactly you have
the original table. The tricky parts in the formula are $A$2:A$A4, $B
$2:$B$4 and $C$2:$C$4. Of these, A2:B4 are supposed to contain {bad,
3; medium, 9; good, 3} and C2:C4 contain the 1 and the formula I
suggested for the auxiliary cells.

If your table is in other cells you must modify these parts
accordingly.

HTH
Kostis

On Nov 18, 6:50*pm, Alexandra Lopes wrote:
Hi,

I have copied the formula, but it returns an error:

"The formula you typed contains an error"

Can you help me, please?

Thanks,

Alexandra

vezeridwrote:
Say your table <names, number below is located in A1:B4 (A1="names",
A2="bad"). You will build an auxiliary column in C:C. In C2 enter the
number 1. In C3 formula to copy down:


=C2+B2


Now say you want to start the repeating values in F2. Use the
following formula in F2:


=IF(ROWS($F$2:F2)<=SUM($B$2:$B$4),INDEX($A$2:$A$4, MATCH(ROW()-ROW($F
$2)+1,$C$2:$C$4,1)),"")


You can copy down this formula and it will exhaust your table and
afterwords leave blank cells.


HTH
Kostis Vezerides


On Nov 18, 5:22 pm, Alexandra Lopes wrote:
Hi,


I want to repeat diferent names a number of times in diferent cells, for
example:


names * number
bad * * 3 * * *
medium *9
good * *3


A1


bad
bad
bad
medium
medium
medium
medium
medium
medium
medium
medium
medium
good
good
good


My dificult is that when I change the number of names, I want that this
writes the text the new number of times automatically.


Any suggestions?


Thanks in advance,
Alexandra


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35
Default Repeat text a number define of times

Hi,

I have copied the formula but it doesn't work..in F2 apears the formula
and not any result..I'm using Excel 2007..I don't know if it doesn't
matter..

Could you help me please?

Thanks,

Alexandra



vezerid wrote:
Say your table <names, number below is located in A1:B4 (A1="names",
A2="bad"). You will build an auxiliary column in C:C. In C2 enter the
number 1. In C3 formula to copy down:

=C2+B2

Now say you want to start the repeating values in F2. Use the
following formula in F2:

=IF(ROWS($F$2:F2)<=SUM($B$2:$B$4),INDEX($A$2:$A$4, MATCH(ROW()-ROW($F
$2)+1,$C$2:$C$4,1)),"")

You can copy down this formula and it will exhaust your table and
afterwords leave blank cells.

HTH
Kostis Vezerides

On Nov 18, 5:22 pm, Alexandra Lopes wrote:
Hi,

I want to repeat diferent names a number of times in diferent cells, for
example:

names number
bad 3
medium 9
good 3

A1

bad
bad
bad
medium
medium
medium
medium
medium
medium
medium
medium
medium
good
good
good

My dificult is that when I change the number of names, I want that this
writes the text the new number of times automatically.

Any suggestions?

Thanks in advance,
Alexandra




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 747
Default Repeat text a number define of times

suppose in cell A1 has word Bad and cell B1 has 3 in cell C1 put this
formula and drag it

=IF($A$1<"",IF(((ROW($A$1)-1)+$B$1)=ROW(B1),$A$1,""))



On Nov 18, 8:22*pm, Alexandra Lopes wrote:
Hi,

I want to repeat diferent names a number of times in diferent cells, for
example:

names * number
bad * * 3 * * *
medium *9
good * *3

A1

bad
bad
bad
medium
medium
medium
medium
medium
medium
medium
medium
medium
good
good
good

My dificult is that when I change the number of names, I want that this
writes the text the new number of times automatically.

Any suggestions?

Thanks in advance,
Alexandra


  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35
Default Repeat text a number define of times

Hi,

this results.

Thank you very much!


muddan madhu wrote:
suppose in cell A1 has word Bad and cell B1 has 3 in cell C1 put this
formula and drag it

=IF($A$1<"",IF(((ROW($A$1)-1)+$B$1)=ROW(B1),$A$1,""))



On Nov 18, 8:22 pm, Alexandra Lopes wrote:
Hi,

I want to repeat diferent names a number of times in diferent cells, for
example:

names number
bad 3
medium 9
good 3

A1

bad
bad
bad
medium
medium
medium
medium
medium
medium
medium
medium
medium
good
good
good

My dificult is that when I change the number of names, I want that this
writes the text the new number of times automatically.

Any suggestions?

Thanks in advance,
Alexandra


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
Why can the number of iterations repeat many times as a loop?? Jorge Luis Excel Discussion (Misc queries) 0 February 1st 08 04:15 PM
fined all same word in one text and sum number of repeat within d. atii Excel Worksheet Functions 0 September 27th 06 11:31 AM
how do I count the number of times text in column A matches text i Sheila Excel Worksheet Functions 2 November 16th 05 10:20 PM
Repeat statements "x" number of times... Frantic Excel-er Excel Discussion (Misc queries) 14 July 1st 05 04:19 PM
how do I get a calculation to repeat various number of times? weelittlekim Excel Worksheet Functions 1 October 27th 04 08:13 PM


All times are GMT +1. The time now is 12:25 PM.

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"