Simple VB Script - Part 2
Thanks Bob!
That works perfect!
Graeme
-----Original Message-----
Graeme,
Try This
For i = 25 to Cells(Rows.Count,"A").End(xlUp).Row
If Range("A" & i).Value <"" Then
Range("A" & i & ":I" & i).InsertIndent Range
("A" & i).Value
End If
Next i
--
HTH
Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
"Graeme" wrote in
message
...
Ok, I figured our how to do my indenting per line,
Range("A23:I23").Select
Selection.InsertIndent (ActiveCell.Value)
Range("A24:I24").Select
Selection.InsertIndent (ActiveCell.Value)
Range("A25:I25").Select
Selection.InsertIndent (ActiveCell.Value)
Range("A26:I26").Select
Selection.InsertIndent (ActiveCell.Value)
Is there a way to simplify the code to check row 1 for
a
value, if there is a value then perform the indent.
Move
to the next line and perform the operation until it
comes
to a blank row, then it stops?
Sorry for the newbie questions,
Thanks,
Graeme
.
|