awsumchillicrab
Board Regular
- Joined
- Jan 30, 2011
- Messages
- 56
The replace function doesn't seem to work in this format:
Range("F2:F" & LastRow).Replace("#N/A", "")
But works in this:
Range("F2:F" & LastRow).Replace what:="#N/A", replacement:=""
where LastRow is already declared and found.
I was reading the intellisense and help, and don't understand why the first format isn't allowed, since only the first 2 arguments are required.
The error is that an = is expected.
If I use the below code, the bolded part gets highlighted with error "assignment to constant not allowed"
Range("F2:F" & LastRow).Replace("#N/A", "") = TRUE
What's up with this?
Range("F2:F" & LastRow).Replace("#N/A", "")
But works in this:
Range("F2:F" & LastRow).Replace what:="#N/A", replacement:=""
where LastRow is already declared and found.
I was reading the intellisense and help, and don't understand why the first format isn't allowed, since only the first 2 arguments are required.
The error is that an = is expected.
If I use the below code, the bolded part gets highlighted with error "assignment to constant not allowed"
Range("F2:F" & LastRow).Replace("#N/A", "") = TRUE
What's up with this?