ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   combining to cells and on one keeping date format (https://www.excelbanter.com/excel-programming/277103-re-combining-cells-one-keeping-date-format.html)

steve

combining to cells and on one keeping date format
 
Richard,

With A1 = file
B1 = 9/15/2003 (US standard)
Dim filenm as String
filenm = Range("A1") & Format(Range("b1"), "mmmyy")

you may or may not need to adjust for your regional settings.
--
sb
"Richard Leclezio" wrote in message
...
i need to extract a file which the file name itself
contains a changing date of the form \"filename"&mmmdd
in trying to create the string so i can extract the
filename daily i create a cell reference with the
constant string and created the mmmdd date string in a
separate cell.. on attempting to combine the two strings
in order to come up with one filename the resulting
string results in the constanttext & the date in excel
number format
for example if today was 15/09/2003 i would wish to
create the string c:\\my videos\filesep15 but instead
get the result is c:\\my videos\file37879

could anyone help me in createing the former????
please :)




Tom Ogilvy

combining to cells and on one keeping date format
 
filenm = Range("A1") & Format(Range("b1"), "mmmyy")
msgbox filenm

--
Regards,
Tom Ogilvy


"Richard Leclezio" wrote in message
...
Hi steve,

sorry it seem stupid but after i have written that code
how do i view the combined result

R
-----Original Message-----
Richard,

With A1 = file
B1 = 9/15/2003 (US standard)
Dim filenm as String
filenm = Range("A1") & Format(Range("b1"), "mmmyy")

you may or may not need to adjust for your regional

settings.
--
sb
"Richard Leclezio"

wrote in message
...
i need to extract a file which the file name itself
contains a changing date of the form \"filename"&mmmdd
in trying to create the string so i can extract the
filename daily i create a cell reference with the
constant string and created the mmmdd date string in a
separate cell.. on attempting to combine the two strings
in order to come up with one filename the resulting
string results in the constanttext & the date in excel
number format
for example if today was 15/09/2003 i would wish to
create the string c:\\my videos\filesep15 but instead
get the result is c:\\my videos\file37879

could anyone help me in createing the former????
please :)



.





All times are GMT +1. The time now is 07:48 AM.

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