Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA reset cell value if greater then 0
Hi,
I have this macro to reset cells in C21-C31 to 0. However, how do I amend this macro that it will only re-set the cells to 0 if it the cell contains a value greater then 0 as I do not wish for the macro to add a 0 to cells that are empty with no cell values in them at all. Sub ResetAll() Dim myRng As Range Set myRng = Sheets("Sheet1").Range("C21:C31") myRng.Value = "0" End Sub Is it possible to do this? Thanks! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
reset a cell | Excel Programming | |||
Set cell to record date when adjacent cell is filled AND NOT RESET | Excel Worksheet Functions | |||
how do you reset your arrow keys to move cell to cell? | New Users to Excel | |||
Addition to Turn cell red if today is greater or equal to date in cell | New Users to Excel | |||
Turn cell red if today is greater or equal to date in cell | New Users to Excel |