View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default if function and ifblank() function

=IF(AND(ISNUMBER(A1),B1=""),""100%"),IF(AND(A1="", B1=""),"---",IF(AND(ISNUMB
ER(A1),isNUMBER(B1)),A1-B1,"")))

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"BJ" wrote in message
...
Hi List,

Here is what I am looking for:

Column A Column B Column C
Row 1 1000 Blank(hasF) 100%
Row 2 Blank(hasF) Blank(hasF) ---
Row 3 100 10 (100-10)/100%


if Column A has number, Column B is blank, Column C shows 100%; if both
blank shows '---'; if both have numbers, do the calculation (ColA -
ColB)/ColC.

i tried to use isblank() function to see whether the cell is blank, since
there is formula, the isBlank function didn't work. I tried to use trim(),
len() = 0, all didn't work. can some help?

Thank you.