Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 561
Default SUMPRODUCT with OR condition

There is no need for double multiplying C2:C10.
You can use a shorter formula:
=SUMPRODUCT(((A2:A10="Bob")+(A2:A10<"Bob")*(B2:B1 0="Feb-10"))*C2:C10)
Micky


"Michael_R" wrote:

I have the following table:

Name Month Sales
Mike Feb-10 1
Bob Mar-10 2
Alex Mar-10 4
Bob Mar-10 8
Bob Feb-10 16

In order to get all sales of Bob plus all sales (by anybody else) in Feb-10
(result = 27), I devised the following formula:

=SUMIF(Name,"Bob",Sales)+SUMPRODUCT((Name<"Bob")* (Month="Feb-10"),Sales)

Question:
Is there a (simple) way to produce the required result using only one
SUMPRODUCT ie getting rid of the SUMIF?

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 18
Default SUMPRODUCT with OR condition

Micky, this is an amazing formula. Thanks!

"מיכאל (מיקי) אבידן" wrote:

There is no need for double multiplying C2:C10.
You can use a shorter formula:
=SUMPRODUCT(((A2:A10="Bob")+(A2:A10<"Bob")*(B2:B1 0="Feb-10"))*C2:C10)
Micky


"Michael_R" wrote:

I have the following table:

Name Month Sales
Mike Feb-10 1
Bob Mar-10 2
Alex Mar-10 4
Bob Mar-10 8
Bob Feb-10 16

In order to get all sales of Bob plus all sales (by anybody else) in Feb-10
(result = 27), I devised the following formula:

=SUMIF(Name,"Bob",Sales)+SUMPRODUCT((Name<"Bob")* (Month="Feb-10"),Sales)

Question:
Is there a (simple) way to produce the required result using only one
SUMPRODUCT ie getting rid of the SUMIF?

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
Sumproduct with Condition OR Sumproduct with ADDRESS function - HE gholly Excel Discussion (Misc queries) 2 September 28th 09 05:07 PM
Sumproduct 'Or' Condition pdberger Excel Worksheet Functions 2 December 28th 07 10:56 PM
SUMPRODUCT with an IF condition? FARAZ QURESHI Excel Discussion (Misc queries) 4 May 5th 07 05:31 AM
Sumproduct: condition with ? Sarah Excel Discussion (Misc queries) 3 November 1st 06 06:33 PM
Sumproduct with condition??? neda5 Excel Discussion (Misc queries) 5 December 14th 05 02:09 AM


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