ISBLANK or what?

  • Thread starter Thread starter xpnovice
  • Start date Start date
X

xpnovice

Hi,

In creating items such as invoices with pre-set formula and functions blank
cells often cause a #Value error.
To overcome this I use a basic IF statement such as =IF(B9="","",E20*E28)
or I may use the ISBLANK function such as =IF(ISBLANK(B9),"",E20*E28)). As
far as I can see, both are effective and work okay, although the 2nd option
(with ISBLANK) is a more compact formula. My question is simply, is there a
"correct" one between these 2 options, or will both work in all
circumstances. (As I said they work for me, at the moment with the formulas
I currently work on, but would one be better than the other for say more
complicated formulae that may arise in the future.)

Thanks
 
If B9 contains a formula that under conditions returns an empty string, like
=IF(A9>10,A9,"")
then B9="" returns TRUE, while ISBLANK(B9) returns FALSE. So which to choose
depends on what you want done.

HTH. Best wishes Harald
Excel MVP
Followup to newsgroup only please
 
Cells may "contain" empty blanks [i.e., there is nothing in the cell] or
string blanks [e.g., "", ',Left("A",0)]. ISBLANK returns TRUE only for
empty blanks; ="" returns true for either empty blanks or string blanks.
COUNTBLANK(rng) will return the number of empty blanks and string blanks
combined, as will COUNTIF(rng,""); COUNTIF(rng,"=" will return the
number of empty blanks.

Alan Beban
 
Back
Top