Table_array and drop down boxes

G

GMAN501

I am working on a vlookuo formula and having trouble. I am trying to link the
table_array portion of the vlookup to the selection made in a drop down box.
Think of it this way...I have 50 tables set up, one for each state, if a
person selects the state of Ohio from the list the table array will now have
the name of Ohio seach only in that table.

=vlookup(sales tax,result from drop down box, 2)
if I type in =vlookup(sales tax, Ohio,2) I get the results I need.
 
A

Anant Basant

Hi,

In a blank worksheet, design two tables like this:
In A1:B3
OHIO TaxRate
Sales Tax 2.5%
Customs Duty 1.5%

In D1:E4

TEXAS TaxRate
Sales Tax 2.4%
Customs Duty 5%
Income Tax 6.5%

Open Name box from Insert/Name/Define.
In the Names in Workbook box type OHIO.
In the refers to box select range for the OHIO table (A1:B100 to keep some
room for future).
Click Add

Create a name for Texas in a similar way, referring to range D1:E100.

In cell G1 Type OHIO and in cell H1 type Sales Tax.
In cell I1 insert the following formula:
=VLOOKUP(H1,INDIRECT(G1),2,0)

You can link your drop down boxes to cell G1 and H1.

Hope that solves your problem.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top