SUMIF matching 2 cells

LordEvil

New Member
Joined
Oct 20, 2018
Messages
16
Good afternoon all,

I am having a problem as I modified my excel workbook and I am unable to find the sum I'm looking for. I keep getting #Value !

I have dates in cells P1 and P2, start date and end date. This is located on a sheet called Records. I have a datasheet that is full of data from 3 years on a sheet called DataBase in the same workbook.

On my worksheet called "Records" in cell N4 and O4 I have data as shown below.

[TABLE="width: 178"]
<tbody>[TR]
[TD="width: 36"]N4
1st[/TD]
[TD="class: xl67, width: 68"]O4
Press[/TD]
[TD="class: xl68, width: 74, align: center"]P4
#Value ![/TD]
[/TR]
</tbody>[/TABLE]

I'm using this formula =SUMIFS(DataBase!H:H,DataBase!A:A,">="&$P$1,DataBase!A:A,"<="&$P$2,DataBase!S:S,O4)

Originally before I modified the page the text in O4 read "1st press". I now made a new column "N4" where I have "1st" in cell N4 and "Press" in cell O4.
How can I change this formula to have it look for N4 which will be in DataBase S:S, while also matching O4 which is located in DataBase R:R
I will be using the start date and end date as listed in the formula. I'm unsure if I need to use an "and" function or if I need to use some type of MatchIf and Sumif together. Any help would be greatly appreciated.
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Try this

=SUMIFS(DataBase!H:H,DataBase!A:A,">="&$P$1,DataBase!A:A,"<="&$P$2,DataBase!S:S,N4,DataBase!R:R,O4)
 
Upvote 0

Forum statistics

Threads
1,223,950
Messages
6,175,582
Members
452,653
Latest member
craigje92

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