ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   vlookup with the same values in one column (https://www.excelbanter.com/excel-discussion-misc-queries/200442-vlookup-same-values-one-column.html)

Mike

vlookup with the same values in one column
 
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

T. Valko

vlookup with the same values in one column
 
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)

--
Biff
Microsoft Excel MVP


"mike" wrote in message
...
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




Duke Carey

vlookup with the same values in one column
 
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))

"mike" wrote:

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


Mike

vlookup with the same values in one column
 
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 Carey" wrote:

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))

"mike" wrote:

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


Mike

vlookup with the same values in one column
 
Duke, When I said 4.96 I ment 3.96.

"Duke Carey" wrote:

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))

"mike" wrote:

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



All times are GMT +1. The time now is 07:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com