August 25, 2017
I have the following macro. I would like to add to the start row and end row. Start row 49, end row 62. Start row 81, end row 94. Keep start 15 row and end row 26
How do I go about adding it to the following so that I have only one macro? Thanks
Sub resetAll ()
strtRow =15
endRow = 26
Call DeleteAllShapes
For r= strtRow To endRow
If Le (Cells(r, 32).Value) = 0 Then
Range ("AO" & r & ":AT" & endRow) .Interior.Color = 0
Range ("AO" & r & ":AT" & endRow) .Font.ColorIndex =0
endRow = r - 1
Exit For
End If
Next
Range ("AF" & strtRow & ":AT" & endRow) .Interior.Color = x1None
Range ("AF" & strtRow & ":AT" & endRow) .Font.ColorIndex = 1
End Sub
October 5, 2010
Hi,
I'm not really clear on what you want to do.
Is it that you want to run the macro on the sets of rows as described i.e.:
15->26
49->62
81->94
Can you please supply your workbook with data and all the code. Giving you an answer without seeing these might mean not giving you an optimal solution. If we can see the data and understand what you are trying to do, we might be able to figure out a better solution.
Regards
Phil
1 Guest(s)