Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 407
Default Date formatting problems

This is an easy one, though not for me apparently!

I have a variable cell, say cell B34, with 5/31/2007 currently in it,
formatted as a date. In another cell, I want it to say "as of end of May",
using the text function at the end to produce May. But I am having trouble
with the formatting of that text part, e.g., text(B34,"mmm") or something
like that, but that doesn't work - it gives me January. I tried the month
function, and it does yield 5, but I can't figure out how to get it to
produce May, the fifth month.

Kindly help.

Thanks!
Dean


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,440
Default Date formatting problems

Hi Dean,

Are you sure B34 is a date? Format it as General; it should read 39233. If it gives you some small number, that might be the
result of dividing 5 by 31 and then by 2007 and Excel's date system would indeed interpret that as January.
BTW, use "mmmm" (4 m's) as format code; no difference for May, but January would read Jan with 3 m's.

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Dean" wrote in message ...
| This is an easy one, though not for me apparently!
|
| I have a variable cell, say cell B34, with 5/31/2007 currently in it,
| formatted as a date. In another cell, I want it to say "as of end of May",
| using the text function at the end to produce May. But I am having trouble
| with the formatting of that text part, e.g., text(B34,"mmm") or something
| like that, but that doesn't work - it gives me January. I tried the month
| function, and it does yield 5, but I can't figure out how to get it to
| produce May, the fifth month.
|
| Kindly help.
|
| Thanks!
| Dean
|
|


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 407
Default Date formatting problems

It does show 39233 if formatted as general. Any other ideas?

"Niek Otten" wrote in message
...
Hi Dean,

Are you sure B34 is a date? Format it as General; it should read 39233. If
it gives you some small number, that might be the
result of dividing 5 by 31 and then by 2007 and Excel's date system would
indeed interpret that as January.
BTW, use "mmmm" (4 m's) as format code; no difference for May, but January
would read Jan with 3 m's.

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Dean" wrote in message
...
| This is an easy one, though not for me apparently!
|
| I have a variable cell, say cell B34, with 5/31/2007 currently in it,
| formatted as a date. In another cell, I want it to say "as of end of
May",
| using the text function at the end to produce May. But I am having
trouble
| with the formatting of that text part, e.g., text(B34,"mmm") or
something
| like that, but that doesn't work - it gives me January. I tried the
month
| function, and it does yield 5, but I can't figure out how to get it to
| produce May, the fifth month.
|
| Kindly help.
|
| Thanks!
| Dean
|
|




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Date formatting problems

Maybe: Format(B34, "mmmm")

"Dean" wrote:

It does show 39233 if formatted as general. Any other ideas?

"Niek Otten" wrote in message
...
Hi Dean,

Are you sure B34 is a date? Format it as General; it should read 39233. If
it gives you some small number, that might be the
result of dividing 5 by 31 and then by 2007 and Excel's date system would
indeed interpret that as January.
BTW, use "mmmm" (4 m's) as format code; no difference for May, but January
would read Jan with 3 m's.

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Dean" wrote in message
...
| This is an easy one, though not for me apparently!
|
| I have a variable cell, say cell B34, with 5/31/2007 currently in it,
| formatted as a date. In another cell, I want it to say "as of end of
May",
| using the text function at the end to produce May. But I am having
trouble
| with the formatting of that text part, e.g., text(B34,"mmm") or
something
| like that, but that doesn't work - it gives me January. I tried the
month
| function, and it does yield 5, but I can't figure out how to get it to
| produce May, the fifth month.
|
| Kindly help.
|
| Thanks!
| Dean
|
|





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,440
Default Date formatting problems

Good point; are we talking VBA or worksheet formulas?

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"JLGWhiz" wrote in message ...
| Maybe: Format(B34, "mmmm")
|
| "Dean" wrote:
|
| It does show 39233 if formatted as general. Any other ideas?
|
| "Niek Otten" wrote in message
| ...
| Hi Dean,
|
| Are you sure B34 is a date? Format it as General; it should read 39233. If
| it gives you some small number, that might be the
| result of dividing 5 by 31 and then by 2007 and Excel's date system would
| indeed interpret that as January.
| BTW, use "mmmm" (4 m's) as format code; no difference for May, but January
| would read Jan with 3 m's.
|
| --
| Kind regards,
|
| Niek Otten
| Microsoft MVP - Excel
|
| "Dean" wrote in message
| ...
| | This is an easy one, though not for me apparently!
| |
| | I have a variable cell, say cell B34, with 5/31/2007 currently in it,
| | formatted as a date. In another cell, I want it to say "as of end of
| May",
| | using the text function at the end to produce May. But I am having
| trouble
| | with the formatting of that text part, e.g., text(B34,"mmm") or
| something
| | like that, but that doesn't work - it gives me January. I tried the
| month
| | function, and it does yield 5, but I can't figure out how to get it to
| | produce May, the fifth month.
| |
| | Kindly help.
| |
| | Thanks!
| | Dean
| |
| |
|
|
|
|
|




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 407
Default Date formatting problems

I'm sorry for not noting that. We are talking ordinary EXCEL, not macros.
So, I think I'm still stuck.

"Niek Otten" wrote in message
...
Good point; are we talking VBA or worksheet formulas?

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"JLGWhiz" wrote in message
...
| Maybe: Format(B34, "mmmm")
|
| "Dean" wrote:
|
| It does show 39233 if formatted as general. Any other ideas?
|
| "Niek Otten" wrote in message
| ...
| Hi Dean,
|
| Are you sure B34 is a date? Format it as General; it should read
39233. If
| it gives you some small number, that might be the
| result of dividing 5 by 31 and then by 2007 and Excel's date system
would
| indeed interpret that as January.
| BTW, use "mmmm" (4 m's) as format code; no difference for May, but
January
| would read Jan with 3 m's.
|
| --
| Kind regards,
|
| Niek Otten
| Microsoft MVP - Excel
|
| "Dean" wrote in message
| ...
| | This is an easy one, though not for me apparently!
| |
| | I have a variable cell, say cell B34, with 5/31/2007 currently in
it,
| | formatted as a date. In another cell, I want it to say "as of end
of
| May",
| | using the text function at the end to produce May. But I am
having
| trouble
| | with the formatting of that text part, e.g., text(B34,"mmm") or
| something
| | like that, but that doesn't work - it gives me January. I tried
the
| month
| | function, and it does yield 5, but I can't figure out how to get
it to
| | produce May, the fifth month.
| |
| | Kindly help.
| |
| | Thanks!
| | Dean
| |
| |
|
|
|
|
|




  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Date formatting problems

Or: Format(B34.Value, "mmmm") to be more precise.

"Dean" wrote:

It does show 39233 if formatted as general. Any other ideas?

"Niek Otten" wrote in message
...
Hi Dean,

Are you sure B34 is a date? Format it as General; it should read 39233. If
it gives you some small number, that might be the
result of dividing 5 by 31 and then by 2007 and Excel's date system would
indeed interpret that as January.
BTW, use "mmmm" (4 m's) as format code; no difference for May, but January
would read Jan with 3 m's.

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Dean" wrote in message
...
| This is an easy one, though not for me apparently!
|
| I have a variable cell, say cell B34, with 5/31/2007 currently in it,
| formatted as a date. In another cell, I want it to say "as of end of
May",
| using the text function at the end to produce May. But I am having
trouble
| with the formatting of that text part, e.g., text(B34,"mmm") or
something
| like that, but that doesn't work - it gives me January. I tried the
month
| function, and it does yield 5, but I can't figure out how to get it to
| produce May, the fifth month.
|
| Kindly help.
|
| Thanks!
| Dean
|
|





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
formatting problems swell estimator[_2_] Excel Discussion (Misc queries) 1 September 5th 08 01:24 AM
Formatting problems J in CA Excel Discussion (Misc queries) 2 December 6th 06 07:53 PM
Problems with date formatting Hawksby Excel Discussion (Misc queries) 2 September 6th 06 01:45 PM
Formatting Problems [email protected] Excel Discussion (Misc queries) 2 April 12th 06 11:00 PM
VBA Calender Formatting Date Problems beans_21[_10_] Excel Programming 2 April 3rd 06 02:35 PM


All times are GMT +1. The time now is 11:17 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"