View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Elegant solution for two comparisons

One way ..

Source data as posted assumed in A1:D4

In F2:G2 down are the grades and amounts, eg:
Grade F, 14,000
Grade G, 14,000

Place in H2:
=INDEX($A$2:$A$4,MATCH(G2,OFFSET($A$2:$A$4,,MATCH( F2,$B$1:$D$1,0)),0))
Copy down to return required results
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Joe Murphy" wrote in message
...
I have a list of employees. Employees have salaries, and they have
grades (A through G). I'd like to tie their salaries and grades to a
separate table of grade points. Here's an example of the table:

Grade G / Grade F / Grade E
6 14,000 / 16,000 / 18,000
5 12,000 / 14,000 / 16,000
4 10,000 / 12,000 / 14,000

So I'd start with an employee with a salary of 14,000. He's Grade F.
So the formula would output point 5. If he was Grade G, he'd instead
be on point 6.

What's the most elegant way to build this? Match and Index (which I'm
not familiar with)? Nested IFs?

Thanks,

Joe.