Counting

leimst

New Member
Joined
Mar 11, 2011
Messages
16
I have a spread with Store #, Acct. #, and Date columns. I am looking for a way to look at the data in each row and count the number of times that particular Store #, and Acct. # combination occurs throughout the spreadsheet and within 5 days of the date shown in that row. I am familiar with the COUNTIFS function and as an example was using COUNTIFS(A$2:A$100,A2,B$2:B$100,B2,C$2:C$100,C2) where B is the Date column but don't know how to check a 5 day range of dates instead of just the single B2 date. Is this doable?

Thank you in advance for any help!
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Welcome to the board. First rule, yes you can do almost any theoretical calculation with Excel. If you can think it, sooner or later you can write a formula / macro for it

For this, you should be able to use the following:
Code:
=COUNTIFS(A$2:A$100,A2,B$2:B$100,">="&B2,B$2:B$100,"<"&B2+5,C$2:C$100,C2)
 
Upvote 0

Forum statistics

Threads
1,224,542
Messages
6,179,424
Members
452,914
Latest member
echoix

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