IF/AND formula
I need to calculate the number of Network Days based on a Leave Status but if a half day has been checked, it needs to just put 0.5. The formula I am currently using is:
=IF(AND([Half Day]@row = 1) [Leave Type]@row = "TOIL", "0.5", NETWORKDAYS([Start Date]@row, [End Date]@row))
But I'm getting a #Unparsable error.
What am I doing wrong?
TIA
Cheryl
Best Answers
-
The AND piece is just a little off.
=IF(AND([Half Day]@row = 1, [Leave Type]@row = "TOIL"), "0.5", NETWORKDAYS([Start Date]@row, [End Date]@row))
-
Hi Cheryl,
Looks like you need some commas and one more parenthesis to initiate the IF AND
Give this a shot and see if it works for you:
=IF(AND([Half Day]@row = 1, [Leave Type]@row = "TOIL"), 0.5, NETWORKDAYS([Start Date]@row, [End Date]@row))
https://www.linkedin.com/in/zchrispalmer/
Answers
-
The AND piece is just a little off.
=IF(AND([Half Day]@row = 1, [Leave Type]@row = "TOIL"), "0.5", NETWORKDAYS([Start Date]@row, [End Date]@row))
-
Hi Cheryl,
Looks like you need some commas and one more parenthesis to initiate the IF AND
Give this a shot and see if it works for you:
=IF(AND([Half Day]@row = 1, [Leave Type]@row = "TOIL"), 0.5, NETWORKDAYS([Start Date]@row, [End Date]@row))
https://www.linkedin.com/in/zchrispalmer/
-
Perfect, thanks @Mr. Chris @Paul Newcome
Worked perfectly. Knew it would have to be something simple.
Cheryl
-
Excellent. Glad this worked for you.
https://www.linkedin.com/in/zchrispalmer/
-
Happy to help. 👍️
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.7K Get Help
- 433 Global Discussions
- 136 Industry Talk
- 468 Announcements
- 4.9K Ideas & Feature Requests
- 143 Brandfolder
- 147 Just for fun
- 64 Community Job Board
- 466 Show & Tell
- 32 Member Spotlight
- 2 SmartStories
- 298 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!