Ver Mensaje Individual
  #11 (permalink)  
Antiguo 20/09/2008, 15:42
STDSTC
 
Fecha de Ingreso: octubre-2007
Mensajes: 22
Antigüedad: 16 años, 6 meses
Puntos: 0
Respuesta: Excel: Pegar datos con bucle

Muchas gracias Cacho por tu ayuda. Ya lo conseguí. Lo pongo aquí por si algún principiante como yo quiere verlo.

Código:
Public Sub Genera_11_Numeros()
  Application.Calculate
  Do While Sheets("Generador").Cells(17, 13) <> 100
  For i = 0 To 99
With Sheets("Generador")
  For ii = 0 To 6 Step 3
    .[A1].Offset(0, ii).CurrentRegion.Sort Key1:=.[B1].Offset(0, ii)
  Next ii
End With
  If Sheets("Generador").Cells(15, 13) = "BIEN" And Sheets("Generador").Cells(13, 13) > 6000000 Then
Range("L1:L11").Copy
Sheets("Resultados").Cells(1, i + 1).PasteSpecial Paste:=xlPasteValues
  End If
Next i
Loop
Call Apilar
End Sub
Un saludo.