Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default sumif & sumproduct

Hi, can someone help me with the formula to get the total of column C in
sheet 2 if column B in sheet 2 is Y (reference to sheet 1)

sheet 1
A B
1 a Y
2 b Y
3 c N

sheet 2
A B C
1 x a 10
2 x b 15
3 y c 18

thanks
Michelle

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 523
Default sumif & sumproduct

Put this in sheet 2:

=SUMIF(B:B,"Y","C:C")

"MichelleT" wrote:

Hi, can someone help me with the formula to get the total of column C in
sheet 2 if column B in sheet 2 is Y (reference to sheet 1)

sheet 1
A B
1 a Y
2 b Y
3 c N

sheet 2
A B C
1 x a 10
2 x b 15
3 y c 18

thanks
Michelle

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 523
Default sumif & sumproduct

=SUMIF(B:B,"Y",C:C)

Ignore the last one with the typo

"MichelleT" wrote:

Hi, can someone help me with the formula to get the total of column C in
sheet 2 if column B in sheet 2 is Y (reference to sheet 1)

sheet 1
A B
1 a Y
2 b Y
3 c N

sheet 2
A B C
1 x a 10
2 x b 15
3 y c 18

thanks
Michelle

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,766
Default sumif & sumproduct

Hi,

Your question is not clear. Anyway, try this

=sumproduct((sheet2!A1:A3=B1)*(sheet2!B1:B3=A1)*(s heet2!C1:C3))

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"MichelleT" wrote in message
...
Hi, can someone help me with the formula to get the total of column C in
sheet 2 if column B in sheet 2 is Y (reference to sheet 1)

sheet 1
A B
1 a Y
2 b Y
3 c N

sheet 2
A B C
1 x a 10
2 x b 15
3 y c 18

thanks
Michelle

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default sumif & sumproduct

How does the formula identify whether text in column B is Y/N when the
formula does not make any reference to sheet 1

"Sam Wilson" wrote:

=SUMIF(B:B,"Y",C:C)

Ignore the last one with the typo

"MichelleT" wrote:

Hi, can someone help me with the formula to get the total of column C in
sheet 2 if column B in sheet 2 is Y (reference to sheet 1)

sheet 1
A B
1 a Y
2 b Y
3 c N

sheet 2
A B C
1 x a 10
2 x b 15
3 y c 18

thanks
Michelle



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,420
Default sumif & sumproduct

If you are saying there is a cell in Sheet1 with the Y in it, use

=SUMIF(B:B,Sheet1!H1,C:C)


--
__________________________________
HTH

Bob

"MichelleT" wrote in message
...
How does the formula identify whether text in column B is Y/N when the
formula does not make any reference to sheet 1

"Sam Wilson" wrote:

=SUMIF(B:B,"Y",C:C)

Ignore the last one with the typo

"MichelleT" wrote:

Hi, can someone help me with the formula to get the total of column C
in
sheet 2 if column B in sheet 2 is Y (reference to sheet 1)

sheet 1
A B
1 a Y
2 b Y
3 c N

sheet 2
A B C
1 x a 10
2 x b 15
3 y c 18

thanks
Michelle



  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default sumif & sumproduct

e.g total for x is only 25 and not 45 because a & b = Y and C = N in sheet 1
Hope eg explains better

sheet 2
A B C
1 x a 10
2 x b 15
3 y c 18

4 x c 20

"Ashish Mathur" wrote:

Hi,

Your question is not clear. Anyway, try this

=sumproduct((sheet2!A1:A3=B1)*(sheet2!B1:B3=A1)*(s heet2!C1:C3))

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"MichelleT" wrote in message
...
Hi, can someone help me with the formula to get the total of column C in
sheet 2 if column B in sheet 2 is Y (reference to sheet 1)

sheet 1
A B
1 a Y
2 b Y
3 c N

sheet 2
A B C
1 x a 10
2 x b 15
3 y c 18



thanks
Michelle

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 806
Default sumif & sumproduct

Hello Michelle,

Enter into C1 in Sheet2:
=SUMPRODUCT(--("Y"=LOOKUP(A1:A4,Sheet1!A1:A3,Sheet1!B1:B3)),B1:B 4)

Please note that values in Sheet1!A1:A3 have to be sorted in ascending
order.

Regards,
Bernd
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 with SUMPRODUCT WildWill Excel Discussion (Misc queries) 2 September 14th 09 05:01 PM
SUMIF vs SUMPRODUCT Tim Richards Excel Worksheet Functions 2 March 14th 08 06:02 PM
sumif or sumproduct kim Excel Discussion (Misc queries) 3 March 13th 08 06:42 PM
Help for sumif / sumproduct jitu_tikili Excel Worksheet Functions 5 April 4th 06 06:59 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 12:22 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"