Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Get a value from a list (Database) aka DGet
Hi folks,
I have a flat table with 3 columns Name Time Value ------------------------- John 0:30 7 Peter 0:40 8 Joe 0:50 1 John 1:30 88 Can I use somehow a function in order to get f.ex. the value for John, i.e. =F(Value,Peter,0:40) DGet has similar functionality, but the criteria expression a column containing a range It seems I need something like GetPivotData, but I don't have a Pivot table. Of course I can build one and get my values, but it seems not the right solution I have another solution also - to concatenate the first 2 columns and later on to use SumIf, where the range will be the concatenated column and the criteria will be concatenation of my 2 fields.. Is there any other more elegant solution? Thanks, Yakimoto |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Get a value from a list (Database) aka DGet
You can use SumProduct:
=SUMPRODUCT(($A$2:$A$5=$F2)*($B$2:$B$5=G$1)*($C$2: $C$5)) where F2=John and G1=0:30 Yakimo wrote: Hi folks, I have a flat table with 3 columns Name Time Value ------------------------- John 0:30 7 Peter 0:40 8 Joe 0:50 1 John 1:30 88 Can I use somehow a function in order to get f.ex. the value for John, i.e. =F(Value,Peter,0:40) DGet has similar functionality, but the criteria expression a column containing a range It seems I need something like GetPivotData, but I don't have a Pivot table. Of course I can build one and get my values, but it seems not the right solution I have another solution also - to concatenate the first 2 columns and later on to use SumIf, where the range will be the concatenated column and the criteria will be concatenation of my 2 fields.. Is there any other more elegant solution? Thanks, Yakimoto -- Debra Dalgleish Excel FAQ, Tips & Book List http://www.contextures.com/tiptech.html |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Get a value from a list (Database) aka DGet
thanks, Debra
that is what i needed yakimoto "Debra Dalgleish" wrote in message ... You can use SumProduct: =SUMPRODUCT(($A$2:$A$5=$F2)*($B$2:$B$5=G$1)*($C$2: $C$5)) where F2=John and G1=0:30 Yakimo wrote: Hi folks, I have a flat table with 3 columns Name Time Value ------------------------- John 0:30 7 Peter 0:40 8 Joe 0:50 1 John 1:30 88 Can I use somehow a function in order to get f.ex. the value for John, i.e. =F(Value,Peter,0:40) DGet has similar functionality, but the criteria expression a column containing a range It seems I need something like GetPivotData, but I don't have a Pivot table. Of course I can build one and get my values, but it seems not the right solution I have another solution also - to concatenate the first 2 columns and later on to use SumIf, where the range will be the concatenated column and the criteria will be concatenation of my 2 fields.. Is there any other more elegant solution? Thanks, Yakimoto -- Debra Dalgleish Excel FAQ, Tips & Book List http://www.contextures.com/tiptech.html |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Get a value from a list (Database) aka DGet
Debra, your solution is perfect for me, when I deal with numbers in Value
column. Do you know how I can do the same when my value is not a number, but a string? Example John 0:30 Food =func("John","0:30") I expect to return "Food" Thanks, Yakimo "Debra Dalgleish" wrote in message ... You can use SumProduct: =SUMPRODUCT(($A$2:$A$5=$F2)*($B$2:$B$5=G$1)*($C$2: $C$5)) where F2=John and G1=0:30 Yakimo wrote: Hi folks, I have a flat table with 3 columns Name Time Value ------------------------- John 0:30 7 Peter 0:40 8 Joe 0:50 1 John 1:30 88 Can I use somehow a function in order to get f.ex. the value for John, i.e. =F(Value,Peter,0:40) DGet has similar functionality, but the criteria expression a column containing a range It seems I need something like GetPivotData, but I don't have a Pivot table. Of course I can build one and get my values, but it seems not the right solution I have another solution also - to concatenate the first 2 columns and later on to use SumIf, where the range will be the concatenated column and the criteria will be concatenation of my 2 fields.. Is there any other more elegant solution? Thanks, Yakimoto -- Debra Dalgleish Excel FAQ, Tips & Book List http://www.contextures.com/tiptech.html |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
DGET only limited to 1000 Rows, but I need 8000 rows for DGET funt | Excel Worksheet Functions | |||
getting a list from a database | Excel Discussion (Misc queries) | |||
drop down list from database | Excel Discussion (Misc queries) | |||
database list | Excel Discussion (Misc queries) | |||
extend list or database | Excel Programming |