Justplainj
New Member
- Joined
- Apr 15, 2021
- Messages
- 47
- Office Version
- 365
- Platform
- Windows
Hi All,
I have the following code to find blank cells in a specific range (Column A and Row 1 will never have blank cells but the rest might)
After finding blanks it must replace it with a zero.
However if it does not find blank cells it must continue with the rest of the VBA code I have.
How do I allow the code to continue if no blanks are found?
Note: This is a small part of several sheets that is checked with the same VBA code, before the sheets are copied and pasted into one sheet.
Thanks in advance.
J
I have the following code to find blank cells in a specific range (Column A and Row 1 will never have blank cells but the rest might)
After finding blanks it must replace it with a zero.
However if it does not find blank cells it must continue with the rest of the VBA code I have.
VBA Code:
Sheets("Active Dev").Select
Range("A1").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.SpecialCells(xlCellTypeBlanks).Select
Selection.FormulaR1C1 = "0"
How do I allow the code to continue if no blanks are found?
Note: This is a small part of several sheets that is checked with the same VBA code, before the sheets are copied and pasted into one sheet.
Thanks in advance.
J