C
Charlotte E.
I have a list of 100 items, which is identifyed by a formula in
Range("A" & Row).
If I decide to delete all rows where the formula in Range("A") gives an
empty string, like this:
For Counter = 100 To 2 Step -1
If Range("A" & Counter).Value = "" Then Rows(Counter).Delete
Next
Everything works fine... ...but...
....if I instead decide to clear the formulas, like this:
For Counter = 100 To 2 Step -1
If Range("A" & Counter).Value = "" Then Range("A" &
Counter).ClearContents
Next
Each and every cell gets cleared, even if the formula produces a value!!!
WHY?!?
What's the difference?!?
Why is the formulas result recognized as a value in one instance, and
not in the other???
Can someone explain?
CE
Range("A" & Row).
If I decide to delete all rows where the formula in Range("A") gives an
empty string, like this:
For Counter = 100 To 2 Step -1
If Range("A" & Counter).Value = "" Then Rows(Counter).Delete
Next
Everything works fine... ...but...
....if I instead decide to clear the formulas, like this:
For Counter = 100 To 2 Step -1
If Range("A" & Counter).Value = "" Then Range("A" &
Counter).ClearContents
Next
Each and every cell gets cleared, even if the formula produces a value!!!
WHY?!?
What's the difference?!?
Why is the formulas result recognized as a value in one instance, and
not in the other???
Can someone explain?
CE