If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Writing Todays Date to an Excel Worksheet
Hi All,
I`m looking for a function in excel that will return todays date in a ‘yyyymmdd’ format when a worksheet opens. This date would be populated on several cells on the worksheet. I noticed a TODAY() function in excel but not sure if this can be changed to suit the format I need Any hints or tips ? Thanks Derek ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ |
#2
|
|||
|
|||
Writing Todays Date to an Excel Worksheet
Derek, use =TODAY() and format the cell as custom yyyymmdd
-- Paul B Always backup your data before trying something new Using Excel 2000 & 97 Please post any response to the newsgroups so others can benefit from it ** remove news from my email address to reply by email ** "dawhyte" wrote in message ... Hi All, I`m looking for a function in excel that will return todays date in a 'yyyymmdd' format when a worksheet opens. This date would be populated on several cells on the worksheet. I noticed a TODAY() function in excel but not sure if this can be changed to suit the format I need Any hints or tips ? Thanks Derek ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ |
#3
|
|||
|
|||
Writing Todays Date to an Excel Worksheet
simply select the cell with the date,
select 'format' select 'cells' select 'custom' then in the box below 'TYPE:' enter yyyymmdd should work ok for you Cheers Ian -----Original Message----- Hi All, I`m looking for a function in excel that will return todays date in a 'yyyymmdd' format when a worksheet opens. This date would be populated on several cells on the worksheet. I noticed a TODAY() function in excel but not sure if this can be changed to suit the format I need Any hints or tips ? Thanks Derek ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ . |
#4
|
|||
|
|||
Writing Todays Date to an Excel Worksheet
It can be done. If you use that function then right click
on the cell and put the format in that you want it. For example if you choose date format and select the one you want. You can make it any way you'd like. Good luck. -----Original Message----- Hi All, I`m looking for a function in excel that will return todays date in a 'yyyymmdd' format when a worksheet opens. This date would be populated on several cells on the worksheet. I noticed a TODAY() function in excel but not sure if this can be changed to suit the format I need Any hints or tips ? Thanks Derek ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ . |
#5
|
|||
|
|||
Writing Todays Date to an Excel Worksheet
Try Format Cells Custom type in your code in place of
General. HTH G -----Original Message----- Hi All, I`m looking for a function in excel that will return todays date in a 'yyyymmdd' format when a worksheet opens. This date would be populated on several cells on the worksheet. I noticed a TODAY() function in excel but not sure if this can be changed to suit the format I need Any hints or tips ? Thanks Derek ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ . |
#6
|
|||
|
|||
Writing Todays Date to an Excel Worksheet
Thanks for that.....
I`ll try this out when I can and I`ll let everyone know the outcome - I`m sure it'll work...sounds like common sense solution to me. Thanks again. ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ |
#7
|
|||
|
|||
Writing Todays Date to an Excel Worksheet
Thanx for the response....
I`m actually doing this now and I`ve realised I need this solution slightly modified.... The date/time value for the cell needs to be 16 characters long in the following format yyyymmddhhmmss(ms)(ms) .. this needs to be created as follows: The first 8 chars (yyyymmdd) will be todays date "20031007" and the last 8 chars (hhmmss(ms)(ms)) can be "00000000" so I need several cells to be populated with the above when the spreadsheet is opened... I imagine this would be some VBA code to say: 1. get todays date 2. format it in 'yyyymmdd' format 3. add 8 zero's to the end of no. 2 4. write this to cell xx So i really just need to find out how to use TODAY() to format to 'yyyymmdd' Is it best to put this in the worksheet load event ? Thanks for the help so far. Derek ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ |
#8
|
|||
|
|||
Writing Todays Date to an Excel Worksheet
Just to let everyone know...i've managed to solve this now ..... thanks
Paul B... I actually implemented by setting the cell's formatting to custom (yyyymmddmsmsmsms) and using the TODAY() formula The 'ms' comes up as '0' so there are 8 zeros after the date. Thanks Derek ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ |
#9
|
|||
|
|||
Writing Todays Date to an Excel Worksheet
Just to let everyone know...i've managed to solve this now ..... thanks
Paul B... I actually implemented by setting the cell's formatting to custom (yyyymmddmsmsmsms) and using the TODAY() formula The 'ms' comes up as '0' so there are 8 zeros after the date. Thanks Derek ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ |
Thread Tools | |
Display Modes | |
|
|