ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Break up a date range automatic (https://www.excelbanter.com/excel-worksheet-functions/193059-break-up-date-range-automatic.html)

cory

Break up a date range automatic
 
I want to be able to put a range of dates inot one cell (ie. 6/1-6/7) and I
want to able to have the individual days put into 7 differenent cells, 6/1
into b2. 6/2 into c2 ect

Rick Rothstein \(MVP - VB\)[_787_]

Break up a date range automatic
 
Put this in B2...

=--LEFT(A2,FIND("-",A2&"-")-1)

Then put this in C2 and copy across to H2.

Note that this is keyed off of the first date only and will work correctly
even if only a single date (as opposed to your specified range) is placed in
A2.

Rick


"Cory" wrote in message
...
I want to be able to put a range of dates inot one cell (ie. 6/1-6/7) and I
want to able to have the individual days put into 7 differenent cells, 6/1
into b2. 6/2 into c2 ect



Me

Break up a date range automatic
 
Put the date range in A2:
6/1/2008-6/7/2008




Put this formula in B2 and copy to each cell to H2:
=MID($A2,1,SEARCH("-",$A2)-1)+COLUMN()-2



Since you said "7" cells I assume this will alway be a 7 day week. You
actually only need the first date, which this formula extracts from the text
6/01/2008-6/7/2008.

Don

"Cory" wrote in message
...
I want to be able to put a range of dates inot one cell (ie. 6/1-6/7) and I
want to able to have the individual days put into 7 differenent cells, 6/1
into b2. 6/2 into c2 ect




cory

Break up a date range automatic
 
Thanks for the info but it gives me every other day not everyday in the string

"Me" wrote:

Put the date range in A2:
6/1/2008-6/7/2008




Put this formula in B2 and copy to each cell to H2:
=MID($A2,1,SEARCH("-",$A2)-1)+COLUMN()-2



Since you said "7" cells I assume this will alway be a 7 day week. You
actually only need the first date, which this formula extracts from the text
6/01/2008-6/7/2008.

Don

"Cory" wrote in message
...
I want to be able to put a range of dates inot one cell (ie. 6/1-6/7) and I
want to able to have the individual days put into 7 differenent cells, 6/1
into b2. 6/2 into c2 ect





Fred Smith[_4_]

Break up a date range automatic
 
It works for me. Are you sure you copied it correctly?

Regards,
Fred.

"Cory" wrote in message
...
Thanks for the info but it gives me every other day not everyday in the
string

"Me" wrote:

Put the date range in A2:
6/1/2008-6/7/2008




Put this formula in B2 and copy to each cell to H2:
=MID($A2,1,SEARCH("-",$A2)-1)+COLUMN()-2



Since you said "7" cells I assume this will alway be a 7 day week. You
actually only need the first date, which this formula extracts from the
text
6/01/2008-6/7/2008.

Don

"Cory" wrote in message
...
I want to be able to put a range of dates inot one cell (ie. 6/1-6/7)
and I
want to able to have the individual days put into 7 differenent cells,
6/1
into b2. 6/2 into c2 ect







All times are GMT +1. The time now is 07:45 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com