ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   SumIf with 2 ctiteria (https://www.excelbanter.com/excel-programming/372530-sumif-2-ctiteria.html)

Jimbo[_4_]

SumIf with 2 ctiteria
 
I need to sum the values in Column K if the values in Column D AND Column E
meet different criteria

e.g. Sum of values in Col K .... only if corresponding values Col D =
value_1 and Col E = value_2

Please post relevant vbacode

Thanks & TIA



moon[_6_]

SumIf with 2 ctiteria
 

No relevant VBA-code is required since 2 criteria in a SUMIF can be done
with a so called CSE formula.
It's all he http://www.mrexcel.com/tip031.shtml




"Jimbo" schreef in bericht
...
I need to sum the values in Column K if the values in Column D AND Column E
meet different criteria

e.g. Sum of values in Col K .... only if corresponding values Col D =
value_1 and Col E = value_2

Please post relevant vbacode

Thanks & TIA




Jimbo[_4_]

SumIf with 2 ctiteria
 
Thank you for your response but I would like to use vba code to determine
the value

"moon" <6369706865725F6475646540706C616E65742E6E6C wrote in message
. ..

No relevant VBA-code is required since 2 criteria in a SUMIF can be done
with a so called CSE formula.
It's all he http://www.mrexcel.com/tip031.shtml




"Jimbo" schreef in bericht
...
I need to sum the values in Column K if the values in Column D AND Column
E meet different criteria

e.g. Sum of values in Col K .... only if corresponding values Col D =
value_1 and Col E = value_2

Please post relevant vbacode

Thanks & TIA






Bob Phillips

SumIf with 2 ctiteria
 
myVal =
ActiveSheet.Evaluate("=SUMPRODUCT(--(D1:D1000=""value_1""),--(E1:E1000=""val
ue_2""))")


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Jimbo" wrote in message
...
I need to sum the values in Column K if the values in Column D AND Column

E
meet different criteria

e.g. Sum of values in Col K .... only if corresponding values Col D =
value_1 and Col E = value_2

Please post relevant vbacode

Thanks & TIA





Jimbo[_4_]

SumIf with 2 ctiteria
 
Thanks Bob,
I don't follow the syntax of the code you supplied ... where doe I specify
the values to be summated i.e. Column K
can you enlighten me or point me to a url for an explanation of the syntax
Regards
Jim Burton

"Bob Phillips" wrote in message
...
myVal =
ActiveSheet.Evaluate("=SUMPRODUCT(--(D1:D1000=""value_1""),--(E1:E1000=""val
ue_2""))")


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Jimbo" wrote in message
...
I need to sum the values in Column K if the values in Column D AND Column

E
meet different criteria

e.g. Sum of values in Col K .... only if corresponding values Col D =
value_1 and Col E = value_2

Please post relevant vbacode

Thanks & TIA







Bob Phillips

SumIf with 2 ctiteria
 
myVal =
ActiveSheet.Evaluate("=SUMPRODUCT(--(D1:D1000=""value_1""),--(E1:E1000=""val
ue_2""),K1:K1000)")


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Jimbo" wrote in message
...
Thanks Bob,
I don't follow the syntax of the code you supplied ... where doe I specify
the values to be summated i.e. Column K
can you enlighten me or point me to a url for an explanation of the syntax
Regards
Jim Burton

"Bob Phillips" wrote in message
...
myVal =

ActiveSheet.Evaluate("=SUMPRODUCT(--(D1:D1000=""value_1""),--(E1:E1000=""val
ue_2""))")


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Jimbo" wrote in message
...
I need to sum the values in Column K if the values in Column D AND

Column
E
meet different criteria

e.g. Sum of values in Col K .... only if corresponding values Col D =
value_1 and Col E = value_2

Please post relevant vbacode

Thanks & TIA









Jimbo[_4_]

SumIf with 2 ctiteria
 
Many Many Thanks
Works exactly as I require

"Bob Phillips" wrote in message
...
myVal =
ActiveSheet.Evaluate("=SUMPRODUCT(--(D1:D1000=""value_1""),--(E1:E1000=""val
ue_2""),K1:K1000)")


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Jimbo" wrote in message
...
Thanks Bob,
I don't follow the syntax of the code you supplied ... where doe I
specify
the values to be summated i.e. Column K
can you enlighten me or point me to a url for an explanation of the
syntax
Regards
Jim Burton

"Bob Phillips" wrote in message
...
myVal =

ActiveSheet.Evaluate("=SUMPRODUCT(--(D1:D1000=""value_1""),--(E1:E1000=""val
ue_2""))")


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Jimbo" wrote in message
...
I need to sum the values in Column K if the values in Column D AND

Column
E
meet different criteria

e.g. Sum of values in Col K .... only if corresponding values Col D =
value_1 and Col E = value_2

Please post relevant vbacode

Thanks & TIA











Tom Ogilvy

SumIf with 2 ctiteria
 
Just a thought,
If you lookup CSE in excel help, do you get a response.

It is non-standard terminology. It would be better to use the correct term
"array formula" so the OP actually learns something that can be communicated
in a discussion with other Excel users.

--
Regards,
Tom Ogilvy

"moon" <6369706865725F6475646540706C616E65742E6E6C wrote in message
. ..

No relevant VBA-code is required since 2 criteria in a SUMIF can be done
with a so called CSE formula.
It's all he http://www.mrexcel.com/tip031.shtml




"Jimbo" schreef in bericht
...
I need to sum the values in Column K if the values in Column D AND Column
E meet different criteria

e.g. Sum of values in Col K .... only if corresponding values Col D =
value_1 and Col E = value_2

Please post relevant vbacode

Thanks & TIA







All times are GMT +1. The time now is 06:14 PM.

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