I've been using this one:
... for adding "n/a" to blank cells in UsedRange.
But now I'm getting into trouble 'cause of earlier use of this ws/sheet. When running code, the code applies "n/a" to cells in rows below UsedRange. This is rows that had data in them the last time I used this sheet/code.
So I tried to put his line above my code:
But it ends in error: Run-time error '424': Object required.
Any ideas on how to fix this?
Code:
For Each c In ActiveSheet.UsedRange
If c.Value = "" Then c.Value = "n/a"
Next
But now I'm getting into trouble 'cause of earlier use of this ws/sheet. When running code, the code applies "n/a" to cells in rows below UsedRange. This is rows that had data in them the last time I used this sheet/code.
So I tried to put his line above my code:
Code:
Worksheet.UsedRangeIncludesFormatting = False
Any ideas on how to fix this?