Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,311
Default SUMPRODUCT or SUMIF if any values in a range equal any values in another range

Let's say I have values in range A1:A26.
Next I have some values in range Z1:Z7.

I'd like to do some sort of SUMIF or SUMPRODUCT that if any of the values in
Z1:Z7 are in the range A1:A26, I'd like to SUM the corresponding values in
O1:O26.

Is there a simpler way to do this than daisy-chaining a bunch of SUMIFs
together?

Thanks,
Paul

--



  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,722
Default SUMPRODUCT or SUMIF if any values in a range equal any values in a

Sure is.

=SUMPRODUCT(ISNUMBER(MATCH(A1:A26,Z1:Z7,0))*O1:O26 )

--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"PCLIVE" wrote:

Let's say I have values in range A1:A26.
Next I have some values in range Z1:Z7.

I'd like to do some sort of SUMIF or SUMPRODUCT that if any of the values in
Z1:Z7 are in the range A1:A26, I'd like to SUM the corresponding values in
O1:O26.

Is there a simpler way to do this than daisy-chaining a bunch of SUMIFs
together?

Thanks,
Paul

--




  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,311
Default SUMPRODUCT or SUMIF if any values in a range equal any values in a

Thanks. That's what I was looking for.

Paul

--

"Luke M" wrote in message
...
Sure is.

=SUMPRODUCT(ISNUMBER(MATCH(A1:A26,Z1:Z7,0))*O1:O26 )

--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"PCLIVE" wrote:

Let's say I have values in range A1:A26.
Next I have some values in range Z1:Z7.

I'd like to do some sort of SUMIF or SUMPRODUCT that if any of the values
in
Z1:Z7 are in the range A1:A26, I'd like to SUM the corresponding values
in
O1:O26.

Is there a simpler way to do this than daisy-chaining a bunch of SUMIFs
together?

Thanks,
Paul

--






  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 913
Default SUMPRODUCT or SUMIF if any values in a range equal any values in another range

On Wed, 15 Jul 2009 12:17:15 -0400, "PCLIVE"
wrote:

Let's say I have values in range A1:A26.
Next I have some values in range Z1:Z7.

I'd like to do some sort of SUMIF or SUMPRODUCT that if any of the values in
Z1:Z7 are in the range A1:A26, I'd like to SUM the corresponding values in
O1:O26.

Is there a simpler way to do this than daisy-chaining a bunch of SUMIFs
together?

Thanks,
Paul



This could probably be written more simple, but anyway.
Assuming the values in Z1:Z7 are all different, try this:

=SUMPRODUCT(MMULT(--(MMULT(A1:A26,--(COLUMN(OFFSET(Z1,,,7))0))-TRANSPOSE(Z1:Z7)=0),--(ROW(Z1:Z7)0)),O1:O26)

Note: This is an array formula that has to be confirmed with
CTRL+SHIFT+ENTER rather than just ENTER

Hope this helps / Lars-Åke
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
SUMIF result including values not specified in sum-range evans.notch.cabin Excel Worksheet Functions 3 January 30th 09 08:13 PM
adding values if the same - SUMIF in range of cells? Eisaz Excel Worksheet Functions 4 November 18th 08 05:05 AM
sumif for a range of values Jason Excel Discussion (Misc queries) 3 January 26th 07 02:31 PM
using sumif to sum a range of values highwayman Excel Worksheet Functions 4 January 18th 07 06:02 PM
Selecting values from a range that equal a specific total Matt UK Excel Worksheet Functions 4 November 25th 06 09:42 PM


All times are GMT +1. The time now is 12:29 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"