Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
ark
 
Posts: n/a
Default lookup and return range of cells

I want to find the sum of a range of values in a table, but I want this range
to be set by a lookup function. My data table has numerous entries for each
value I want to lookup (say there are 21 matches of value "a", and then I
want to sum up what corresponds to all those "a" values.).

Any help? Let me know if you need more info. Thanks!
  #2   Report Post  
Duke Carey
 
Posts: n/a
Default

=sumproduct(--(lookup_range="a"),value_range)

lookup_range MUST be the same size as value_range or this won't work. Thus
it needs to be something like

=sumproduct(--(A2:A200="a"),B2:B200)



"ark" wrote:

I want to find the sum of a range of values in a table, but I want this range
to be set by a lookup function. My data table has numerous entries for each
value I want to lookup (say there are 21 matches of value "a", and then I
want to sum up what corresponds to all those "a" values.).

Any help? Let me know if you need more info. Thanks!

  #3   Report Post  
ark
 
Posts: n/a
Default

fantastic, it works great. thanks.

"Duke Carey" wrote:

=sumproduct(--(lookup_range="a"),value_range)

lookup_range MUST be the same size as value_range or this won't work. Thus
it needs to be something like

=sumproduct(--(A2:A200="a"),B2:B200)



"ark" wrote:

I want to find the sum of a range of values in a table, but I want this range
to be set by a lookup function. My data table has numerous entries for each
value I want to lookup (say there are 21 matches of value "a", and then I
want to sum up what corresponds to all those "a" values.).

Any help? Let me know if you need more info. Thanks!

  #4   Report Post  
Aladin Akyurek
 
Posts: n/a
Default

Try the more efficient:

=SUMIF(lookup_range,"a",value_range)

ark wrote:
fantastic, it works great. thanks.

"Duke Carey" wrote:


=sumproduct(--(lookup_range="a"),value_range)

lookup_range MUST be the same size as value_range or this won't work. Thus
it needs to be something like

=sumproduct(--(A2:A200="a"),B2:B200)



"ark" wrote:


I want to find the sum of a range of values in a table, but I want this range
to be set by a lookup function. My data table has numerous entries for each
value I want to lookup (say there are 21 matches of value "a", and then I
want to sum up what corresponds to all those "a" values.).

Any help? Let me know if you need more info. Thanks!


--

[1] The SumProduct function should implicitly coerce the truth values to
their Excel numeric equivalents.
[2] The lookup functions should have an optional argument for the return
value, defaulting to #N/A in its absence.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Match function...random search? Les Excel Worksheet Functions 10 July 28th 05 11:54 AM
Return cell reference of lookup value bobm Excel Worksheet Functions 3 July 7th 05 08:49 AM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 07:48 PM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 03:28 AM
Can I use formulas that return cell range ref. in charts X series cwilliams Charts and Charting in Excel 4 June 3rd 05 03:08 PM


All times are GMT +1. The time now is 08:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"