You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Showing a date range in a cell

Hi everyone, is there a function I can use to show a date range in a cell. For example I want the first cell to show July 12 - Jul 18. the cell under that would show Jul 19 - Jul 25. Only way I can find to do it is to split it over two cells. the first is the start date the second is the end date (which would be A1 + 6)


Thanks in advance

Posted on Jul 13, 2023 2:52 AM

Reply
Question marked as Top-ranking reply

Posted on Jul 14, 2023 6:10 AM

Thought of another way that does not require a starting date cell.


In B2, type the first range Jul 12 - Jul 18


B3 =TEXTBEFORE(B2," -")+7&" - "&TEXTBEFORE(B2," -")+13

fill down from there.


Doubtful this is exportable to Excel but it works in Numbers.


If you want the date ranges to be something other than 7 days, the formula can calculate the number of days in the range.


Type the first range into B2, same as before. Those two dates will determine the number of days.


B3 =TEXTAFTER(B2,"- ")+1&" - "&TEXTAFTER(B2,"- ")+1+STRIPDURATION(TEXTAFTER(B2,"- ")−TEXTBEFORE(B2," -"))


Similar questions

7 replies
Question marked as Top-ranking reply

Jul 14, 2023 6:10 AM in response to ReddishOne

Thought of another way that does not require a starting date cell.


In B2, type the first range Jul 12 - Jul 18


B3 =TEXTBEFORE(B2," -")+7&" - "&TEXTBEFORE(B2," -")+13

fill down from there.


Doubtful this is exportable to Excel but it works in Numbers.


If you want the date ranges to be something other than 7 days, the formula can calculate the number of days in the range.


Type the first range into B2, same as before. Those two dates will determine the number of days.


B3 =TEXTAFTER(B2,"- ")+1&" - "&TEXTAFTER(B2,"- ")+1+STRIPDURATION(TEXTAFTER(B2,"- ")−TEXTBEFORE(B2," -"))


Jul 13, 2023 2:47 PM in response to ReddishOne

You could do it with a single cell that has the start date, and a column of formulas. Example below:


Formula in B2 =B$1+(ROW()−2)×7&" - "&B$1−1+(ROW()−1)×7

Fill down to complete the column (I only filled a few rows)


It uses the row number via the ROW function to determine how many 7's to add to the start date. My list started on row 2 so I had to subtract 2 for the left side date and 1 for the right side date.


The start date can be somewhere else, even on another sheet.



Jul 14, 2023 5:16 AM in response to ReddishOne

Hi ReddishOne,


Welcome to the Numbers forum in Apple Support Communities! Your reply to Badunit:


ReddishOne wrote:

Thank you, this is just what I needed

Etiquette in this forum is to acknowledge a reply as Helpful (Gold Star) or Best Answer (Green Tick). Such actions encourage the author of a reply and declare the usefulness to others who may look for help on a similar problem.


Regards,

Ian.

Showing a date range in a cell

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.