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

Is there any way to alter the following expression to return a double digit
for single digit months (i.e. 08 instead of 8) without adding more lines of
code?

strMonth=Month(Range("A4").Value)


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Date string question

Thanks Bill. No, it isn't homework. Just a line in a very long macro, and
I'm trying to avoid making it even longer.

TB

"Wild Bill" wrote in message
...
Interesting that you don't want to add lines of code. Is this a
homework question?

strMonth=right(100+Month(Range("A4").Value),2)


On Tue, 19 Aug 2003 03:22:33 -0400, "TB"
wrote:

Is there any way to alter the following expression to return a double

digit
for single digit months (i.e. 08 instead of 8) without adding more lines

of
code?

strMonth=Month(Range("A4").Value)



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
Convert Date string to date format Joe M. Excel Discussion (Misc queries) 7 May 6th 10 02:46 PM
Excel String question Practiceguys Excel Discussion (Misc queries) 4 January 8th 08 08:49 PM
Date String Jester Excel Discussion (Misc queries) 1 February 28th 07 10:00 AM
extract date from string kdp145 Excel Worksheet Functions 3 March 3rd 06 02:54 PM
Finding a string/using adjacent data question [email protected] Excel Discussion (Misc queries) 4 January 9th 06 03:59 PM


All times are GMT +1. The time now is 08:04 AM.

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

About Us

"It's about Microsoft Excel"