Excel Formula or Macro

Is there a Formula or Macro that will do the following.

Look at A1 and B1 and put the values in another spreadsheet the amount of times that it says in C1!

For example if 1234 is in A1 and 5678 is in B1 and 34 is in C1 I want that put in a seperate sheet 34 times and so on with the values in A2 and B2 and C2 etc etc...

I hope it makes sense!!

  VoG II 19:43 27 Jan 09

Try this - change the sheet names to suit; I used Sheet1 as the source and Sheet2 as the destination

Sub Daz()
Dim LR As Long, i As Long, j As Long
j = 1
With Sheets("Sheet1")
LR = .Range("A" & Rows.Count).End(xlUp).Row
For i = 1 To LR
Sheets("Sheet2").Range("A" & j & ":A" & j + .Range("C" & i).Value - 1) = .Range("A" & i).Value
Sheets("Sheet2").Range("B" & j & ":B" & j + .Range("C" & i).Value - 1) = .Range("B" & i).Value
j = j + .Range("C" & i).Value
Next i
End With
End Sub

I have to say that was superb! Thanks very much.

This thread is now locked and can not be replied to.

The Legend of Zelda Breath of the Wild review: Five hours with Zelda on the Nintendo Switch

1995-2015: How technology has changed the world in 20 years

How the painting-like animated sequences in A Monster Calls were created by Glassworks Barcelona

The 22 best Safari extensions | Best Safari plugins: Improve Apple's Safari web browser with these…