IF Question

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
 
P

Pete_UK

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
 
C

Chip Pearson

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)
 
S

Shane Devenshire

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"
 

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