Date Breakdown into Columns

Justinian

Well-known Member
Joined
Aug 9, 2009
Messages
1,557
Office Version
  1. 365
Platform
  1. Windows
I run a report every morning for moving dates. For example, today's report is 6/2-6/5. I want Excel to recognize each unique date and place those dates starting in E11. So for today, I want Excel to put "2nd" in E11, "3rd" in E12, "4th" in E13, and "15th" in E14. Tomorrow's report will be 6/3-6/9 so there will not always be just four (4) dates.

How do I get Excel to do this?
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
The simple version, original date range in E9, note that I've had to change it slightly to work with my UK regional settings.

Note that excel does not have capability to show 1st, 2nd, 3rd, etc. A custom format of d"th" has been used on the formula cells, with conditional formatting to correct days 1,2,3,21,22,23 and 31 as shown below. The first rule uses a format of d"rd" the second uses d"nd" and the third d"st"
Book5
E
112nd
123rd
134th
145th
15 
Sheet11
Cell Formulas
RangeFormula
E11E11=DATEVALUE(LEFT(E9,FIND("-",E9)-1))
E12:E15E12=IF(MAX(E$11:E11)=DATEVALUE(MID($E$9,FIND("-",$E$9)+1,5)),"",E11+1)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
E11:E15Expression=OR(DAY(E11)=3,DAY(E11)=23)textNO
E11:E15Expression=OR(DAY(E11)=2,DAY(E11)=22)textNO
E11:E15Expression=OR(DAY(E11)=1,DAY(E11)=21,DAY(E11)=31)textNO
 
Upvote 0
Hi Justinian,

I don't think I'm understanding the rules.
Q1: Why is E14 the 15th? What decides that?
Q2: What denotes there will be 4 days or 7 days?

Here's today for 3 days:
Justinian.xlsx
E
112nd
123rd
134th
Sheet1
Cell Formulas
RangeFormula
E11:E13E11=DAY(TODAY()+ROWS($E$11:$E11)-1)&MID("xxstndrdthththththththththththththththththstndrdthththththththst",(DAY(TODAY()+ROWS($E$11:$E11)-1)*2)+1,2)
 
Upvote 0
@Toadstool I think that 15th was a typo. I just notice that I chopped the top off of the table in my reply earlier, I think that I'm following what the OP requires, can you improve?

Not sure of your regional settings, note that the date in E9 is June 2nd to June 5th (4 days), if you're using US settings then you would need to use 6/2-6/5 for the formula to recognise the dates correctly.
Book5
E
92/6-5/6
10
112nd
123rd
134th
145th
15 
Sheet11
Cell Formulas
RangeFormula
E11E11=DATEVALUE(LEFT(E9,FIND("-",E9)-1))
E12:E15E12=IF(MAX(E$11:E11)=DATEVALUE(MID($E$9,FIND("-",$E$9)+1,5)),"",E11+1)
 
Upvote 0
@Toadstool Yes, the 15th was a typo.

If the report is run on Monday or Tuesday, the dates have to run through Friday. If I run the report on Wednesday, Thursday, or Friday, the dates have to run through the following Tuesday.

@jasonb75 I forgot to mention that my dates are in column C. For example, C11:C:17 has the date 6/2/20; C18:C26 has the date 6/3/20.
 
Upvote 0
Of course, I have to COUNTIF the dates so instead of "2nd" or "3rd," column E could say 6/2/20, 6/3/20.
 
Upvote 0
I forgot to mention that my dates are in column C. For example, C11:C:17 has the date 6/2/20; C18:C26 has the date 6/3/20
I'm not following, is that in place of E11, E12, E13 and E14 in your earlier post, or something else?

Please install the XL2BB add in (link below) and post a clear example showing what you already have in your sheet and what you want added with the formulas.
Please make sure that there is nothing else that you may have forgotten to mention so that we don't waste any more time on answers that are not what you want!

 
Upvote 0
The link says the add-in is native in Excel but not in mine.
 
Upvote 0
Don't know where you've seen that, it's not native, the link gives you a guide of how to install and use the add in.
 
Upvote 0
It indicates this in the instructions you sent. The 3rd bullet says "Find XL2BB add-in in the Add-ins list and get the installation location in the location column" and I do not have XL2BB in my add-ins. When i click on the Download link, the file opens and when I click on the file but nothing happens and it is not visible in the add-ins either.
 
Upvote 0

Forum statistics

Threads
1,215,455
Messages
6,124,935
Members
449,195
Latest member
Stevenciu

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