A simple formula...

Mel Smith

Well-known Member
Joined
Dec 13, 2005
Messages
1,023
Office Version
  1. 365
Platform
  1. Windows
I am trying to write a simple formula but I just can't get my head around it. What I am trying to achieve is: =If (I27>I26), "Plus", If (I27<I26), "Minus", If (I27=I26),"Level"

Could someone point me in the right direction, please?
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
=IF(I27>I26,"Plus",IF(I27<I26,"Minus",IF(I27=I26,"Level")))
 
Upvote 0
Hi MelSmith,

Your close parentheses is closing the IF statement early so either
=IF(I27>I26,"Plus",IF(I27<I26,"Minus",IF(I27=I26,"Level")))
or
=IF((I27>I26),"Plus",IF((I27<I26),"Minus",IF((I27=I26),"Level")))
...will work
 
Upvote 0
Thanks, Toadstool.
The formulas work just as I want but is there any way that the references (I27 and I26) can ignore decimal places and only work on the whole number? i.e. 376 and not 376.4 etc?

Mel
 
Upvote 0
Hi Toadstool,

I've figured it out =(int....)

Mel
 
Upvote 0
=IF(ROUND(I27,0)>ROUND(I26,0),"Plus",IF(ROUND(I27,0)<ROUND(I26,0),"Minus",IF(ROUND(I27,0)=ROUND(I26,0),"Level")))
 
Upvote 0
Many thanks Hrayani. I've decided to use =Int(..) in helper cells.

mel
 
Upvote 0
For reference you don't need the last IF so it could be written like
=IF(INT(I27)>INT(I26),"Plus",IF(INT(I27)<INT(I26),"Minus","Level"))

or
=CHOOSE(SIGN(INT(I27)-INT(I26))+2,"Minus","Level","Plus")
 
Upvote 0

Forum statistics

Threads
1,215,054
Messages
6,122,901
Members
449,097
Latest member
dbomb1414

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top