Formula showing FALSE

Hazeyt

New Member
Joined
Jan 23, 2023
Messages
29
Office Version
  1. 365
Please can someone tell me what I am doing wrong with my formula.

=IF([@[Absence Type]]="Sick Leave",IF([@[Total Days Lost]]>27,"Long",IF([@[Total Days Lost]]<=27,"Short","")))

I have the above formula in to show if the total days lost are Long Term or Short Term but for the Absence Type Sick Leave only

The formula is working but other Leave (example annual leave) is showing FALSE. I need this cell to be blank.

Thanks
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
How about
Excel Formula:
=IF([@[Absence Type]]="Sick Leave",IF([@[Total Days Lost]]>27,"Long",IF([@[Total Days Lost]]<=27,"Short","")),"")
 
Upvote 0
Solution
You have nested multiple IF statements, but did not include values for all the FALSE portions of your formulas.
When that happens, and one of them evaluates to a FALSE argument for which no value is specified for the FALSE argument, it will return FALSE.
See if this fixes it:
Rich (BB code):
=IF([@[Absence Type]]="Sick Leave",IF([@[Total Days Lost]]>27,"Long",IF([@[Total Days Lost]]<=27,"Short","")),"")
 
Upvote 0
You have nested multiple IF statements, but did not include values for all the FALSE portions of your formulas.
When that happens, and one of them evaluates to a FALSE argument for which no value is specified for the FALSE argument, it will return FALSE.
See if this fixes it:
Rich (BB code):
=IF([@[Absence Type]]="Sick Leave",IF([@[Total Days Lost]]>27,"Long",IF([@[Total Days Lost]]<=27,"Short","")),"")
It worked, thank you so much
 
Upvote 0
Glad we could help & thanks fr the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,952
Messages
6,175,594
Members
452,656
Latest member
earth

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