Help with formula that prints repeating text

locksmith55

New Member
Joined
Mar 6, 2022
Messages
22
Office Version
  1. 365
Platform
  1. Windows
Trying to make a dynamic formula in excel that can print repeating text like shown below where number of rows should be equal to number to the right of the text. I use MS365 Office.

Please try to keep solution not too complex.

Appreciate any help I can get!

Book1
ABCD
1How I want it to look
2Apples1Apples
3Pears2Pears
4Bananas0Pears
5Mangos3Mangos
6Mangos
7Mangos
Sheet1
Cell Formulas
RangeFormula
D2:D3,D5D2=A2
D4,D6D4=A3
D7D7=A5
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
A solution using a helper column F1:F5 (in gray)

Pasta1
ABCDEF
1How I want it to look0
2Apples1Apples1
3Pears2Pears3
4Bananas0Pears3
5Mangos3Mangos6
6Mangos
7Mangos
8 
Plan1
Cell Formulas
RangeFormula
F1:F5F1=SUM(B$1:B1)
D2:D8D2=IF(ROWS(D$2:D2)<=F$5,INDEX(A$2:A$5,MATCH(ROWS(D$2:D2)-1,F$1:F$5)),"")


Hope this helps

M.
 
Upvote 0
Solution

Forum statistics

Threads
1,214,932
Messages
6,122,323
Members
449,077
Latest member
jmsotelo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top