COUNTIF during date range

sdking

New Member
Joined
Oct 15, 2021
Messages
4
Office Version
  1. 2013
Platform
  1. Windows
Hi

Apologies if this has been asked before. I have an audit of test results.

Column A is names.
Row 1 is dates from 1st Jan to 31st Dec.

Pupils have test results on different dates, marks out of 100.

What I would like to do is count the number of results per student row within the last 14 days. Is there a COUNTIF(s), MATCH, HLOOKUP, MATCH -type formula I can use?

Thank you!!

S
 

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.
Welcome to the MrExcel forum!

Maybe:

Book1 (version 1).xlsb
ABCDEFGHIJKLMNOPQ
110/1/202110/2/202110/3/202110/4/202110/5/202110/6/202110/7/202110/8/202110/9/202110/10/202110/11/202110/12/202110/13/202110/14/202110/15/202110/16/2021
2A111111111
3B2222222
4C1111111
5D111111
6E11111111
7F11111111111
8G11111111
9
10Scores in last 14 days
11A8
12B7
13C7
14D5
15E8
16F10
17G8
Sheet26
Cell Formulas
RangeFormula
B11:B17B11=COUNTIFS(INDEX($B$2:$Z$8,MATCH(A11,$A$2:$A$8,0),0),">0",$B$1:$Z$1,">="&TODAY()-14,$B$1:$Z$1,"<="&TODAY())
 
Upvote 0
Thanks so much for that!

It worked when I played around with it (adding in extra columns/rows) but as soon as I copied in my actual data from a separate spreadsheet it gives 0 for every row when it's definitely not a 0. Do you know what sort of thing could cause this? I've tried changing the cells between Number, Text, General etc. but nothing really seems to be doing anything.
 
Upvote 0
Welcome to the MrExcel Message Board!

Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: COUNTIFS returning 0 for every row
If you have posted the question at more places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0

Forum statistics

Threads
1,213,563
Messages
6,114,332
Members
448,566
Latest member
Nickdozaj

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