ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   sum if and sum if (https://www.excelbanter.com/excel-discussion-misc-queries/197147-sum-if-sum-if.html)

lleytte

sum if and sum if
 
I'd like to sum if two conditions are met. Here's what I've tried, but didn't
work.
=SUM(IF(E1275:E1299,A16,AN1275:AN1299)*(G1275:G129 9,A14,AN1275:AN1299))

I also tried
=SUMIF(E1275:E1299,A16,AN1275:AN1299)*(G1275:G1299 ,A14,AN1275:AN1299)

My final attempt
=sum(if(E1275:E1299=A16)*(G1275:G1299=A14),AN1275: AN1299,false)

all I get is #VALUE? or #NAME? or it doesn't accept

Can someone tell me what I'm doing wrong? Thanks.

Pete_UK

sum if and sum if
 
Slight amendment to your final attempt:

=SUM(IF((E1275:E1299=A16)*(G1275:G1299=A14),AN1275 :AN1299))

then commit using Ctrl-Shift-Enter instead of the usual <Enter,
because this is an array formula.

Hope this helps.

Pete

On Jul 31, 11:19*pm, lleytte
wrote:
I'd like to sum if two conditions are met. Here's what I've tried, but didn't
work.
=SUM(IF(E1275:E1299,A16,AN1275:AN1299)*(G1275:G129 9,A14,AN1275:AN1299))

I also tried
=SUMIF(E1275:E1299,A16,AN1275:AN1299)*(G1275:G1299 ,A14,AN1275:AN1299)

My final attempt
=sum(if(E1275:E1299=A16)*(G1275:G1299=A14),AN1275: AN1299,false)

all I get is *#VALUE? or #NAME? or it doesn't accept

Can someone tell me what I'm doing wrong? Thanks.



lleytte

sum if and sum if
 
I'm actually using it between sheets in a workbook so I input
=sum(if(('Jul ''08'!E1275:E1299='SPC Report'!A16)*('Jul
''08'!G1275:G1299='SPC Report'!'SPC Report'!A14),'Jul ''08'!AX1275:AX1299))

then commit, but it doesn't accept the formula.

Does it not work this way?


"Pete_UK" wrote:

Slight amendment to your final attempt:

=SUM(IF((E1275:E1299=A16)*(G1275:G1299=A14),AN1275 :AN1299))

then commit using Ctrl-Shift-Enter instead of the usual <Enter,
because this is an array formula.

Hope this helps.

Pete

On Jul 31, 11:19 pm, lleytte
wrote:
I'd like to sum if two conditions are met. Here's what I've tried, but didn't
work.
=SUM(IF(E1275:E1299,A16,AN1275:AN1299)*(G1275:G129 9,A14,AN1275:AN1299))

I also tried
=SUMIF(E1275:E1299,A16,AN1275:AN1299)*(G1275:G1299 ,A14,AN1275:AN1299)

My final attempt
=sum(if(E1275:E1299=A16)*(G1275:G1299=A14),AN1275: AN1299,false)

all I get is #VALUE? or #NAME? or it doesn't accept

Can someone tell me what I'm doing wrong? Thanks.




Pete_UK

sum if and sum if
 
Try it like this:

=sum(if(('Jul 08'!E1275:E1299='SPC Report'!A16)*('Jul 08'!
G1275:G1299='SPC Report'!'SPC Report'!A14),'Jul 08'!AX1275:AX1299))

You had two apostrophes between your sheet name for Jul 08. Use CSE to
commit.

Hope this helps.

Pete

On Aug 1, 12:00*am, lleytte wrote:
I'm actually using it between sheets in a workbook so I input
=sum(if(('Jul ''08'!E1275:E1299='SPC Report'!A16)*('Jul
''08'!G1275:G1299='SPC Report'!'SPC Report'!A14),'Jul ''08'!AX1275:AX1299))

then commit, but it doesn't accept the formula.

Does it not work this way?



"Pete_UK" wrote:
Slight amendment to your final attempt:


=SUM(IF((E1275:E1299=A16)*(G1275:G1299=A14),AN1275 :AN1299))


then commit using Ctrl-Shift-Enter instead of the usual <Enter,
because this is an array formula.


Hope this helps.


Pete


On Jul 31, 11:19 pm, lleytte
wrote:
I'd like to sum if two conditions are met. Here's what I've tried, but didn't
work.
=SUM(IF(E1275:E1299,A16,AN1275:AN1299)*(G1275:G129 9,A14,AN1275:AN1299))


I also tried
=SUMIF(E1275:E1299,A16,AN1275:AN1299)*(G1275:G1299 ,A14,AN1275:AN1299)


My final attempt
=sum(if(E1275:E1299=A16)*(G1275:G1299=A14),AN1275: AN1299,false)


all I get is *#VALUE? or #NAME? or it doesn't accept


Can someone tell me what I'm doing wrong? Thanks.- Hide quoted text -


- Show quoted text -



Max

sum if and sum if
 
Think you had some typos/extra bits in your expression

I managed to get Excel to accept this cleaned up expression,
array-entered (press CTRL+SHIFT+ENTER):
=SUM(IF(('Jul ''08'!E1275:E1299='SPC Report'!A16)*('Jul
''08'!G1275:G1299='SPC Report'!A14),'Jul ''08'!AX1275:AX1299))

It assumes of course, that you have 2 other sheets named:
SPC Report
Jul '08
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:16,400 Files:356 Subscribers:53
xdemechanik
---
"lleytte" wrote:
I'm actually using it between sheets in a workbook so I input
=sum(if(('Jul ''08'!E1275:E1299='SPC Report'!A16)*('Jul
''08'!G1275:G1299='SPC Report'!'SPC Report'!A14),'Jul ''08'!AX1275:AX1299))

then commit, but it doesn't accept the formula.

Does it not work this way?




All times are GMT +1. The time now is 02:16 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com