Combining Countif formula with an IF(AND formula

willow1985

Well-known Member
Joined
Jul 24, 2019
Messages
713
Office Version
  1. 365
Platform
  1. Windows
I have been using 2 formulas to get the data I need from a spreadsheet and was wondering if there was a way to combine them?

The first formula is on the report itself:

=IF(AND([@[Date Received]]>=GraphData!$B$13,[@[Date Received]]<=GraphData!$B$3),"Yes","No")

in B13 and B3 I have to and From Dates: January 3, 2020 to May 25, 2020 (for example). This formula looks in the Date Received column and flags a "Yes" or a "No" if it falls in between this date range.

On another Sheet I have formula:

COUNTIFS(WOR[[#All],[W/O Number]],"<>",WOR[[#All],[Customer Exclusions]],"<>Exclude"),"")

This counts everything in W/O Number column that is not blank and any item in Customer Exclusions that does not have the word "Exclude"

On this Countif formula I would also like to count any Date Received that falls in between the specified date range above.
Currently I could add one more condition to the CountIf formula to count anything that says "Yes" in the column AM where I have the IF(AND formula But I do not want to do this.

I will be having a lot of conditions similar to this IF(AND one so it would make the spreadsheet a lot smaller if I could somehow combine the 2 formulas...

I hope I am being clear...

I attached a picture of the sheets, hope this helps.

Thank you to anyone who can help! :)
 

Attachments

  • Count if formula.jpg
    Count if formula.jpg
    240.8 KB · Views: 15

Some videos you may like

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.

DanteAmor

Well-known Member
Joined
Dec 3, 2018
Messages
12,618
Office Version
  1. 2007
Platform
  1. Windows
How about:

=COUNTIFS(WOR[[#All],[W/O Number]],"<>",WOR[[#All],[Customer Exclusions]],"<>Exclude",WOR[[#All],[Date Received]],">="&GraphData!B13,WOR[[#All],[Date Received]],"<="&GraphData!B3)
 

willow1985

Well-known Member
Joined
Jul 24, 2019
Messages
713
Office Version
  1. 365
Platform
  1. Windows
This appears to be exactly what I am looking for. I never thought to add it like this... Thank you very much!
 

DanteAmor

Well-known Member
Joined
Dec 3, 2018
Messages
12,618
Office Version
  1. 2007
Platform
  1. Windows
I'm glad to help you. Thanks for the feedback.
 

Watch MrExcel Video

Forum statistics

Threads
1,126,972
Messages
5,621,913
Members
415,865
Latest member
pxmike

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
Top