Hello,
I am making a spreadsheet as follows:
I have a drop-down for State and another for Company and I would like Excel to check the Company Data for the State Listed and return a Value in the Second Column.
My data is set up grouped by Company and each state has an entry under each company in column one and in Column 2 are numerical Values for that company in that state. ie Named Group Vorizon, Column 1 =States, Column 2 = Numerical Values
I would like the VLOOKUP to Check the Drop-Down box for State for the Value to Look up, Check the 2nd Drop-Down box for Company for the matrix or table to look the value up in, and I would like it to return the value in column 2 of the company table or matrix.
I tried this: =VLOOKUP(INDIRECT(B2),INDIRECT(D2),2,FALSE)
B2 is the drop-down box for State and D2 is the drop-down box for Company
but it does not work,
Any Suggestions?
Thanks,
Josh
I think you only need the Indirect function around the company named range reference
E.g.
=VLOOKUP(B2,Indirect(D2),2,FALSE)
Microsoft MVP - Excel
Where there is a will there are many ways. Pick One!
Please read the Forum Rules
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Preferred Charities: Lupus Canada and Sick Kids Foundation.
Feel Free to Donate if you want to, for the assistance you received today.
I think I need more details, but perhaps something like this example will work for you....
With Sheet1 structured like this:
Company1_Name
AL 1
AK 221
AZ 13
AR 45
CA 59
CO 26
CT 17
etc
Company2_Name
AL 12
AK 97
AZ 55
AR 102
CA 8
CO 400
CT 63
etc
Then....on Sheet2:
A1: (Company dropdown list)
B1: (State dropdown list)
This formula returns the value associtated with that state
in that company's data section:
Is that something you can work with?C1: =VLOOKUP(B1,OFFSET(Sheet1!$A$1:$B$51,MATCH(A1,Sheet1!$A:$A,0),),2,0)
Thanks for the replies!
I got it working, NBVC's formula worked for me, The Indirect in the first variable was messing my formula up,
Thanks again,
Josh
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks