VLOOKUP and IF Function

OfficeUser

Well-known Member
Joined
Feb 4, 2010
Messages
544
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
I have this VLOOKUP formula, as a Data Validation Source (Allow List): =INDIRECT(VLOOKUP(D21,Parts!$C$3:$D$103,2,FALSE))

I am trying to add to this formula so that if the user selects the word Variance in cell D21, then it bypasses the VLOOKUP, and instead creates the data validation similar to =Parts!J3:J11

Can this be done?
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Do you mean something like this?

Excel Formula:
=IF(D21="Variance",Parts!J3:J11,INDIRECT(VLOOKUP(D21,Parts!$C$3:$D$103,2,FALSE)))
 
Upvote 0
Solution
I tried that exact approach earlier and no go, but all is well now. Clearly a user error on my part. Thanks.
 
Upvote 0

Forum statistics

Threads
1,221,537
Messages
6,160,406
Members
451,644
Latest member
hglymph

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