IF Question

  • Thread starter Thread starter Anthony
  • Start date Start date
A

Anthony

I have two colums of numbers and and how do I create a function that will
tell me if the one cloum is one less than the other.

Ex: Par Refill Point
2 1 One Under
5 3 Not One Under

Thanks
 
Try this:

=IF(A2=B2,"",IF(A2-B2=1,"One Under",IF(A2>B2,"Not One Under","")))

This covers other eventualities that you did not specify, and will
return a blank cell in these cases.

Hope this helps.

Pete
 
Try

=IF(A1-B1=1,"one under","not one under")

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
 
Hi,

=ABS(B1-A1)&IF(B1<A1," Under"," Over")

but more likely:

=IF(B1<A1,A1-B1&" Under",IF(B1>A1,B1-A1&" Over",""))&" Par"
 
Back
Top