Multiple Criteria SUMIF

Smigles

New Member
Joined
Sep 20, 2011
Messages
2
Hi guys.
I've been hunting hi and low for the answer on this but it doesn't appear to be on here, or I can't fully understand how to use it. So if it appears to be duplication, I apologise.

Here's my data...

316265_10150296292786006_728266005_8277353_261343348_n.jpg


So. I want to be able to change A1 and A2 to provide the criteria.
e.g. I want to select "day" as the criteria, I type it into A1, and then want to return results for "Monday"so type this into A2, the solution is 1. Similarly, I could type "year" into A1, and "10" into A2 to get the solution 4. etc.
Now I already have that cracked with a nested IF function. However, when I'm returning the solution I want to only sum negative numbers in the "Results" range.
Any way of doing this?
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Hello Smigles, welcome to MrExcel,

Which version of excel are you using? In Excel 2007 and later versions you can use SUMIFS, i.e.

=SUMIFS(C5:C14,C5:C14,"<0",IF(A1="DAY",A5:A14,B5:B14),A2)

in earlier versions try SUMPRODUCT like this

=SUMPRODUCT(C5:C14,(C5:C14<0)*(IF(A1="DAY",A5:A14,B5:B14)=A2))
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,836
Members
452,947
Latest member
Gerry_F

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