Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Look up values in a range, then summing from another column

I would like to find every instance of a number within a given range
and then sum up values from a designated column on the same row.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Look up values in a range, then summing from another column

Maybe something like:

=sumif(a:a,333,b:b)

(Sum the values in column B where the cell in column A is equal to 333.)

jack wrote:

I would like to find every instance of a number within a given range
and then sum up values from a designated column on the same row.


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Look up values in a range, then summing from another column

Here is some more detail:

The range values are in separate cells. For example, A2 would have 0
and B2 would have 2. I would like to look at the cells with the ranges
to determine what values to look for and then sum the $ value for all
cells within the range.

Based on the example below the value to return for the range 0-2 years
is $358, 2-4 is $200, and 4-6 is $426


Years(Range)

0 2
3 4
5 6


Year $
5 552
1 358
3 200
5 685
6 189
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default Look up values in a range, then summing from another column

On Jul 22, 9:07*pm, jack wrote:
Here is some more detail:

The range values are in separate cells. For example, A2 would have 0
and B2 would have 2. I would like to look at the cells with the ranges
to determine what values to look for and then sum the $ value for all
cells within the range.

Based on the example below the value to return for the range 0-2 years
is $358, 2-4 is $200, and 4-6 is $426

Years(Range)

0 * * * 2
3 * * * 4
5 * * * 6

Year * *$
5 * * * 552
1 * * * 358
3 * * * 200
5 * * * 685
6 * * * 189


Jack,

SUMPRODUCT should do the trick. Assuming the following: 0 in A1, 2 in
B1; 2 in A2, 4 in B2; 4 in A3, 6 in B3 and Year 5 in A6, 552 in B6; 1
in A7, 358 in B7, and so on. Use the following formula in C1 and copy
down to C3:

=SUMPRODUCT(($A$6:$A$10A1)*($A$6:$A$10<B1)*$B$6:$ B$10)

Feel free to adjust your numbers in A1:B3 and feel free to adjust the
, < signs to be some combination of , < or =, <=. Just be sure

that the arrays within the SUMPRODUCT function are all the same size.

Best,

Matthew Herbert
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
summing first 'n' values in a column or row Fran McConville Excel Worksheet Functions 5 April 17th 23 07:01 PM
Summing values within a matrix who are both in a column where theheaders are within a certain numerical range and in a row where the rowheaders are specified. Andy Excel Worksheet Functions 4 November 9th 09 10:53 PM
summing up values in a column based on values in 3 other columns Axel Excel Programming 4 March 30th 07 10:40 PM
summing last values in column gotta know Excel Worksheet Functions 11 December 27th 06 01:51 PM
Summing values within a range rmellison Excel Discussion (Misc queries) 7 September 2nd 05 12:43 PM


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

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"