Nested IF - return a blank when compared cells are blank

  • Thread starter Struggling in Sheffield
  • Start date
S

Struggling in Sheffield

Hi,
I have a simple nested IF function that compares numbers in two cells then
returns a word depending on whether the number in one cell is greater than,
equal to, or less than the number in the other cell:

=IF(F4>G4,"Yes",IF(F4=G4,"Equal",IF(F4<G4,"No")))

Either (or both) of the compared cells might contain the number 0 (zero),
which is fine, I still want the IF function to compare and return the
appropriate word.

However, the compared cells sometimes have no data in them at all (are
blank), in which case I need the IF function to also remain blank.
Unfortunately the unsophisticated IF function I'm using still compares these
blank cells to give me the word "Equal".

How can I get the IF function to remain blank if the cells being compared
are blank?

Cheers,
Steve Sharpe.
 
P

Pecoflyer

As this is a duplicate ( due to problems with MS newsreaders) I'll clos
the pos

--
Pecoflye

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

*Adding your XL version* to your post helps finding solution faste
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top