Formula help requested

cjlittlet

New Member
Joined
Dec 2, 2021
Messages
11
Office Version
  1. 365
Platform
  1. Windows
I need help coming up with formulas pretty please.

Backstory: I have to determine the number of weeks (already got help with that) that fall in a specific period and the start and stop dates. We have 4 programs the person could get coverage under, based on when they filed I need to know how many weeks in each program (with start-stop dates) they qualify for. The only thing I could think of was x's next to the date if it's in that range then create a formal that finds the first and last x and displays the start-stop dates.

Open to advise on ways to do this better.

For Example:
Client was covered from 12.26.20 - 6.26.21
Program dates weeks covered
P1: 4.4.20 - 7.25.20 none
P2: 8.1.20 - 9.5.20 none
P3: 1.2.21 - 3.13.21 1.2.21 - 3.13.21
P4: 3.20.21 - 6.26.21 3.20.21 - 6.26.21

dates12.26.2006.26.21
Column1Column2
04.04.20fromto
04.11.20
04.18.20
04.25.20
05.02.20
05.09.20
05.16.20
05.23.20
05.30.20
06.06.20
06.13.20
06.20.20
06.27.20
07.04.20
07.11.20
07.18.20
07.25.20
Column1Column2
08.01.20fromto
08.08.20
08.15.20
08.22.20
08.29.20
09.05.20
09.12.20
Column1Column2
01.02.21xfromto
01.09.21x
01.16.21x
01.23.21x
01.30.21x
02.06.21x
02.13.21x
02.20.21x
02.27.21x
03.06.21x
03.13.21x
Column1Column2
03.20.21xfromto
03.27.21x
04.03.21x
04.10.21x
04.17.21x
04.24.21x
05.01.21x
05.08.21x
05.15.21x
05.22.21x
05.29.21x
06.05.21x
06.12.21x
06.19.21x
06.26.21x
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
I'm not quite sure what you're looking for, but maybe:

Book1
ABCD
1
2dates12/26/20206/26/2021
3
4Column1Column2 
54/4/2020fromto
64/11/2020
74/18/2020
84/25/2020
95/2/2020
105/9/2020
115/16/2020
125/23/2020
135/30/2020
146/6/2020
156/13/2020
166/20/2020
176/27/2020
187/4/2020
197/11/2020
207/18/2020
217/25/2020
22Column1Column2 
238/1/2020fromto
248/8/2020
258/15/2020
268/22/2020
278/29/2020
289/5/2020
299/12/2020
30Column1Column21/2/20213/13/2021
311/2/2021xfromto
321/9/2021x
331/16/2021x
341/23/2021x
351/30/2021x
362/6/2021x
372/13/2021x
382/20/2021x
392/27/2021x
403/6/2021x
413/13/2021x
42Column1Column23/20/20216/26/2021
433/20/2021xfromto
443/27/2021x
454/3/2021x
464/10/2021x
474/17/2021x
484/24/2021x
495/1/2021x
505/8/2021x
515/15/2021x
525/22/2021x
535/29/2021x
546/5/2021x
556/12/2021x
566/19/2021x
576/26/2021x
Sheet17
Cell Formulas
RangeFormula
C4:D4C4=IFERROR(AGGREGATE({15,14},6,IF((A5:A21>=B2)*(A5:A21<=C2),A5:A21),1),"")
C22:D22C22=IFERROR(AGGREGATE({15,14},6,IF((A23:A29>=B2)*(A23:A29<=C2),A23:A29),1),"")
C30:D30C30=IFERROR(AGGREGATE({15,14},6,IF((A31:A41>=B2)*(A31:A41<=C2),A31:A41),1),"")
C42:D42C42=IFERROR(AGGREGATE({15,14},6,IF((A43:A57>=B2)*(A43:A57<=C2),A43:A57),1),"")
Dynamic array formulas.
 
Upvote 0
Solution

Forum statistics

Threads
1,214,982
Messages
6,122,581
Members
449,089
Latest member
Motoracer88

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