ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Getting month padded zero (https://www.excelbanter.com/excel-discussion-misc-queries/72661-getting-month-padded-zero.html)

kickyr

Getting month padded zero
 

I have a spreadsheet, one of the cells has a forumla

that formula has a file name inside somewhere and that filename looks
like this

=Month(Today()) & Year(Today()) & Text(""blah.xls","")


But the month has to have two characters and if the month is less than
10 then it only has one

it should be "03" insead of "3"

anyone know how i can pad out a zero on that?

cheers


--
kickyr
------------------------------------------------------------------------
kickyr's Profile: http://www.excelforum.com/member.php...fo&userid=3388
View this thread: http://www.excelforum.com/showthread...hreadid=514223


Biff

Getting month padded zero
 
Hi!

Try this:

=TEXT(MONTH(TODAY()),"00") & Year(Today()) & Text(""blah.xls","")

Biff

"kickyr" wrote in
message ...

I have a spreadsheet, one of the cells has a forumla

that formula has a file name inside somewhere and that filename looks
like this

=Month(Today()) & Year(Today()) & Text(""blah.xls","")


But the month has to have two characters and if the month is less than
10 then it only has one

it should be "03" insead of "3"

anyone know how i can pad out a zero on that?

cheers


--
kickyr
------------------------------------------------------------------------
kickyr's Profile:
http://www.excelforum.com/member.php...fo&userid=3388
View this thread: http://www.excelforum.com/showthread...hreadid=514223




kickyr

Getting month padded zero
 

easy lol
thank you so much


--
kickyr
------------------------------------------------------------------------
kickyr's Profile: http://www.excelforum.com/member.php...fo&userid=3388
View this thread: http://www.excelforum.com/showthread...hreadid=514223


Dave Peterson

Getting month padded zero
 
Or...

=text(today(),"mmyyyy") & ....



kickyr wrote:

I have a spreadsheet, one of the cells has a forumla

that formula has a file name inside somewhere and that filename looks
like this

=Month(Today()) & Year(Today()) & Text(""blah.xls","")


But the month has to have two characters and if the month is less than
10 then it only has one

it should be "03" insead of "3"

anyone know how i can pad out a zero on that?

cheers

--
kickyr
------------------------------------------------------------------------
kickyr's Profile: http://www.excelforum.com/member.php...fo&userid=3388
View this thread: http://www.excelforum.com/showthread...hreadid=514223


--

Dave Peterson


All times are GMT +1. The time now is 10:51 PM.

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