How to use COUNTIFS in between "current week" and "the specified week"?

Rnkhch

Well-known Member
Joined
Apr 28, 2018
Messages
528
Office Version
  1. 365
Platform
  1. Windows
Hello,

In my tables of scores, I sometimes need to know how many times each student had scores that were below or above a particular score or within a certain range. (It's a growing table such that each week I add a new column at where column B is.) All weeks are indicated per column by the Friday of that week.

I came up with this formula below that counts the scores meeting the criteria for each student. However, this formula scans the entire row:

=COUNTIFS(5:5,">80",5:5,"<100")

And if I specify a range, then I have to manually update the formulas each week because of addition of a new column each week:

=COUNTIFS(B5:AF5,">80",B5:AF5,"<100")

Given that my columns have the week identifier, is there any way I can specify a date range for my formula such that the beginning week of the range is the "current week" and the end week of the range is a week number I specify in a cell as shown below? In this example, I want the formula to scan 20 weeks starting from the current week:


begin:current week
end:20
8/10/20188/3/20187/27/20187/20/2018etc.
student187917279
student298979092
student38736582
etc.

<tbody>
</tbody>


Thanks a lot for any input!
 
Oh yes, I should have thought of that :)

Thanks for all the help! I have an amazing tool now to analyze my scores :) I'll reach out if I think of cool additions :)
 
Last edited:
Upvote 0

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Hi Peter,

I don't actually need this for my analysis, but I just thought of it the other day and tried to solve it myself, but have had no luck so far :) so I thought to reach out :)

If I ever wanted to get the standard deviation of the scores in your post #28 (which is the average of all scores between specified date range and min and max range), how can it be done? If there was an "STDEVIFS" function, it would have been super easy :) but since that doesn't exist, I tried to use IF, but kept getting errors.

Thanks a lot!
 
Upvote 0
If the number of students is not too large, you could consider this set of alternative formulas. They use the volatile function OFFSET, which is why I mentioned the number of students. If volatile functions are used too prolifically in your worksheet, it can cause the worksheet's calculation to slow significantly. Anyway, give it a go if you want as the formulas are a bit shorter to read/write.

My 'Scores' sheet is as shown in post 20.

'Analysis' has a new helper cell in C1. All other formulas are copied down.

Excel Workbook
ABCDEFG
1Begning Date10/08/20181
2Weeks (+/-)3
3Closing Date27/07/2018
4Min80
5Max100
6
7IdxCount"Between" AvAll AvStdDev
8student330 48.66666728.940552
9student11390900
10student4
11student2219979.66666713.670731
Analysis
 
Upvote 0

Forum statistics

Threads
1,215,459
Messages
6,124,947
Members
449,198
Latest member
MhammadishaqKhan

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