vlookup with the same values in one column

  • Thread starter Thread starter mike
  • Start date Start date
M

mike

Here is an example of what I am trying to lookup:

column A column B column C
3.00 4.00 2.95
3.00 4.50 3.00

I am trying to do a lookup by punching a value into a cell which would be in
column A and also a value into another cell which would be in column B to
give me the value in the correct coumn C. I tried this,
=VLOOKUP(G3,A2:D3,3). How do i do this?

-Mike
 
One way assuming the combination of A and B are unique.

E1 = 3
F1 = 4.5

=SUMPRODUCT(--(A1:A10=E1),--(B1:B10=F1),C1:C10)
 
If you are asking how to use 2 values as lookups, i.e., find the row where
the first lookup value matches column A and the second lookup value matches
column B, and get the value in column C, then:

If column C contains numeric values AND IF the combinations in A & B are
guaranteed to be unique:

=sumproduct(--(A5:A100=A1),--(B5:B100=B1),(C5,C100)

If column C contains text values or numeric values AND IF the combinations
in A & B are guaranteed to be unique:

*this is an array formula to be entered by pressing Ctrl-Shift-Enter*

=INDEX(C5:C100,MATCH(A1&B1,A5:A100&B5:B100,0))
 
Thanks for the reply's!!!

Dukes first example is pretty close to what I want. The only thing is I
won't have the exact numer in column b. I will have 4.00 and I want it to
choose the 4.96 over the 4.50. Would there be a vlookup in the formula?
 
Duke, When I said 4.96 I ment 3.96.

Duke Carey said:
If you are asking how to use 2 values as lookups, i.e., find the row where
the first lookup value matches column A and the second lookup value matches
column B, and get the value in column C, then:

If column C contains numeric values AND IF the combinations in A & B are
guaranteed to be unique:

=sumproduct(--(A5:A100=A1),--(B5:B100=B1),(C5,C100)

If column C contains text values or numeric values AND IF the combinations
in A & B are guaranteed to be unique:

*this is an array formula to be entered by pressing Ctrl-Shift-Enter*

=INDEX(C5:C100,MATCH(A1&B1,A5:A100&B5:B100,0))
 

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

Back
Top