View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default Please help matching data from one table to another

One way...

You have to structure your table 2 in a certain way. Like this:

Where the "-" is a cell delimiter

Table 2
NY - $0 - 5%
NY - $25,001 - 6%
NY - $35,001 - 7%
NY - $40,001 - 8%
CA - $0 - 5%
CA - $40,001 - 6%
CA - $45,001 - 7%
CA - $55,001 - 8%

Assume this table is in the range A10:C17

This data is in the range A2:B6

NY - $33,000
NY - $38,000
CA - $41,000
CA - $53,000
CA - $85,000


I'm assuming that the data is sorted as is portrayed.

Enter this formula in C2 and copy down as needed:

=INDEX(C$17:INDEX(C$10:C$17,MATCH(A2,A$10:A$17,0)) ,MATCH(B2,B$17:INDEX(B$10:B$17,MATCH(A2,A$10:A$17, 0))))

Here's a screencap:

http://img126.imageshack.us/img126/57/lookuptaxtt6.jpg


--
Biff
Microsoft Excel MVP


wrote in message
...
I have two tables. On one table i have an income $ amount and a
corresponding state. In the second table I have a list of states and
their respective income break points and corresponding tax rates. For
example:

Table 1

NY - $33,000
NY - $38,000
CA - $41,000
CA - $53,000
CA - $85,000
etc.

Table 2
NY - $0 - 25,000 - 5%
NY - $25,001 - 35,000 - 6%
NY - $35,001 - 40,000 - 7%
NY - $40,001 and over - 8%
CA - $0 - 40,000 - 5%
CA - $40,001 - 45,000 - 6%
CA - $45,001 - 55,000 - 7%
CA - $55,001+ - 8%

I need to write a formula such that I can look up the appropriate tax
rate from Table 2 and bring it over to Table 1 based on which state
and which income tax bracket the income falls into.

Any ideas?