Trouble with IF(OR Formula

Fanwood

Board Regular
Joined
Jan 29, 2014
Messages
60
Hi Guys, having a little trouble with an if(or formula. It isn't returning anything, just the dreaded #VALUE!. Is it something wrong with the formula? Am I writing it incorrectly?

=IF(OR(A2="CUSTOMER REQUESTED REVIEW",A2="ACCEPTED",A2="ASSIGNED TO PROVIDER",A2="PROVIDER ACCEPTS WITH CONDITION",A2="EXCEPTION - DUPLICATE ORDER",A2="EXCEPTION - MANUAL ASSIGN", A2="Accepted by Vendor",A2="Accepted by Vendor with Conditions","Action Required",A2="Assigned to Vendor",A2="Being Typed",A2="Cancellation Pending",A2="Declined by Vendor",A2="Inspected",A2="Scheduled",A2="Unassigned",A2="Waiting for Acceptance"),"In Process",IF(OR(A2="WHOLESALE - WAITING FOR APPRAISAL",A2= "EXCEPTION – PROCESSOR",A2="Pending Vendor Onboarding",A2="Action Required",A2="Vendor Search Complete-Unsuccessful"),"Expedited Recruiting",IF(OR(A2="DRAFT NOT ACCEPTABLE",A2="ESCALATED REVIEW",A2="EXCEPTION - REVIEWER",A2="READY FOR REVIEW",A2="Client Request for Revisions/Addenda",A2="In Review",A2="QC Level-1 Approval Suggested",A2="QC Lelvel-1 Revisions Suggested",A2="Ready for Review",A2="Request for Revisions/Addenda"),”In QC”,IF(OR(A2=”Order Completed”,A2=”CANCELLED - WITH FEE DECLINED”,A2=”DECLINED”,A2="APPROVED - AS IS",A2="Completed"),"Order Completed",IF(OR(A2="ON HOLD", A2="ON HOLD - WAITING FOR APPROVAL",A2="Awaiting Information from Client"),"On Hold",IF(OR(A2="CANCELLED - BY REQUEST",A2="CANCELLED - DUPLICATE REQUEST",A2="Cancelled - Duplicate Order/Request",A2="Cancelled"),"Remove","Remove"))))))
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
You left off the A2= of one of the criteria in the first OR

=IF(OR(A2="CUSTOMER REQUESTED REVIEW",A2="ACCEPTED",A2="ASSIGNED TO PROVIDER",A2="PROVIDER ACCEPTS WITH CONDITION",A2="EXCEPTION - DUPLICATE ORDER",A2="EXCEPTION - MANUAL ASSIGN", A2="Accepted by Vendor",A2="Accepted by Vendor with Conditions",A2="Action Required",A2="Assigned to Vendor",A2="Being Typed",A2="Cancellation Pending",A2="Declined by Vendor",A2="Inspected",A2="Scheduled",A2="Unassigned",A2="Waiting for Acceptance"),"In Process",IF(OR(A2="WHOLESALE - WAITING FOR APPRAISAL",A2= "EXCEPTION – PROCESSOR",A2="Pending Vendor Onboarding",A2="Action Required",A2="Vendor Search Complete-Unsuccessful"),"Expedited Recruiting",IF(OR(A2="DRAFT NOT ACCEPTABLE",A2="ESCALATED REVIEW",A2="EXCEPTION - REVIEWER",A2="READY FOR REVIEW",A2="Client Request for Revisions/Addenda",A2="In Review",A2="QC Level-1 Approval Suggested",A2="QC Lelvel-1 Revisions Suggested",A2="Ready for Review",A2="Request for Revisions/Addenda"),”In QC”,IF(OR(A2=”Order Completed”,A2=”CANCELLED - WITH FEE DECLINED”,A2=”DECLINED”,A2="APPROVED - AS IS",A2="Completed"),"Order Completed",IF(OR(A2="ON HOLD", A2="ON HOLD - WAITING FOR APPROVAL",A2="Awaiting Information from Client"),"On Hold",IF(OR(A2="CANCELLED - BY REQUEST",A2="CANCELLED - DUPLICATE REQUEST",A2="Cancelled - Duplicate Order/Request",A2="Cancelled"),"Remove","Remove"))))))
 
Upvote 0
Thanks for your Hawk eyes, now it gives me a #NAME? Error.....
You left off the A2= of one of the criteria in the first OR

=IF(OR(A2="CUSTOMER REQUESTED REVIEW",A2="ACCEPTED",A2="ASSIGNED TO PROVIDER",A2="PROVIDER ACCEPTS WITH CONDITION",A2="EXCEPTION - DUPLICATE ORDER",A2="EXCEPTION - MANUAL ASSIGN", A2="Accepted by Vendor",A2="Accepted by Vendor with Conditions",A2="Action Required",A2="Assigned to Vendor",A2="Being Typed",A2="Cancellation Pending",A2="Declined by Vendor",A2="Inspected",A2="Scheduled",A2="Unassigned",A2="Waiting for Acceptance"),"In Process",IF(OR(A2="WHOLESALE - WAITING FOR APPRAISAL",A2= "EXCEPTION – PROCESSOR",A2="Pending Vendor Onboarding",A2="Action Required",A2="Vendor Search Complete-Unsuccessful"),"Expedited Recruiting",IF(OR(A2="DRAFT NOT ACCEPTABLE",A2="ESCALATED REVIEW",A2="EXCEPTION - REVIEWER",A2="READY FOR REVIEW",A2="Client Request for Revisions/Addenda",A2="In Review",A2="QC Level-1 Approval Suggested",A2="QC Lelvel-1 Revisions Suggested",A2="Ready for Review",A2="Request for Revisions/Addenda"),”In QC”,IF(OR(A2=”Order Completed”,A2=”CANCELLED - WITH FEE DECLINED”,A2=”DECLINED”,A2="APPROVED - AS IS",A2="Completed"),"Order Completed",IF(OR(A2="ON HOLD", A2="ON HOLD - WAITING FOR APPROVAL",A2="Awaiting Information from Client"),"On Hold",IF(OR(A2="CANCELLED - BY REQUEST",A2="CANCELLED - DUPLICATE REQUEST",A2="Cancelled - Duplicate Order/Request",A2="Cancelled"),"Remove","Remove"))))))
 
Upvote 0
OK..

I really think you'd be better off with a different approach, probably a simple vlookup.

Put all those text strings into a range of cells, say G1:G20 or whatever.
And put the corresponding response for each of those values in H1:H20

Then a simple
=VLOOKUP(A2,G1:H20,2,FALSE) will work brilliantly.

This will also make it much easier to adjust the formula as needed.
 
Upvote 0
updating my response, I realize what you are saying now but adding addiotnal data to reference from seems to defeat the purpose.
OK..

I really think you'd be better off with a different approach, probably a simple vlookup.

Put all those text strings into a range of cells, say G1:G20 or whatever.
And put the corresponding response for each of those values in H1:H20

Then a simple
=VLOOKUP(A2,G1:H20,2,FALSE) will work brilliantly.

This will also make it much easier to adjust the formula as needed.
 
Last edited:
Upvote 0
I'm suggesting that you 'create' a new range containing all the text strings and their corresponding values.

Example


Excel Workbook
GH
1Accepted by VendorIn Process
2AssignedIn Process
3ScheduledIn Process
4Wholesale - Waiting For AppraisalExpedited Recruiting
5Exception - ProcessorExpedited Recruiting
6Pending Vendor OnboardingExpedited Recruiting
7Action RequiredExpedited Recruiting
Sheet1
Excel Workbook
AB
2AssignedIn Process
3Exception - ProcessorExpedited Recruiting
4Action RequiredExpedited Recruiting
5ScheduledIn Process
Sheet1
 
Upvote 0
I understand what you mean, I just didn't want to add any additional, unnecessary data to an already very large report. But if this is my only route then so be it. Thank you for your assistance Jonmo1. I appreciate your help
 
Upvote 0
I'm not saying it's the 'only' option.

You're more than welcome to use the longwinded nested if/or function if you like.

But in my opinion, Excel gives you 256 columns and 65536 rows (more in xl2007+).
Might as well use 'a few' of them.

It is so much easier to troubleshoot a Vlookup than a nested if/or that is over 1300 characters long.


I did find that you have some strange quotation marks in there.
” instead of "

I did a find/replace to fix it for you.


=IF(OR(A2="CUSTOMER REQUESTED REVIEW",A2="ACCEPTED",A2="ASSIGNED TO PROVIDER",A2="PROVIDER ACCEPTS WITH CONDITION",A2="EXCEPTION - DUPLICATE ORDER",A2="EXCEPTION - MANUAL ASSIGN", A2="Accepted by Vendor",A2="Accepted by Vendor with Conditions",A2="Action Required",A2="Assigned to Vendor",A2="Being Typed",A2="Cancellation Pending",A2="Declined by Vendor",A2="Inspected",A2="Scheduled",A2="Unassigned",A2="Waiting for Acceptance"),"In Process",IF(OR(A2="WHOLESALE - WAITING FOR APPRAISAL",A2= "EXCEPTION – PROCESSOR",A2="Pending Vendor Onboarding",A2="Action Required",A2="Vendor Search Complete-Unsuccessful"),"Expedited Recruiting",IF(OR(A2="DRAFT NOT ACCEPTABLE",A2="ESCALATED REVIEW",A2="EXCEPTION - REVIEWER",A2="READY FOR REVIEW",A2="Client Request for Revisions/Addenda",A2="In Review",A2="QC Level-1 Approval Suggested",A2="QC Lelvel-1 Revisions Suggested",A2="Ready for Review",A2="Request for Revisions/Addenda"),"In QC",IF(OR(A2="Order Completed",A2="CANCELLED - WITH FEE DECLINED",A2="DECLINED",A2="APPROVED - AS IS",A2="Completed"),"Order Completed",IF(OR(A2="ON HOLD", A2="ON HOLD - WAITING FOR APPROVAL",A2="Awaiting Information from Client"),"On Hold",IF(OR(A2="CANCELLED - BY REQUEST",A2="CANCELLED - DUPLICATE REQUEST",A2="Cancelled - Duplicate Order/Request",A2="Cancelled"),"Remove","Remove"))))))
 
Upvote 0
Interesting, thank you for the advice.
I'm not saying it's the 'only' option.

You're more than welcome to use the longwinded nested if/or function if you like.

But in my opinion, Excel gives you 256 columns and 65536 rows (more in xl2007+).
Might as well use 'a few' of them.

It is so much easier to troubleshoot a Vlookup than a nested if/or that is over 1300 characters long.


I did find that you have some strange quotation marks in there.
” instead of "

I did a find/replace to fix it for you.


=IF(OR(A2="CUSTOMER REQUESTED REVIEW",A2="ACCEPTED",A2="ASSIGNED TO PROVIDER",A2="PROVIDER ACCEPTS WITH CONDITION",A2="EXCEPTION - DUPLICATE ORDER",A2="EXCEPTION - MANUAL ASSIGN", A2="Accepted by Vendor",A2="Accepted by Vendor with Conditions",A2="Action Required",A2="Assigned to Vendor",A2="Being Typed",A2="Cancellation Pending",A2="Declined by Vendor",A2="Inspected",A2="Scheduled",A2="Unassigned",A2="Waiting for Acceptance"),"In Process",IF(OR(A2="WHOLESALE - WAITING FOR APPRAISAL",A2= "EXCEPTION – PROCESSOR",A2="Pending Vendor Onboarding",A2="Action Required",A2="Vendor Search Complete-Unsuccessful"),"Expedited Recruiting",IF(OR(A2="DRAFT NOT ACCEPTABLE",A2="ESCALATED REVIEW",A2="EXCEPTION - REVIEWER",A2="READY FOR REVIEW",A2="Client Request for Revisions/Addenda",A2="In Review",A2="QC Level-1 Approval Suggested",A2="QC Lelvel-1 Revisions Suggested",A2="Ready for Review",A2="Request for Revisions/Addenda"),"In QC",IF(OR(A2="Order Completed",A2="CANCELLED - WITH FEE DECLINED",A2="DECLINED",A2="APPROVED - AS IS",A2="Completed"),"Order Completed",IF(OR(A2="ON HOLD", A2="ON HOLD - WAITING FOR APPROVAL",A2="Awaiting Information from Client"),"On Hold",IF(OR(A2="CANCELLED - BY REQUEST",A2="CANCELLED - DUPLICATE REQUEST",A2="Cancelled - Duplicate Order/Request",A2="Cancelled"),"Remove","Remove"))))))
 
Upvote 0

Forum statistics

Threads
1,223,719
Messages
6,174,087
Members
452,542
Latest member
Bricklin

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