word list multiplier

RyanROI

New Member
Joined
Sep 13, 2011
Messages
1
I need to make an excel spreadsheet to replicate a word or phrase in a cell by a given number. ie
================================================
sheet 1: INPUT

column 1 Column 2
word frequency

table 5
chair 2
kitchen setting 3

================================================
sheet 2: OUTPUT

column 1

table
table
table
table
table
chair
chair
kitchen setting
kitchen setting
kitchen setting

================================================
I was talking to a mate and he said I will need to develop a macro to do this. However the frequency is essentially a counter. So you could just say for counter = 1 to frequency; cell below = cell.
could this be done?
Please help! I have no excel programming skills so am not sure where to start or the approach I should take. Thanks :)
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
If you have
Table 5
Chair 2
Kitchen 3

in A1:B3

You could put =A1 in E1.
E2 would get the formula
=IF(COUNTIF(E$1:E1, E1) < SUMIF($A:$A, E1, $B:$B), E1, INDEX($A:$A,MATCH(E1,$A:$A,0)+1,1))

drag that formula down.
 
Upvote 0
Or a macro

Code:
Sub multiplier()
Dim LR As Long, i As Long
With Sheets("Sheet1")
    LR = .Range("A" & Rows.Count).End(xlUp).Row
    For i = 1 To LR
        Sheets("Sheet2").Range("A" & Rows.Count).End(xlUp).Offset(1).Resize(.Range("B" & i).Value).Value = .Range("A" & i).Value
    Next i
End With
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,710
Members
452,939
Latest member
WCrawford

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