ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Lookup a value based on two keys (https://www.excelbanter.com/excel-programming/287569-lookup-value-based-two-keys.html)

yakimoto

Lookup a value based on two keys
 
How can I get a string value from a table, based on criteria from tw
keys?
I couldn't find how to return a text
Example data:
Name Date Product-X Product-Y
John 1-1-2004 widget 0
John 2-1-2004 gadget 0
Pete 10-1-2004 chair 1

I need to answer: "What is the Product-X sold by John" and the answe
should
be "widget"
i.e.
=func(John,1-1-2004)
Result: widget
Is there any function doing that?

Using SUMPRODUCT I can calculate the number of sold product and sum o
sold product.
It seems I need some function as LOOKUP, but with two keys

Any suggestions

--
Message posted from http://www.ExcelForum.com


Andrew[_25_]

Lookup a value based on two keys
 
Perhaps you could use DGET.

Download the Excel Function Dictionary from Mr. Peter Nonely's site. I
has a good explanation on how to use it.

http://homepage.ntlworld.com/nonele

--
Message posted from http://www.ExcelForum.com


Doug Glancy

Lookup a value based on two keys
 
Yakimo,

Sorry I didn't follow up in the other thread. Seems to me that you could
use Autofilter and filter on John in the Name column. A pivot table might
be also work.

hth,

Doug

"yakimoto " wrote in message
...
How can I get a string value from a table, based on criteria from two
keys?
I couldn't find how to return a text
Example data:
Name Date Product-X Product-Y
John 1-1-2004 widget 0
John 2-1-2004 gadget 0
Pete 10-1-2004 chair 1

I need to answer: "What is the Product-X sold by John" and the answer
should
be "widget"
i.e.
=func(John,1-1-2004)
Result: widget
Is there any function doing that?

Using SUMPRODUCT I can calculate the number of sold product and sum of
sold product.
It seems I need some function as LOOKUP, but with two keys

Any suggestions?


---
Message posted from http://www.ExcelForum.com/





All times are GMT +1. The time now is 06:58 AM.

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