DATE Range = Each Date in the range.

AudyAnalyst

New Member
Joined
Nov 24, 2021
Messages
20
Office Version
  1. 365
Platform
  1. Windows
Hello,

Is there a formula for extracting all Dates in a given range?

EmployeeStart DateEnd DateDates in between?
AA458703/27/202203/29/2022(03/28/2022)
AA698705/01/202205/20/202205/02, 05/03,05/04,etc....

Any help would be GREATLY appreciated!!!
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Upvote 0
Solution
How about
Cell Formulas
RangeFormula
D2:D3D2=TEXTJOIN(", ",,TEXT(SEQUENCE(,C2-B2-1,B2+1),"dd/mm/yy"))
Thank you for your quick response.
When I tried it I received an Error, "#CALC!", for the one day between, not too critical, but for learning, do you have any advice to improve the formula?
Book5
ABCDE
1Person CodeStart DateEnd DateTotal Working Time Taken (Time Units)Formula Test
2AA548Wednesday, July 21, 2021Friday, July 23, 2021242021-07-22
3AA549Monday, June 20, 2022Friday, June 24, 2022402022-06-21, 2022-06-22, 2022-06-23
4AA550Monday, October 18, 2021Tuesday, October 19, 202116#CALC!
5AA551Monday, May 30, 2022Wednesday, June 1, 2022242022-05-31
6AA552Monday, June 13, 2022Wednesday, June 22, 2022642022-06-14, 2022-06-15, 2022-06-16, 2022-06-17, 2022-06-18, 2022-06-19, 2022-06-20, 2022-06-21
7AA553Wednesday, June 8, 2022Monday, June 13, 2022322022-06-09, 2022-06-10, 2022-06-11, 2022-06-12
8AA554Monday, May 16, 2022Friday, May 27, 2022802022-05-17, 2022-05-18, 2022-05-19, 2022-05-20, 2022-05-21, 2022-05-22, 2022-05-23, 2022-05-24, 2022-05-25, 2022-05-26
9AA555Monday, May 30, 2022Wednesday, June 1, 2022242022-05-31
10AA556Thursday, June 23, 2022Tuesday, June 28, 2022322022-06-24, 2022-06-25, 2022-06-26, 2022-06-27
11AA557Monday, June 13, 2022Friday, June 24, 2022802022-06-14, 2022-06-15, 2022-06-16, 2022-06-17, 2022-06-18, 2022-06-19, 2022-06-20, 2022-06-21, 2022-06-22, 2022-06-23
12AA558Tuesday, May 3, 2022Friday, May 20, 20221122022-05-04, 2022-05-05, 2022-05-06, 2022-05-07, 2022-05-08, 2022-05-09, 2022-05-10, 2022-05-11, 2022-05-12, 2022-05-13, 2022-05-14, 2022-05-15, 2022-05-16, 2022-05-17, 2022-05-18, 2022-05-19
Sheet1
Cell Formulas
RangeFormula
E2:E12E2=TEXTJOIN(", ",,TEXT(SEQUENCE(,C2-B2-1,B2+1),"YYYY-MM-DD"))
 
Last edited:
Upvote 0
What do you want to return if there are no days between the dates?
 
Upvote 0
What do you want to return if there are no days between the dates?
I'm sorry!!!! I didn't even remotely ask the question correctly, (It has been a week). I'm concerned about Saturdays and Sundays, in Row 10 I want the formula to only return Traditional Week Days (Mon-Fri). Is that Possible?
 
Upvote 0
Ok, but what should happen if there are none?
 
Upvote 0
Ok, how about
Excel Formula:
=LET(d,NETWORKDAYS(B2,C2)-2,IF(d=0,"0",TEXTJOIN(", ",,TEXT(WORKDAY(B2,SEQUENCE(,d)),"YYYY-MM-DD"))))
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,940
Messages
6,122,352
Members
449,080
Latest member
Armadillos

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