S
stimpy
Hi all,
I'm trying to test whether both cellls in a pair are empty, I written
a macro and a function to do the same thing both use Counta and both
return different answers:
Macro (cell2 and cell3 are values taken from cells A5 and A6)
if WorksheetFunction.CountA(cell2, cell3) = 0 Then
answer= "Blank"
Else
answer= "not blank"
End if
returns :"not blank"
The Function
if(Counta(a5,a6)=0,"Blank","not blank")
returns :"blank"
The function is returning correctly. I have tried changing the
"transition navigation keys" setting but nothing changed. The VB
debugger says cell2 and cell3 are both Empty going into the test, why
is the macro returning wrong?
I am using Excel 97 and cannot work this out.
Any help would be appreciate
Thanks
Paul
I'm trying to test whether both cellls in a pair are empty, I written
a macro and a function to do the same thing both use Counta and both
return different answers:
Macro (cell2 and cell3 are values taken from cells A5 and A6)
if WorksheetFunction.CountA(cell2, cell3) = 0 Then
answer= "Blank"
Else
answer= "not blank"
End if
returns :"not blank"
The Function
if(Counta(a5,a6)=0,"Blank","not blank")
returns :"blank"
The function is returning correctly. I have tried changing the
"transition navigation keys" setting but nothing changed. The VB
debugger says cell2 and cell3 are both Empty going into the test, why
is the macro returning wrong?
I am using Excel 97 and cannot work this out.
Any help would be appreciate
Thanks
Paul