Adding the word "Not Applicable" to an If, and then formula

searchingforhelp

Board Regular
Joined
Nov 11, 2020
Messages
67
Office Version
  1. 365
Platform
  1. Windows
Hello,

Seeking help in updating a formula in column E to include the word "not applicable" when it applies to scenarios that are in row 3 and 6. The rest of the formula would need to work as is, to identify the "Within Policy" “Out of Policy” for the original assigned.

Example 4-27-2021.xlsx
ABCDEF
1Date Original AssignedReassigned DateOwner Review DateOriginal assigned Number of Business Days for the Original assignedDays the Origional assigned is
21/1/20211/4/2021Within Policy22
31/1/20211/4/20211/6/2021Within Policy22
41/4/20211/11/2021Out of Policy6-2
51/6/20211/14/20211/14/2021Out of Policy7-3
61/9/20211/14/20211/14/2021Within Policy40
73/10/20213/16/20213/22/2021Out of Policy5-1
83/11/20213/17/20213/15/2021Within Policy31
Example (2)
Cell Formulas
RangeFormula
D2:D8D2=IF(ISNUMBER(F2),IF(F2>=0,"Within Policy","Out of Policy"),F2)
E2:E8E2=IF(AND(B2<C2,B2<>""),NETWORKDAYS(A2,B2),NETWORKDAYS(A2,C2))
F2:F8F2=IF(ISNUMBER(E2),-(E2-4),E2)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
D2:D12,D16:D1048576,A13:A15Cell Value="Out of Policy"textNO
D2:D12,D16:D1048576,A13:A15Cell Value="Within Policy"textNO
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Hi Alex, sorry for the delayed response. Thank you for your time. Deeply appreciate it.

Column A reassigned within four Business days and the reassigned date (Column B) did not exceed the review date (column C). This means the reassigned was the one who reviewed and not the original.

Row eight is a good example that the original assigned was the one who reviewed.

Hope this helps
 
Upvote 0
See if this does what you want.

Excel Formula:
=IF(AND(B2<>"",NETWORKDAYS(A2,B2)<=4,B2<=C2),"Not Applicable",IF(AND(B2<C2,B2<>""),NETWORKDAYS(A2,B2),NETWORKDAYS(A2,C2)))

20210521 If Date Condition NA.xlsx
ABCDEFG
1Date Original AssignedReassigned DateOwner Review DateOriginal assigned Number of Business Days for the Original assignedDays the Origional assigned is
21/01/20214/01/2021Within Policy22
31/01/20214/01/20216/04/2021Not ApplicableNot ApplicableNot Applicable
44/01/202111/01/2021Out of Policy6-2
56/01/202114/01/202114/01/2021Out of Policy7-3
69/01/202114/01/202114/01/2021Not ApplicableNot ApplicableNot Applicable
710/03/202116/03/202122/03/2021Out of Policy5-1
811/03/202117/03/202115/03/2021Within Policy31
9
Sheet2
Cell Formulas
RangeFormula
D2:D8D2=IF(ISNUMBER(F2),IF(F2>=0,"Within Policy","Out of Policy"),F2)
E2:E8E2=IF(AND(B2<>"",NETWORKDAYS(A2,B2)<=4,B2<=C2), "Not Applicable", IF(AND(B2<C2,B2<>""),NETWORKDAYS(A2,B2),NETWORKDAYS(A2,C2)))
F2:F8F2=IF(ISNUMBER(E2),-(E2-4),E2)
 
Upvote 0
Thank you Alex. Unfortunately the formula(s) provided is giving me a VALUE error even when coping the formula or typing it in the formula bar. Am I missing something?

Example 4-27-2021.xlsx
ABCDEF
1Date Original AssignedReassigned DateOwner Review DateOriginal assigned Number of Business Days for the Original assignedDays the Origional assigned is
21/1/20211/4/2021#VALUE!#VALUE!#VALUE!
31/1/20211/4/20211/6/2021Not ApplicableNot ApplicableNot Applicable
41/4/20211/11/2021#VALUE!#VALUE!#VALUE!
51/6/20211/14/20211/14/2021Out of Policy7-3
61/9/20211/14/20211/14/2021Not ApplicableNot ApplicableNot Applicable
73/10/20213/16/20213/22/2021Out of Policy5-1
83/11/20213/17/20213/15/2021Within Policy31
NA for Org CO (2)
Cell Formulas
RangeFormula
D2:D8D2=IF(ISNUMBER(F2),IF(F2>=0,"Within Policy","Out of Policy"),F2)
E2:E8E2=IF(AND(B2<>"",NETWORKDAYS(A2,B2)<=4,B2<=C2),"Not Applicable",IF(AND(B2<C2,B2<>""),NETWORKDAYS(A2,B2),NETWORKDAYS(A2,C2)))
F2:F8F2=IF(ISNUMBER(E2),-(E2-4),E2)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
D16:D1048576,A13:A15,D2:D12Cell Value="Out of Policy"textNO
D16:D1048576,A13:A15,D2:D12Cell Value="Within Policy"textNO
 
Upvote 0
Perhaps it is the date structure? For example the date I provided is structured as Month/Day/Year. I noticed in your example the data is structured as Day/Month/Year.
 
Upvote 0
In case you wanted to cover off some error situations:-

This will cover off text in any of the date fields:-
Excel Formula:
=IFERROR(IF(AND(B2<>"",NETWORKDAYS(A2,B2)<=4,B2<=C2),
"Not Applicable",
IF(AND(B2<C2,B2<>""),NETWORKDAYS(A2,B2),NETWORKDAYS(A2,C2))),"Invalid Date")

If you want to just cover off column B not being truly empty or someone entering a comment, you could try this:-
(wrapping B2 in N() will convert it to zero if its text)

Excel Formula:
=IF(AND(N(B2)<>0,NETWORKDAYS(A2,N(B2))<=4,N(B2)<=C2),
"Not Applicable",
IF(AND(B2<C2,N(B2)<>0),NETWORKDAYS(A2,N(B2)),NETWORKDAYS(A2,C2)))
 
Upvote 0
Solution
Thank you Alex and Fluff, deleting the cells itself in the example resolved the issue, and in my main workbook the IFError assisted with a broader data set. Thanks again, I would not have figured it out without your assistance.
 
Upvote 0

Forum statistics

Threads
1,214,780
Messages
6,121,527
Members
449,037
Latest member
tmmotairi

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