Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Cam Cam is offline
external usenet poster
 
Posts: 165
Default Calculate sum of values based on a ref value, how?

Hi,

I need to calculate the total value based on the lookup value, but not sure
what function to use. The lookup ref data is from row 2 to 7. The calculated
data is B10 which equal 36 (2+34) (sum of column B in row 2 & 6). Thanks

Here's the sample data.
A B C D E
1 WC 2/1 2/2 2/3 2/4
2 100 2 30 11 10
3 150 21 24 15 13
4 205 5 32 14 12
5 300 25 30 11 10
6 100 34 10 21 40
7 150 14 30 11 43
8
9
10 100 36
11 150
12 205
13 300

NOTE: the left most value is just a row#, not actual data for this example
purpose.




  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Calculate sum of values based on a ref value, how?

=sumif(a$2:a$7,$a10,b$2:b$7)



Cam wrote:

Hi,

I need to calculate the total value based on the lookup value, but not sure
what function to use. The lookup ref data is from row 2 to 7. The calculated
data is B10 which equal 36 (2+34) (sum of column B in row 2 & 6). Thanks

Here's the sample data.
A B C D E
1 WC 2/1 2/2 2/3 2/4
2 100 2 30 11 10
3 150 21 24 15 13
4 205 5 32 14 12
5 300 25 30 11 10
6 100 34 10 21 40
7 150 14 30 11 43
8
9
10 100 36
11 150
12 205
13 300

NOTE: the left most value is just a row#, not actual data for this example
purpose.


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,440
Default Calculate sum of values based on a ref value, how?

In B10:

=SUMIF($A$2:$A$7,"="&$A10,B$2:B$7)

Copy down and to the right

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Cam" wrote in message ...
| Hi,
|
| I need to calculate the total value based on the lookup value, but not sure
| what function to use. The lookup ref data is from row 2 to 7. The calculated
| data is B10 which equal 36 (2+34) (sum of column B in row 2 & 6). Thanks
|
| Here's the sample data.
| A B C D E
| 1 WC 2/1 2/2 2/3 2/4
| 2 100 2 30 11 10
| 3 150 21 24 15 13
| 4 205 5 32 14 12
| 5 300 25 30 11 10
| 6 100 34 10 21 40
| 7 150 14 30 11 43
| 8
| 9
| 10 100 36
| 11 150
| 12 205
| 13 300
|
| NOTE: the left most value is just a row#, not actual data for this example
| purpose.
|
|
|
|


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,311
Default Calculate sum of values based on a ref value, how?

Another way:

=SUMPRODUCT(--($A$2:$A$7=A10),$B$2:$B$7)

Regards,
Paul

--

"Cam" wrote in message
...
Hi,

I need to calculate the total value based on the lookup value, but not
sure
what function to use. The lookup ref data is from row 2 to 7. The
calculated
data is B10 which equal 36 (2+34) (sum of column B in row 2 & 6). Thanks

Here's the sample data.
A B C D E
1 WC 2/1 2/2 2/3 2/4
2 100 2 30 11 10
3 150 21 24 15 13
4 205 5 32 14 12
5 300 25 30 11 10
6 100 34 10 21 40
7 150 14 30 11 43
8
9
10 100 36
11 150
12 205
13 300

NOTE: the left most value is just a row#, not actual data for this example
purpose.






  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Calculate sum of values based on a ref value, how?

I see that I missed a couple of $'s.

=sumif($a$2:$a$7,$a10,b$2:b$7)


Dave Peterson wrote:

=sumif(a$2:a$7,$a10,b$2:b$7)

Cam wrote:

Hi,

I need to calculate the total value based on the lookup value, but not sure
what function to use. The lookup ref data is from row 2 to 7. The calculated
data is B10 which equal 36 (2+34) (sum of column B in row 2 & 6). Thanks

Here's the sample data.
A B C D E
1 WC 2/1 2/2 2/3 2/4
2 100 2 30 11 10
3 150 21 24 15 13
4 205 5 32 14 12
5 300 25 30 11 10
6 100 34 10 21 40
7 150 14 30 11 43
8
9
10 100 36
11 150
12 205
13 300

NOTE: the left most value is just a row#, not actual data for this example
purpose.


--

Dave Peterson


--

Dave Peterson
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
Adding numerical values based on multiple values in another column Kazmaniac Excel Worksheet Functions 6 April 4th 07 08:53 PM
IF statement to calculate based on cell values Jos Excel Worksheet Functions 7 January 30th 07 03:38 PM
Count unique values and create list based on these values vipa2000 Excel Worksheet Functions 7 August 5th 05 01:17 AM
How to calculate values in multiple values with multi conditions Curtis Excel Worksheet Functions 2 July 15th 05 02:36 AM
look up same values in coumn1 and calculate values in 2nd column khan Excel Worksheet Functions 4 June 2nd 05 06:28 PM


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

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

About Us

"It's about Microsoft Excel"