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 2009

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.

Elsewhere on IDG sites

OnePlus 5 review

Alice Saey's mesmerising animation for Dutch singer Mark Lotterman

iPad Pro 10.5in (2017) review

Comment faire une capture d’écran sur un Mac ?