Nested if with or & and

Wishmaster89

Board Regular
Joined
Jan 10, 2022
Messages
77
Office Version
  1. 2021
  2. 2019
  3. 2016
Platform
  1. Windows
  2. MacOS
Hi Everyone

I have attempted to write a formula that will check if column E and H OR E and J are not blank and then do a vlookup to get a price. I am having trouble with the first part.
Here is my attempted formula so far but it returns False at the moment(Cell L4)
Excel Formula:
=IF(OR(AND(E4="Member",H4="<>")),VLOOKUP(H4,'CII Costs'!B:C,2,0),IF(AND(E4="Non - Member",H4="<>"),VLOOKUP(H4,'CII Costs'!B:D,3,0)))

Book4
ABCDEFGHIJKLMNOPQRST
1NEW CII WORKBOOK ORDERING FORM
2To be completed by coachFor Ops use
3Date of orderLearner first nameLearner surnameFull address for deliveryCII member/Non-memberCII PINQualificationWorkbook requestIP L3 - route/IP L3 optionWhich optional unit?Cost £Postage cost £Total cost £QualificationIP L3 - route/optionAon Y/NBrewin Dolphin Y/NRSA Y/NOps Comments
4MemberIF2Broker - Option 2 - Cert C11 with LM1EP2IF5 enrolment plusFALSE0
5Non - MemberBroker - Option 1 - Cert CII with IF1Optional unitIF6 enrolment plus#N/A#N/A
6MemberUnderwriting - Option 2 - Cert CII IF1 enrolment plus#N/A#N/A
7Non - MemberBroker - Option 2 - Cert C11 with LM1IF6 enrolment plus#N/A#N/A
8MemberSenior Financial Services Customer L3 - Opton 1 - Cert II#N/A#N/A
9Non - Member#N/A#N/A
10Non - MemberBroker - Option 1 - Cert CII with IF1Optional unit#N/A#N/A
11Member#N/A#N/A
12Non - MemberBroker - Option 1 - Cert CII with IF1Optional unit#N/A#N/A
13MemberUnderwriting - Option 1 - Cert CII#N/A#N/A
14Non - MemberUnderwriting - Option 2 - Cert CII#N/A#N/A
15MemberUnderwriting - Option 1 - Cert CII#N/A#N/A
16Non - MemberUnderwriting - Option 1 - Cert CIIIF3#N/A#N/A
17Non - MemberBroker - Option 2 - Cert C11 with LM1#N/A#N/A
18MemberBroker - Option 1 - Cert CII with IF1#N/A#N/A
19Non - MemberClaims / Loss adjuster Option 3 -CILACH2#N/A#N/A
20MemberBroker - Option 1 - Cert CII with IF1Optional unit#N/A#N/A
21Non - Member#N/A#N/A
22
Sheet1
Cell Formulas
RangeFormula
L4L4=IF(OR(AND(E4="Member",H4="<>")),VLOOKUP(H4,'[Copy of Copy of Copy of NEW CII ORDER SPREADSHEET 2022.xlsx]CII Costs'!B:C,2,0),IF(AND(E4="Non - Member",H4="<>"),VLOOKUP(H4,'[Copy of Copy of Copy of NEW CII ORDER SPREADSHEET 2022.xlsx]CII Costs'!B:D,3,0)))
L5L5=IFS(E5="Member",VLOOKUP(H5,'[Copy of Copy of Copy of NEW CII ORDER SPREADSHEET 2022.xlsx]CII Costs'!B:C,2,FALSE),E5="Non - Member",VLOOKUP(J5,'[Copy of Copy of Copy of NEW CII ORDER SPREADSHEET 2022.xlsx]CII Costs'!B:D,3,FALSE))
L6:L21L6=IFS(E6="Member",VLOOKUP(H6,'[Copy of Copy of Copy of NEW CII ORDER SPREADSHEET 2022.xlsx]CII Costs'!B:C,2,FALSE),E6="Non - Member",VLOOKUP(H6,'[Copy of Copy of Copy of NEW CII ORDER SPREADSHEET 2022.xlsx]CII Costs'!B:D,3,FALSE))
N4:N21N4=SUM(L4:M4)
 
Last edited:

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
How about
Excel Formula:
=IF(AND(E4="Member",H4="<>"),VLOOKUP(H4,'CII Costs'!B:C,2,0),IF(AND(E4="Non - Member",H4="<>"),VLOOKUP(H4,'CII Costs'!B:D,3,0),""))
 
Upvote 0
Thanks but i also need to check if a and j are not blank as well.
H and J can’t both have values, i’ve got some vba code that will sort that out though.
 
Upvote 0
In that case what are all the eventualities & what should happen for each.
 
Upvote 0
So if h and j have values i’ll do a vlookup based on the those values to another sheet. The vlookup part is easy. I just need to write the first part that checks if there is a value in e and h or e and j - hope that makes sense
 
Upvote 0
If e4=member and h4 has a value then do a vlookup

If e4=non member and h4 has a value then do a vlookup

If e4=member and j4 has a value then do a vlookup

If e4= non member and j4 has a value then do a vlook up

Hope this helps
 
Upvote 0
Ok, how about
Excel Formula:
=IF(AND(E4="Member",H4="<>"),VLOOKUP(H4,'CII Costs'!B:C,2,0),IF(AND(E4="Non - Member",H4="<>"),VLOOKUP(H4,'CII Costs'!B:D,3,0),IF(AND(E4="Member",J4="<>"),VLOOKUP(H4,'CII Costs'!B:C,2,0),IF(AND(E4="Non - Member",J4="<>"),VLOOKUP(H4,'CII Costs'!B:D,3,0),""))))
 
Upvote 0
Solution
Thanks, will try in the morning. I had similar logic but i got errors, maybe my syntax was wrong.
 
Upvote 0

Forum statistics

Threads
1,215,561
Messages
6,125,538
Members
449,236
Latest member
Afua

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