View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.newusers
Pecoflyer[_132_] Pecoflyer[_132_] is offline
external usenet poster
 
Posts: 1
Default Nested IF that will ignore blank (empty) cells


Struggling in Sheffield;221336 Wrote:
Hi,
I have a simple nested IF function (Excel 2003) which compares numbers
in
two cells, then returns a word depending on whether one number is
greater
than, equal to, or less than the other:

=IF(F3G3,"Yes",IF(F3=G3,"Equal",IF(F3<G3,"No")))

Either (or both) of the compared cells might contain the number 0
(zero) in
which case I want the IF function to display the appropriate word.

However if the compared cells are blank (have no data in them), my
unsophisticated IF function thinks that F3=G3 and returns the word
"Equal".

How can I get the IF function to remain blank when my compared cells
(F3 &
G3) are blank?

Cheers,
Steve Sharpe.


Try=if(and(g3="",f3=""),"",IF(F3G3,"Yes",IF(F3=G3 ,"Equal",IF(F3<G3,"No")))


--
Pecoflyer

Cheers -
*'Membership is free' (http://www.thecodecage.com)* & allows file
upload -faster and better answers

*Adding your XL version* to your post helps finding solution faster
------------------------------------------------------------------------
Pecoflyer's Profile: http://www.thecodecage.com/forumz/member.php?userid=14
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=61004