Count Specific Queries

ladbroke

Board Regular
Joined
Jun 2, 2006
Messages
175
Office Version
  1. 365
Platform
  1. Windows
I am trying to create a spreadsheet that allows me to track my shifts and my patterns and wish it to count how many days I've had earlies, lates and even days off based on entry.
I have taken a screenshot of Septembers shifts to show what I am trying to do but would love to be able to make the days changeable and it count for me without manually having to do it.

As you can see in the screenshot, I have dates from 1st September until 18th. I have put 14 in AD7 to show I want to count back 14 days from the last entry in cell AA.
I know I could easily make a countif (I think) that counts from a specific cell range but this cell range is fluid as more dates get added. Right now it would be (for 14 days) cell range AA7-AA20 but when I add this weeks current rota, the cells would change to AA27. But on top of that, I may want to make the days searched 21, or reduce it to 7.
Basically, I would like to see AD8 tell me how many E's are in a cell range from bottom upwards determined by how many numbers are written in AD7.
Is that possible?

Untitled.png
 

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.
Try this

Excel Formula:
=SUM(N(OFFSET(AA2,COUNTA(AA3:AA300),,-AD7)="E"))
 
Upvote 0
Solution
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,178
Members
453,021
Latest member
Justyna P

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