variable - insert blank row/select range
Sub find123()
Dim y As Integer
For y = 1 To 3
[u1].Select
Do Until ActiveCell.Value = y
ActiveCell.Offset(1, 0).Select
Loop
ActiveCell.EntireRow.Select
Selection.Insert
x = ActiveCell.Row
Range("A" & x & ":" & "R" & x).Select
With Selection.Interior
.ColorIndex = 15
.Pattern = xlSolid
End With
If y 1 Then ActiveWindow.SelectedSheets.HPageBreaks.Add
Befo=ActiveCell
If y = 1 Then Range("B" & x) = "Mike"
If y = 2 Then Range("B" & x) = "MAM"
If y = 3 Then Range("B" & x) = "To Printer"
Next y
[A1].Select
End Sub
somethinglikeant
|