SUMIF Statament Across Columns

DaveMitch

New Member
Joined
Jun 19, 2015
Messages
20
Hi,

Not sure if I'm being a bit thick, but I'm not sure if I'm using SUMIF in the correct way to achieve what I need.

What I have is this: =SUMIF(J44,"Y",K44:M44)

...where column J either has a 'Y' or a 'N' in and K44:M44 has a number in it; like this it returns, -

If I change K44:M44 to a single cell it adds it up! I thought I understood how SUMIF works, but clearly not; can someone help give me illumination.

Many thanks in advance.
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
In the SUMIF both your criteria and sum range need to be the same size / length.
Try:
Code:
=IF(OR(J44={"Y","N"}),SUM(K44:M44),"")
 
Upvote 0
Solution
Hi AhoyNC,

Sorry for the delay in feedback. Many thanks for this solution, it works perfectly. Most importantly, thank you for explaining SUMIF, I never knew that, it will help prevent similar frustrations in the future!

Having looked up what OR does I can read your formula, apart from the use of { }, I don't know what that type of brackets do?

Many thanks again.
 
Upvote 0
You're welcome. I just used the{} to shorten the formula a little.
OR(J44={"Y","N"}) is the same as OR(J44="Y",J44="N")
 
Upvote 0

Forum statistics

Threads
1,215,507
Messages
6,125,212
Members
449,214
Latest member
mr_ordinaryboy

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