how to multiple the rows by a given number

  • Thread starter Thread starter xianwinwin
  • Start date Start date
X

xianwinwin

Hi guys,

I wonder if anyone can assist me on this one: say I have the word Appl
on cell A1 and the number 60 on cell A2, question is how can I have th
word apple multiply 60 times between A1 to A60?

Is there such possibility? (Without dragging the cursor to A60)

[I have 500 addresses and I need to multiply each by either 60 or 50)

Thanks for any hel
 
Well the only way I know to do this is through a loop in VBA. If the word you
wanted repeated was in cell A1 and the number of times you wanted it repeated
was in cell B1, then the following code when ran would paste the word in cell
A1 down the number of times of cell B1.

Sub mutliplerows()
X = Cells(1, 2).Value
i = 2
Do Until i = X + 1
Cells(i, 1).Value = Cells(1, 1).Value
i = i + 1
Loop
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top