Hi,
I'm trying to generate the following title:
"Wealth Management - March (current month) 2008(current year)"
I'm using the following formula:
="Wealth Management - "&TEXT(MONTH(TODAY()),"mmmm")&" "&YEAR(TODAY())
The year bit works, returning 2008.
The month just won't work - it keeps returning January and I can't figure
out why.
Where am I going wrong?
Cheers!
JMB - 08 Mar 2008 00:03 GMT
="Wealth Management - "&TEXT(TODAY(),"mmmm yyyy")
XL stores dates as numbers. Month(Today()) returns 3, which is interpreted
as 1/3/1900 (and is why you keep getting January).
> Hi,
>
[quoted text clipped - 13 lines]
>
> Cheers!
JMB - 08 Mar 2008 00:07 GMT
Unless your options are set up to use the 1904 date system, then 3 would be
1/3/1904.
> ="Wealth Management - "&TEXT(TODAY(),"mmmm yyyy")
>
[quoted text clipped - 18 lines]
> >
> > Cheers!
mr tom - 08 Mar 2008 00:12 GMT
Sorry - missed it!
Thanks so much.
Tom.
> Unless your options are set up to use the 1904 date system, then 3 would be
> 1/3/1904.
[quoted text clipped - 21 lines]
> > >
> > > Cheers!
JMB - 08 Mar 2008 00:16 GMT
quite alright - thanks for the feedback.
> Sorry - missed it!
>
[quoted text clipped - 27 lines]
> > > >
> > > > Cheers!
mr tom - 08 Mar 2008 00:07 GMT
So what's a good solution?
Cheers.
> ="Wealth Management - "&TEXT(TODAY(),"mmmm yyyy")
>
[quoted text clipped - 18 lines]
> >
> > Cheers!
JMB - 08 Mar 2008 00:10 GMT
I included a solution in the first line of my post - please re-read.
> So what's a good solution?
>
[quoted text clipped - 22 lines]
> > >
> > > Cheers!
Tyro - 08 Mar 2008 00:06 GMT
It's because MONTH(TODAY()) returns 3. That is the dateserial number of day
3 which is January 3, 1900. So "mmmm:" returns January.
What you need is
="Wealth Management - "&TEXT(TODAY(),"mmmm")&" "&YEAR(TODAY()) or
="Wealth Management - "&TEXT(TODAY(),"mmmm")&" "&TEXT(TODAY(),"yyyy")
That will give you Wealth Management - March 2008.
Tyro
> Hi,
>
[quoted text clipped - 13 lines]
>
> Cheers!
Tyro - 08 Mar 2008 00:08 GMT
Or you can use JMB's answer which is superior to mine
Tyro
> It's because MONTH(TODAY()) returns 3. That is the dateserial number of
> day 3 which is January 3, 1900. So "mmmm:" returns January.
[quoted text clipped - 23 lines]
>>
>> Cheers!
JMB - 08 Mar 2008 00:19 GMT
only because my first post didn't go through, giving me an opportunity to
tweak the formula before posting my *final* answer <g>
> Or you can use JMB's answer which is superior to mine
>
[quoted text clipped - 27 lines]
> >>
> >> Cheers!
Tyro - 08 Mar 2008 04:43 GMT
Actually, I really don't have a lot of time to play with this stuff. I've
been in the computer field since September 1964. I don't try anymore to
produce the best answer, just an answer. Perhaps when I retire in 6 years at
age 70, I may play with formulas to the extent that they become obfuscated.
But in the meantime, JMB, continue to contribute. It is very important.
Tyro
> only because my first post didn't go through, giving me an opportunity to
> tweak the formula before posting my *final* answer <g>
[quoted text clipped - 31 lines]
>> >>
>> >> Cheers!