Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 202
Default Sum with a Twist Q

How could I add up all values in two ranges where the value in a
separate range equals one of 2 values?

As an example

I wish to add all values in Ranges H10:H22 IF the corresponding value
in J10:J22 is one of 333333 or 444444 or 1111111 or 2222222
+
All values in Ranges H28:H40 IF the corresponding value in J28:J40 is
one of 333333 or 444444 or 1111111 or 2222222 + etc etc

An alternative to above that might be neat is:-

Add all values in Ranges H10:H22 IF the corresponding value in J10:J22
is a continuous 6 or 7 digit value i.e. 333333 or 444444 or 1111111 or
2222222 + etc etc


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Sum with a Twist Q

Hi,

You could do it with multiple sumifs with your criteria in a cell

=SUMIF(J10:J22,A1,H10:H22)+SUMIF(J10:J22,A2,H10:H2 2)


In this case the criteria are in A1 and A2

Mike

"Seanie" wrote:

How could I add up all values in two ranges where the value in a
separate range equals one of 2 values?

As an example

I wish to add all values in Ranges H10:H22 IF the corresponding value
in J10:J22 is one of 333333 or 444444 or 1111111 or 2222222
+
All values in Ranges H28:H40 IF the corresponding value in J28:J40 is
one of 333333 or 444444 or 1111111 or 2222222 + etc etc

An alternative to above that might be neat is:-

Add all values in Ranges H10:H22 IF the corresponding value in J10:J22
is a continuous 6 or 7 digit value i.e. 333333 or 444444 or 1111111 or
2222222 + etc etc



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 57
Default Sum with a Twist Q

Hello Seanie,

You can use SUMIF like this

=SUM(SUMIF(J10:J22,{333333,444444},H10:H22))
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
Top Ten Lists with a twist (or three). Bigfoot17 Excel Worksheet Functions 0 September 18th 08 08:48 PM
If but with a twist:( AVB Over My Head New Users to Excel 3 September 16th 08 04:43 AM
Sum with a twist andrew Excel Discussion (Misc queries) 15 June 18th 08 08:56 AM
Match with a Twist John Excel Worksheet Functions 2 August 18th 06 08:46 PM
Cut / Paste with a Twist [email protected] Excel Discussion (Misc queries) 3 July 10th 06 09:51 PM


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

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"