If Then HELP!!!
Dim r As Range
For Each r In ActiveSheet.UsedRange
If r.Interior.ColorIndex = 6 Then Cell.ange(Selection, Selection(30 -
Selection.Value)).EntireRow.Insert
Next
I'm not getting this right, and am unsure where to make a fix.
I want this code to select every cell that is yellow Insert rows based on
the value in the cell up to 30. So if there is a 16 it will insert 14 rows,
15 inserts 15 rows etc etc..... So what am I doing wrong with this code??
THANKS!!!!!
|