#NAME? Error on a multicondition formula

raysha22

New Member
Joined
Nov 28, 2017
Messages
16
I have the following formula and it is giving me the #NAME? error. Can anyone identify what is wrong with my formula or help me write a better one?

=IF(C37=””,””,(IF(AND(C38>1,C3="Standard",(WEEKDAY(C38+2)=1)),(WORKDAY((C38+2),2,Holidays!B2:F40)),IF(AND(C38>1,C3="Standard",(WEEKDAY(C38+2)=2)),(WORKDAY((C38+2),1,Holidays!B2:F40)),IF(AND(C38>1,C3="Standard",(WEEKDAY(C38+2)=3)),(WORKDAY((C38+2),2,Holidays!B2:F40)),IF(AND(C38>1,C3="Standard",(WEEKDAY(C38+2)=4)),(WORKDAY((C38+2),1,Holidays!B2:F40)),IF(AND(C38>1,C3="Standard",(WEEKDAY(C38+2)=5)),(WORKDAY((C38+2),5,Holidays!B2:F40)),IF(AND(C38>1,C3="Standard",(WEEKDAY(C38+2)=6)),(WORKDAY((C38+2),4,Holidays!B2:F40)),IF(AND(C38=””,C3="Standard",(WEEKDAY(C37+2)=1)),(WORKDAY((C37+2),2,Holidays!B2:F40)),IF(AND(C38=””,C3="Standard",(WEEKDAY(C37+2)=2)),(WORKDAY((C37+2),1,Holidays!B2:F40)),IF(AND(C38=””,C3="Standard",(WEEKDAY(C37+2)=3)),(WORKDAY((C37+2),2,Holidays!B2:F40)),IF(AND(C38=””,C3="Standard",(WEEKDAY(C37+2)=4)),(WORKDAY((C37+2),1,Holidays!B2:F40)),IF(AND(C38=””,C3="Standard",(WEEKDAY(C37+2)=5)),(WORKDAY((C37+2),5,Holidays!B2:F40)),IF(AND(C38=””,C3="Standard",(WEEKDAY(C37+2)=6)),(WORKDAY((C37+2),4,Holidays!B2:F40))))))))))))))))

Thanks in advance!
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
What is your formula trying to achieve
 
Upvote 0
What is your formula trying to achieve

I have multiple conditions I need in order to determine what date to put in a cell.
1. C3 needs to ="Standard"
2. It needs to identify what day of the week it is to determine how many days to add to get the final day (my final date has to be the next Tues or Thurs that falls at least two days after the original date C38)
3. The date cannot fall on certain determined Holidays on another chart.

Example:
C3 = Standard
C38 = 2/28/18
C40 (Cell I'm populating with formula) = 3/6/18 (2/28/18 +2 days and then the following Tuesday or Thursday)

Does that help?
 
Upvote 0
You need to have the Analysis ToolPak Add-In installed to use the WORKDAY function, otherwise you will get the #NAME error.
Do you have that installed?
 
Upvote 0
You need to have the Analysis ToolPak Add-In installed to use the WORKDAY function, otherwise you will get the #NAME error.
Do you have that installed?
It works everywhere else in my spreadsheet. With this one formula it doesn't though.
 
Upvote 0
I feel sure I did something like this few years ago for delivery dates with a shorter formula but can I find the workbook when I need it, sure it can be done without that many IF’s
 
Upvote 0
Are you double-quotes really slanted like shown in your formula like this ””
I don't think Excel like that. It wants them to be straight up and down like this ""
Try replacing all instances of your slanted ones with straight ones and see if that solves the issue.
When I tried it on your formula, that error went away for me.
 
Upvote 0
Are you double-quotes really slanted like shown in your formula like this ””
I don't think Excel like that. It wants them to be straight up and down like this ""
Try replacing all instances of your slanted ones with straight ones and see if that solves the issue.
When I tried it on your formula, that error went away for me.
You are brilliant! That fixed it. I can't believe it was that simple. I typed the formula in word at first because it's easier for me to see, so it gave me the normal quote marks.
Thank you!!
 
Upvote 0
You are welcome!

Yes, it is one of those irritating things that one would never think of that has tripped most of us up somewhere along the way...
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,180
Members
453,021
Latest member
Justyna P

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