#1   Report Post  
Posted to microsoft.public.excel.misc
Kim Kim is offline
external usenet poster
 
Posts: 284
Default sumif or sumproduct

hello,

if i have 4 columns like this:
3 3500 2 10
5 2000 4 35
5 4000 5 12
3 1100 1 5
3 5000 0 8
5 6000 0 25
5 7000 8 15

i want to get The sum of column D minus column C if they met 2 criteria: if
it is equal 3 on column A, and between 2000 to 4000 of column B, which
formula should i use? Please help. thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default sumif or sumproduct

Try this:

=SUMPRODUCT(--(A1:A7=3),--(B1:B72000),--(B1:B7<4000),D1:D7-C1:C7)

Based on your sample data the result is 8.


--
Biff
Microsoft Excel MVP


"kim" wrote in message
...
hello,

if i have 4 columns like this:
3 3500 2 10
5 2000 4 35
5 4000 5 12
3 1100 1 5
3 5000 0 8
5 6000 0 25
5 7000 8 15

i want to get The sum of column D minus column C if they met 2 criteria:
if
it is equal 3 on column A, and between 2000 to 4000 of column B, which
formula should i use? Please help. thanks



  #3   Report Post  
Posted to microsoft.public.excel.misc
Kim Kim is offline
external usenet poster
 
Posts: 284
Default sumif or sumproduct


it works. thanks so much

"T. Valko" wrote:

Try this:

=SUMPRODUCT(--(A1:A7=3),--(B1:B72000),--(B1:B7<4000),D1:D7-C1:C7)

Based on your sample data the result is 8.


--
Biff
Microsoft Excel MVP


"kim" wrote in message
...
hello,

if i have 4 columns like this:
3 3500 2 10
5 2000 4 35
5 4000 5 12
3 1100 1 5
3 5000 0 8
5 6000 0 25
5 7000 8 15

i want to get The sum of column D minus column C if they met 2 criteria:
if
it is equal 3 on column A, and between 2000 to 4000 of column B, which
formula should i use? Please help. thanks




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default sumif or sumproduct

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"kim" wrote in message
...

it works. thanks so much

"T. Valko" wrote:

Try this:

=SUMPRODUCT(--(A1:A7=3),--(B1:B72000),--(B1:B7<4000),D1:D7-C1:C7)

Based on your sample data the result is 8.


--
Biff
Microsoft Excel MVP


"kim" wrote in message
...
hello,

if i have 4 columns like this:
3 3500 2 10
5 2000 4 35
5 4000 5 12
3 1100 1 5
3 5000 0 8
5 6000 0 25
5 7000 8 15

i want to get The sum of column D minus column C if they met 2
criteria:
if
it is equal 3 on column A, and between 2000 to 4000 of column B, which
formula should i use? Please help. thanks






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? sumif(sumproduct)? David Excel Worksheet Functions 3 July 13th 07 07:06 PM
sumif or sumproduct Jim Excel Worksheet Functions 2 January 6th 06 01:02 PM
SUMPRODUCT or SUMIF nfbelo Excel Worksheet Functions 2 May 24th 05 07:18 PM
sumif vs sumproduct ww Excel Worksheet Functions 2 April 5th 05 02:19 AM
Sumif or Sumproduct Justine Burn via OfficeKB.com Excel Worksheet Functions 4 March 11th 05 12:42 AM


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