Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 661
Default Sumif or sumproduct

Hi,

Newbie question: On sheet 2, I have a table from A1:K5000:

A (Project ID) B (Department) ....... K (Sum of hours)
abc art 15
bac prog 22
cba art 32

On sheet 1, I'm creating a sumup table and want to sum automatically the
hours from column K on sheet 2 from two criterias that i choose in sheet 1.

Sum all hours from project ABC of the art department from the data of Sheet 2:

Tried many things
like...=SUMPRODUCT(Sheet2!A2:K10001=A7,Sheet1!H7,S heet2!K2:K10001) but it
doesn't work.

Please help...thxs in advance.

Paul
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,339
Default Sumif or sumproduct

Assuming this is on Sheet1 with A & B also on Sheet1: if not add sheet prefix
as per last array item:

=sumproduct(--(A1:a5000="abc"),--(b1:b5000="art"),--(sheet2!k1:k5000))

You can replace "abc" and "art" by cells which contain "abc" and "art"

=sumproduct(--(A1:a5000=H1),--(b1:b5000=M1),--(sheet2!k1:k5000))

h1="abc"
M1="art"

hth

"Paul" wrote:

Hi,

Newbie question: On sheet 2, I have a table from A1:K5000:

A (Project ID) B (Department) ....... K (Sum of hours)
abc art 15
bac prog 22
cba art 32

On sheet 1, I'm creating a sumup table and want to sum automatically the
hours from column K on sheet 2 from two criterias that i choose in sheet 1.

Sum all hours from project ABC of the art department from the data of Sheet 2:

Tried many things
like...=SUMPRODUCT(Sheet2!A2:K10001=A7,Sheet1!H7,S heet2!K2:K10001) but it
doesn't work.

Please help...thxs in advance.

Paul

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Sumif or sumproduct

=SUMPRODUCT((Sheet2!A2:K10001=A7)*(Sheet2!B2:B1000 1=H7)*(Sheet2!K2:K10001))
--
HTH...

Jim Thomlinson


"Paul" wrote:

Hi,

Newbie question: On sheet 2, I have a table from A1:K5000:

A (Project ID) B (Department) ....... K (Sum of hours)
abc art 15
bac prog 22
cba art 32

On sheet 1, I'm creating a sumup table and want to sum automatically the
hours from column K on sheet 2 from two criterias that i choose in sheet 1.

Sum all hours from project ABC of the art department from the data of Sheet 2:

Tried many things
like...=SUMPRODUCT(Sheet2!A2:K10001=A7,Sheet1!H7,S heet2!K2:K10001) but it
doesn't work.

Please help...thxs in advance.

Paul

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 510
Default Sumif or sumproduct

Hi Paul,

....=SUMPRODUCT(--(Sheet2!A2:K10001=A7),--(Sheet1!H2:H10001),Sheet2!K2:K10001)

Watch 2 things ...
1. Range criteria of column H should be of the same size as other
ranges ...
2. When referring to non numeric columns, use the unary operator --

HTH
Cheers
Carim

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Sumif or sumproduct


Try

=SUMPRODUCT(--(Sheet2!A2:A10001="abc"),--(Sheet2!B2:B10001="art"),Sheet2!K2:K10001)


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=532748



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 or SumProduct DS Excel Discussion (Misc queries) 2 September 22nd 09 08:12 PM
sumproduct or sumif Rick Excel Discussion (Misc queries) 1 October 9th 08 03:37 AM
Sumif or Sumproduct Steve Excel Worksheet Functions 1 February 4th 06 08:43 PM
SUMPRODUCT or SUMIF nfbelo Excel Worksheet Functions 2 May 24th 05 07:18 PM
SUMPRODUCT or SUMIF or ... nfbelo Excel Worksheet Functions 4 May 24th 05 06:34 PM


All times are GMT +1. The time now is 04:00 AM.

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

About Us

"It's about Microsoft Excel"