SUM(IF...(IF...(IF.... question

Prodiclson

New Member
Joined
Aug 2, 2008
Messages
5
I am trying to sum a column based on multiple criteria... specifically a column of time (hh:mm:ss) IF the value is greater than 00:30:00 + IF the value in another column (same row) matches a specific text value in another cell + IF the value in another column matches the date... (I hope I explained this OK...??)

I am having some troubles doing this and wa hoping for a little help from some fellow tipsters....
 
I am not looking for a product (multiplication) but a simple sum with multiple conditions (I am not thoughly familiar with the SUMPRODUCT function, so maybe I am off base here)

SUMPRODUCT does multiply and then sum the products but it's simply a means to calculate a sum with multiple conditions. If you get zero then that means that either none of your conditions match...or perhaps your times are text formatted

Does it make any difference if you use this formula?

=SUMPRODUCT(('Data'!D5:D379+0>"0:30"+0)*('Data'!H5:H379=B$1)*('Data'!B5:B379=$A2),'Data'!D5:D379+0)

If that doesn't help then try testing each of the criteria, e.g individually with COUNTIF

=COUNTIF('Data'!D5:D379,">0:30")
=COUNTIF('Data'!H5:H379,B$1)
=COUNTIF('Data'!B5:B379,$A2)
 
Upvote 0

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
I will try both the +0 concept from Mr Houdini and also the 'helper' column.... I had not thought of the helper column before...

I will keep everyone posted to my progress, or lack there of...

Thanks for all the great help so far Gentlemen and Ladies
:)
 
Upvote 0
I know this formula doesn't work (or I got an error that I don't see) but what is the correct solution?

=countif(master!b2:160=1,h2:h160="SOLD")

I'm trying to count the number of times "1" is shown in column "B" only when column "H" has the value "SOLD" in it within the same row......
 
Upvote 0
I know this formula doesn't work (or I got an error that I don't see) but what is the correct solution?

=countif(master!b2:160=1,h2:h160="SOLD")

I'm trying to count the number of times "1" is shown in column "B" only when column "H" has the value "SOLD" in it within the same row......

I had an error within my error :biggrin:
***=countif(master!b2:160=1,master!h2:h160="SOLD")

Try:

=sumproduct((master!b2:160=1)*(h2:h160="SOLD"))

Hope that helps.

No luck
 
Upvote 0
You can also try using an array formula. After you have your formula written, and while you're still in the formula edit bar, hit cntrl+shift+enter. this will enclose the formula in {} and sum on multiple criteria.

={sum(if(A=X,if(B=Y,if(C=Z,SUMRANGE))))}

Steve
 
Upvote 0
So this doesn't work:

=sumproduct((master!b2:160=1)*(master!h2:h160="SOLD"))

Is it maybe a text number 1?

=sumproduct((master!b2:160="1")*(master!h2:h160="SOLD"))
 
Upvote 0
So this doesn't work:

=sumproduct((master!b2:160=1)*(master!h2:h160="SOLD"))

Is it maybe a text number 1?

=sumproduct((master!b2:160="1")*(master!h2:h160="SOLD"))

Nevermind the first one did work..... I had the wrong column for "SOLD" :laugh:

Thanks for the help!
 
Upvote 0

Forum statistics

Threads
1,223,243
Messages
6,170,964
Members
452,371
Latest member
Frana

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top