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

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
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,215,151
Messages
6,123,316
Members
449,094
Latest member
Chestertim

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