# need help with 3 if statements

#### dalypen

##### New Member
=if(h15>o15,"over",if(h15<o15,"under",if(h15=o15,"np")))
in colunm n15-n29 is where the formula is ,i can display over and under but if h15 is equal to o15 it won't display "np" just a over and under.
Thanks for the help

Last edited by a moderator:

### Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN

#### Fluff

##### MrExcel MVP, Moderator
Your formula works for me.
Are you sure that H15 & O15 are exactly the same down to the last decimal place?
You can also simplify your formula like
=IF(H15>O15,"over",IF(H15< O15,"under","np"))

#### dalypen

##### New Member
Thanks fluff, it did work in a new worksheet, should of try that first, Ill check the decimals

#### Fluff

##### MrExcel MVP, Moderator
You're welcome & thanks for the feedback

#### dalypen

##### New Member
you are correct it was the decimals.

Threads
1,095,234
Messages
5,443,274
Members
405,222
Latest member
Summer01

### This Week's Hot Topics

• Copy entire row if CountA <>0 to another sheet
[B]I want to copy entire row if CountA <>0 for column J7:AM7 (headers on J6:AM6) and so on till the last used cell is column D and paste the...
• Select last used Row in Table
I have created a Table in a Worksheet which is locked to prevent user errors and protect formula. Some of the cells require freetext entries which...
• excel workbook: do not allow certain file name
Hello all, Don't think this has ever been asked before, but how do I restrict file save [Before_Save Event] if the name of the file being saved...
• fixing problem autofilter
hello i need help about my code when i search by code in textbox it doesn't show anything this is my data [ATTACH type="full"...
• “Weight”
Hi, i’ve got a long sheet filled with weights such as kg,g,L & ml. i can build a formula to convert kg into g and liter into ml. How ever, my...
• How to capitalize everything before a certain character?
In column A, I have some text: Hello good day.mp3 Hello good day.flac etc. I'd like to capitalize everything before the period. I don't need the...