Excel Date Format

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to use a formula to display the following:

"Name of Report" October 1 - 15 as the date, then on the next sheet,

"Name of Report" October 16 - 31

But also make adjustments when the months are shorter, such as November 30.

Thanks, any help would be appreciated.
 
Let's say the date is in A1

Then

="Sales Report " & TEXT(A1,"mmmm") & IF(DAY(A1)<16," 1-15"," 16 - " &
DAY(DATE(YEAR(A1),MONTH(A1)+1,0)))

will produce
Sales Report April 1-15
for 4/12/2006

and produce
Sales Report April 16 - 30
for 4/20/2006
 
="Name of Report "&TEXT(TODAY(),"mmmm")&" 1 - 15"

and

="Name of Report "&TEXT(TODAY(),"mmmm")&" 16 -
"&TEXT(DATE(YEAR(TODAY()),MONTH(TODAY())+1,0),"dd")

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
Excuse me Gary n Bob.....Try my suggestion....Idan is pertaining to a
recorded Report within semi-monthly basis, one report in every sheet....if he
save his workbook today and then reopen it after one year, u know the
devastating result....try to be cautious on our helpful suggestions cause it
may contribute to users boredom in using excel again....Of course - Ida will
do his report a little later after the said period....Better type it as text,
sometimes its worthy and only way !!!
 
Thanks for everyone's help, so I guess I'll just continue to type it every
two weeks. Thanks again.
 
Hi

My response was to Idan's comment.
If he is concerned about the dates changing with the use of the volatile
function Today(), he can substitute cell A1 in place of Today()
throughout Bob's formulae.

On Sheet 2 in cell 1 enter =Sheet1!A1
On sheet 1, each month when he creates a new report enter Control + ;
(that's control + semicolon) as this will hard fix the value of Toay to
the cell.

On sheet1
="Name of Report "&TEXT(A1mmmm")&" 1 - 15"
On sheet2
="Name of Report "&TEXT(A1mmmm")&" 16 -
"&TEXT(DATE(YEAR(A1),MONTH(A1)+1,0),"dd")

So the only typing to be made each month is Ctrl + ;
 
Apologies, in the editing of the formulae some commas were dropped.
Should have read

="Name of Report "&TEXT(A1,mmmm")&" 1 - 15"
and
="Name of Report "&TEXT(A1,mmmm")&" 16 -
"&TEXT(DATE(YEAR(A1),MONTH(A1)+1,0),"dd")
 
Roger,

I support your idea.

I just want to include the missing double quote before mmmm in your formulae before someone "flames" at you.

should be ="Name of Report "&TEXT(A1,"mmmm")&" 1 - 15"
"&TEXT(DATE(YEAR(A1),MONTH(A1)+1,0),"dd") <<

should be ="Name of Report "&TEXT(A1,"mmmm")&" 16 -
"&TEXT(DATE(YEAR(A1),MONTH(A1)+1,0),"dd")

Epinn

Hi

My response was to Idan's comment.
If he is concerned about the dates changing with the use of the volatile
function Today(), he can substitute cell A1 in place of Today()
throughout Bob's formulae.

On Sheet 2 in cell 1 enter =Sheet1!A1
On sheet 1, each month when he creates a new report enter Control + ;
(that's control + semicolon) as this will hard fix the value of Toay to
the cell.

On sheet1
="Name of Report "&TEXT(A1mmmm")&" 1 - 15"
On sheet2
="Name of Report "&TEXT(A1mmmm")&" 16 -
"&TEXT(DATE(YEAR(A1),MONTH(A1)+1,0),"dd")

So the only typing to be made each month is Ctrl + ;
 
Quite right Epinn, I should have also inserted the " when I did my
correction.
Thanks

--
Regards

Roger Govier


Roger,

I support your idea.

I just want to include the missing double quote before mmmm in your
formulae before someone "flames" at you.

should be ="Name of Report "&TEXT(A1,"mmmm")&" 1 - 15"
"&TEXT(DATE(YEAR(A1),MONTH(A1)+1,0),"dd") <<

should be ="Name of Report "&TEXT(A1,"mmmm")&" 16 -
"&TEXT(DATE(YEAR(A1),MONTH(A1)+1,0),"dd")

Epinn

Hi

My response was to Idan's comment.
If he is concerned about the dates changing with the use of the volatile
function Today(), he can substitute cell A1 in place of Today()
throughout Bob's formulae.

On Sheet 2 in cell 1 enter =Sheet1!A1
On sheet 1, each month when he creates a new report enter Control + ;
(that's control + semicolon) as this will hard fix the value of Toay to
the cell.

On sheet1
="Name of Report "&TEXT(A1mmmm")&" 1 - 15"
On sheet2
="Name of Report "&TEXT(A1mmmm")&" 16 -
"&TEXT(DATE(YEAR(A1),MONTH(A1)+1,0),"dd")

So the only typing to be made each month is Ctrl + ;
 
Excuse me Roger and Epinn.....Introducing another cell A1 and the formulated
cell...with a long formula...is not a convenient shortcut for somebody's
work....the formula suggested will only be used once in two weeks on one cell
as a header more probably...in a printed report...be practical...We are
talking of a "Title" - not a multi-used formulated cell....
 
Your point is well taken and you are entitled to your opinion. The poster has a request and the experts who are dedicated *volunteers* try to comply with the request to the best of their knowledge. Various options (and of course you have your share) are suggested to the poster. It is up to the poster to decide what he/she finally wants to do. Who knows he/she may even find a solution outside this forum. Let the poster be the judge and the poster is responsible for any decision that he/she has made. No effort is needed to influence the poster one way or the other.

I have always tried to do my best to show my respect to the volunteers for their time and knowledge. This forum has been quite friendly and peaceful and I think we all like to keep it that way.

Epinn

Excuse me Roger and Epinn.....Introducing another cell A1 and the formulated
cell...with a long formula...is not a convenient shortcut for somebody's
work....the formula suggested will only be used once in two weeks on one cell
as a header more probably...in a printed report...be practical...We are
talking of a "Title" - not a multi-used formulated cell....
 
Roger,

I think Bob's formula is very doable even without A1. It depends on how one uses it.

I see that the user will prepare the semi-monthly report after the 15th of the month but before the end of the month. One can insert Bob's semi-monthly formula to one sheet and the monthly formula to another after the 15th. TODAY() will pick up the month to be reported. Then add one crucial step.

Edit>Copy and then Edit>Paste Special>Values

This way, we don't have to be concerned about volatility of TODAY().

Of course, one can argue that the user may forget to Paste Special>Values. I see that the steps can be recorded to a macro/a keystroke. This is the shortcut I have in mind.

Any comments?

Epinn

Hi

My response was to Idan's comment.
If he is concerned about the dates changing with the use of the volatile
function Today(), he can substitute cell A1 in place of Today()
throughout Bob's formulae.

On Sheet 2 in cell 1 enter =Sheet1!A1
On sheet 1, each month when he creates a new report enter Control + ;
(that's control + semicolon) as this will hard fix the value of Toay to
the cell.

On sheet1
="Name of Report "&TEXT(A1mmmm")&" 1 - 15"
On sheet2
="Name of Report "&TEXT(A1mmmm")&" 16 -
"&TEXT(DATE(YEAR(A1),MONTH(A1)+1,0),"dd")

So the only typing to be made each month is Ctrl + ;
 
Clarification

I am trying to say that when the user prepares the semi-monthly report, he/she can prepare the heading for the monthly report *ahead of time*. The idea is to capture the current month in time. When the user is ready to compile the monthly report after the last day of the month, he/she can just fill in the worksheet which has already got the heading set up.

The user can modify my suggestion according to his/her needs. Is it true that one can make a macro global for many users to take advantage of?

Epinn

Roger,

I think Bob's formula is very doable even without A1. It depends on how one uses it.

I see that the user will prepare the semi-monthly report after the 15th of the month but before the end of the month. One can insert Bob's semi-monthly formula to one sheet and the monthly formula to another after the 15th. TODAY() will pick up the month to be reported. Then add one crucial step.

Edit>Copy and then Edit>Paste Special>Values

This way, we don't have to be concerned about volatility of TODAY().

Of course, one can argue that the user may forget to Paste Special>Values. I see that the steps can be recorded to a macro/a keystroke. This is the shortcut I have in mind.

Any comments?

Epinn

Hi

My response was to Idan's comment.
If he is concerned about the dates changing with the use of the volatile
function Today(), he can substitute cell A1 in place of Today()
throughout Bob's formulae.

On Sheet 2 in cell 1 enter =Sheet1!A1
On sheet 1, each month when he creates a new report enter Control + ;
(that's control + semicolon) as this will hard fix the value of Toay to
the cell.

On sheet1
="Name of Report "&TEXT(A1mmmm")&" 1 - 15"
On sheet2
="Name of Report "&TEXT(A1mmmm")&" 16 -
"&TEXT(DATE(YEAR(A1),MONTH(A1)+1,0),"dd")

So the only typing to be made each month is Ctrl + ;
 
Hi Epinn

Of course the user could do as you suggest.
I had imagined the blank report would be set up once and saved as a
template to be used each successive month (whereas I think romelsb may
have assumed this task was to be repeated on each occasion).

Therefore the simple task of just Typing Ctrl + ; into one cell in the
workbook (A1 or any other cell of choice) would IMO be a lot easier than
having to carry out a Copy > Paste Special > Values to 2 cells in the
workbook, each on a separate sheet.

--
Regards

Roger Govier


Clarification

I am trying to say that when the user prepares the semi-monthly report,
he/she can prepare the heading for the monthly report *ahead of time*.
The idea is to capture the current month in time. When the user is
ready to compile the monthly report after the last day of the month,
he/she can just fill in the worksheet which has already got the heading
set up.

The user can modify my suggestion according to his/her needs. Is it
true that one can make a macro global for many users to take advantage
of?

Epinn

Roger,

I think Bob's formula is very doable even without A1. It depends on how
one uses it.

I see that the user will prepare the semi-monthly report after the 15th
of the month but before the end of the month. One can insert Bob's
semi-monthly formula to one sheet and the monthly formula to another
after the 15th. TODAY() will pick up the month to be reported. Then
add one crucial step.

Edit>Copy and then Edit>Paste Special>Values

This way, we don't have to be concerned about volatility of TODAY().

Of course, one can argue that the user may forget to Paste
Special>Values. I see that the steps can be recorded to a macro/a
keystroke. This is the shortcut I have in mind.

Any comments?

Epinn

Hi

My response was to Idan's comment.
If he is concerned about the dates changing with the use of the volatile
function Today(), he can substitute cell A1 in place of Today()
throughout Bob's formulae.

On Sheet 2 in cell 1 enter =Sheet1!A1
On sheet 1, each month when he creates a new report enter Control + ;
(that's control + semicolon) as this will hard fix the value of Toay to
the cell.

On sheet1
="Name of Report "&TEXT(A1mmmm")&" 1 - 15"
On sheet2
="Name of Report "&TEXT(A1mmmm")&" 16 -
"&TEXT(DATE(YEAR(A1),MONTH(A1)+1,0),"dd")

So the only typing to be made each month is Ctrl + ;
 
I also assumed that this would be a one time operation, templated (ugh!) if
required.

Generated a lot of heat for a simple request eh?

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
Generated a lot of heat for a simple request eh?
Sure did.

Partly caused by my bad typing/editing!!!
 
Back
Top