Excel EXCEL SUMIF / OR

Joined
Feb 12, 2014
Messages
3
Reaction score
0
Hello,

I need help with an excel formula :
I need to do something like : If in column E, there's "X" or "Y", then do the sum in column G.

HOW can i do ?? :)
Thx
 
Joined
Feb 12, 2014
Messages
3
Reaction score
0
Don't have a simple excel formula instead ?
I got a 26 000 lines tab, don't want to create an account or whatever :)

thx
 
Joined
Mar 20, 2012
Messages
764
Reaction score
4
Code:
=countif(e1:e26000,"X")+countif(e1:e26000,"Y")

The above will basically individually count the number of X's and Y's and then add the totals together from the range. You can change the range specified to fit your exact list of data.
 
Joined
Feb 12, 2014
Messages
3
Reaction score
0
Thx but it's not what i need...

I need either one condition or the either is true, then do the action.
But if both are true in the same case i don't want double count...

Basically,

If there's a X or a Y in this columns, then do this action.
(But if there's X and Y in the same case, don't do the action twice !)
 
Joined
Mar 20, 2012
Messages
764
Reaction score
4
Ah. I misread your initial posting. Let me think try a few things out and get back to you with a response as soon as I can.
 
Joined
Jul 21, 2012
Messages
8
Reaction score
0
Try

Code:
=SUMPRODUCT(--(E:E="X")+(E:E="Y"),G:G)

I am using the entire columns for this example, this slows down the calculation time, try to use a range of cells.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top