Segue anexo.
Código:
Sub Preencher()
Dim wss As Worksheet
Set wss = Sheets("Planilha1")
Range("A2:A100").ClearContents
cont = 0
i = 2
lin = 2
Do While wss.Cells(i, 1) <> ""
cont = wss.Cells(i, 1)
ref = wss.Cells(i, 2)
Do While cont > 0
Cells(lin, 1) = ref
cont = cont - 1
lin = lin + 1
Loop
i = i + 1
Loop
End Sub
Existem mil maneiras de preparar Neston. Invente a sua!
http://www.youtube.com/ExpressoExcel
Postado : 12/10/2016 8:31 am