Dynamic VLOOKUP

smitpau

Board Regular
Joined
Apr 2, 2020
Messages
167
Office Version
  1. 365
Platform
  1. Windows
Hi,

Wonder if it is possible to have a formula that dynamically looks up values from a table as the reference cell instead of manually typing in each one.
Once it finds a new VLOOKUP value it would use that by default until it finds the next value in the table and so on.
In the example below it would be column B that instead of manually inputting Dummy 1, Dummy 2 etc it would match Dummy 2 then use that as the lookup value, see Dummy 3 then use that etc.

Hope that I've explained that properly.

Thanks,

Book1
BCDEF
2IncludeP&L
3YesDummy 1CompanyInclude
4YesRevenueDummy 1Yes
5YesCOS Dummy 2 Yes
6YesProfitDummy 3No
7
8YesDummy 2
9YesRevenue
10YesCOS
11YesProfit
12
13NoDummy 3
14NoRevenue
15NoCOS
16NoProfit
Sheet1
Cell Formulas
RangeFormula
B3:B6B3=VLOOKUP($C$3,$E$4:$F$6,2,FALSE)
B8:B11B8=VLOOKUP($C$8,$E$4:$F$6,2,FALSE)
B13:B16B13=VLOOKUP($C$13,$E$4:$F$6,2,FALSE)
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
The column C already reflects the LOOKUP value i.e. Dummy1, Dummy2 or Dummy 3. Then how is it a dynamic lookup?
Am I missing something?
Could you given an example of the Dynamic one?
 
Upvote 0
I should have put a question mark in the title.

It's basically instead of hardcoding the VLOOKUP to search for Dummy 1, Dummy 2 etc each time, I wonder if there is a way it could automatically change that, as for example once it sees column C says Dummy 2 that would be the new lookup value until it sees Dummy 3.

Hope that helps.
 
Upvote 0

Forum statistics

Threads
1,214,905
Messages
6,122,174
Members
449,071
Latest member
cdnMech

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