COUNTIF Function

leimst

New Member
Joined
Mar 11, 2011
Messages
16
Good Morning,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
<o:p></o:p>
I have a scenario where I would like to “Approve” or “Decline” checks based on allowing 3 checks to be written in any 2 day rolling period. Consequently, I would like Excel to look at each row, check previous dates (assuming sheet is sorted by date) checking back as many rows as necessary and keep a running tally of how many checks have been written in the last 2 days. Then the “Approve” or “Decline” decision would be based on whether the Running Total was >3.<o:p></o:p>
<o:p> </o:p>
I’ve experimented with the COUNTIFS function but in this scenario, it would result in a “6” in the Running Total column for the 3/15 and 3/16 dates.<o:p></o:p>
<o:p> </o:p>
Criteria: 3 checks with any 2 day rolling period.<o:p></o:p>
<o:p></o:p>
Date Running Total Result Comments<o:p></o:p>
3/15 1 Approved<o:p></o:p>
3/15 2 Approved<o:p></o:p>
3/15 3 Approved<o:p></o:p>
3/15 4 Declined Only 3 checks allowed in 2 days<o:p></o:p>
3/16 5 Declined<o:p></o:p>
3/16 6 Declined<o:p></o:p>
3/17 1 Approved Apprvd since prev 2 on 3/16 Declined<o:p></o:p>
3/18 2 Approved<o:p></o:p>
3/19 2 Approved<o:p></o:p>
3/19 3 Approved<o:p></o:p>
3/20 3 Approved

Thanks in advance for any help!!

Brian
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Last edited:
Upvote 0
I do have 2010 so I used the COUNTIFS function and it worked great!!! Thank you very much! I've looked at that til my head hurt and your solution seemed quite simple.

Thanks again!
 
Upvote 0

Forum statistics

Threads
1,224,527
Messages
6,179,348
Members
452,907
Latest member
Roland Deschain

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