Count the number of cells until a value is reached w/multiple criteria

Degausser124

New Member
Joined
Jun 14, 2022
Messages
5
Office Version
  1. 2021
Platform
  1. Windows
Hi!

First, big thanks to everyone who helps on this forum. I reference this board at least weekly and I'd be lost without you all.

Attached is a dumbed down version of my file. What I'm looking to do is:
  • Count the number of cells in the range D:K starting with Row 3 where the following 2 conditions are met:
    • Start counting in the during the starting week (Column B)
    • AND Stop counting when the headcount (Column A) is achieved
  • Column C is where the formula will live
Screenshot for MrExcel.png


Example:
  • Row 3: I want to know how many weeks it takes to meet or exceed 100 headcount (A3), starting with week 2 (B3)
    • Answer: Should be 5 because it starts with E3, counts that week and stops at I3

I'm pretty sure this is a combo of a COUNTIFS and Index Match but for some reason I just can't get it right.

Thanks so much!
 
OK, good...that's the version that returns the column index (week number) where headcount is met if it occurs before the "start" week...otherwise, the formula returns the number of weeks counted beginning with the start week up until the headcount is met.
 
Upvote 0

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.

Forum statistics

Threads
1,224,828
Messages
6,181,201
Members
453,022
Latest member
RobertV1609

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