IF AND VLOOKUP function with two variable inputs and three outcomes

PeanutHead

New Member
Joined
Jan 29, 2021
Messages
9
Office Version
  1. 2016
Platform
  1. Windows
Hi there, I wonder if you guys can help me crack this issue I’m having, which shouldn’t be difficult, but I can’t see the wood for the trees any more.

Basically, I have two different dropdowns in my sheet, and I want them to provide three different outcomes as follows:

If the first dropdown reads “Yes” and the second dropdown is one of a selection of items from the second dropdown, then the outcome is “Yes”
If the first dropdown reads “No”, then the outcome (regardless of the second dropdown) is “No”
Everything else is “TBC”

The formula I’m currently using is this. It sometimes works, but I think I’ve got the phrasing wrong and I can’t seem to get my eyes to freshen on it:
=IF(AND(A2="yes", AND(B2=F3:F5))),"Confirmed", IF(A2="No","No","TBC"))

I previously had this working with a large nested IF function, but I need to simplify it for futureproofing! I feel like I am so close to cracking it, but can’t quite get it right. I suspect I need to use a VLookup, but I’ve tried and not managed it. Any suggestions?

Project Management Workbook 2 (Macro Version).xlsm
ABCDEFG
1Input 1Input 2OutcomeDropdown1Dropdown 2
2NoTBC#VALUE!YesTBC
3NoRole 1
4TBCRole 2
5Role 3
6
7
8
Sheet1 (2)
Cell Formulas
RangeFormula
C2C2=IF(AND(A2="yes",AND(B2=F3:F5)),"Confirmed", IF(A2="No","No","TBC"))
Cells with Data Validation
CellAllowCriteria
A2List=$E$2:$E$4
B2List=$F$2:$F$5
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
OK guys, I think I solved it pretty easily - know it would occur to me the second I posted! I think it's as follows, but I'm happy to hear from anyone who thinks there's a better way:

=IF(AND(A2="yes",AND(B2<>"TBC",B2<>"")),"Yes",IF(A2="no","no","tbc"))
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,730
Members
448,987
Latest member
marion_davis

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