Problem with an IF Formula

miquele506

New Member
Joined
Mar 10, 2016
Messages
13
I’m trying use and IF formula with networkdays and I want it to stop when a process is filled cancelled or on hold, for some reason it is telling there is a missing parenthesis.

At this point i don’t know what to do:

Any advice will be well received

=IF(T20="Cancelled";NETWORKDAYS(U20;Z20); NETWORKDAYS(U20;B6) IF(T20="Filled";NETWORKDAYS(U20;Z20);NETWORKDAYS(U20;B6)) IF(T20="On Hold";NETWORKDAYS(U20;Z20); NETWORKDAYS(U20;B6))




 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
You have 3 different formulas instead of 1.

Try:

Code:
=IF(T20="Cancelled";NETWORKDAYS(U20;Z20);IF(T20="Filled";NETWORKDAYS(U20;Z20);IF(T20="On Hold";NETWORKDAYS(U20;Z20);NETWORKDAYS(U20;B6))))
 
Upvote 0
Hi,

Your formula syntax is incorrect, and if I follow the logic of your formula, it can be shortened to:

=IF(OR(T20={"Cancelled","Filled","On Hold"}),NETWORKDAYS(U20,Z20),NETWORKDAYS(U20,B6))

Change the comma to semicolon ( , to ; ) for your region, or like this:

=IF(OR(T20={"Cancelled";"Filled";"On Hold"});NETWORKDAYS(U20;Z20);NETWORKDAYS(U20;B6))
 
Last edited:
Upvote 0
Hello guys, I am a noob using Excel, but with your help I finally fixed the problem. I really appreciate your help sending the shorten formulas.
 
Upvote 0
Hello jtakw, I really liked the way you made this formula shorter. I end up using this one. thank you so much.
 
Upvote 0
Hello jtakw, I really liked the way you made this formula shorter. I end up using this one. thank you so much.
Well, I thought it would be better to understand first to correct the syntax and next to improve the formula. ;)
 
Upvote 0

Forum statistics

Threads
1,215,368
Messages
6,124,521
Members
449,169
Latest member
mm424

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