mhdi
asked on
Excel VBA - If cell is 0 then clear contents of range...
Hi,
I have a table on "Sheet2" within the range "B5:BH73".
I need a macro loop to iterate over each column.
It needs to check if row 10 = 0 then clear contents of cells 5 to 73 of that column.
I have the following so far:
How do I refer to cell 10 inside the For Loop so I can check its contents?
thanks
I have a table on "Sheet2" within the range "B5:BH73".
I need a macro loop to iterate over each column.
It needs to check if row 10 = 0 then clear contents of cells 5 to 73 of that column.
I have the following so far:
For Each rng In Sheet("Sheet2").Range("B5:BH73").Columns
'If cell 10 = 0 Then clear Cells 5 to 73
Next rng
How do I refer to cell 10 inside the For Loop so I can check its contents?
thanks
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
@teylyn your code seemed to always delete the contents on the first sheet of the workbook.