Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 576
Default 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 :)



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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 :)



.



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
Combining text and cell reference keeping number format RajenRajput1 Excel Discussion (Misc queries) 6 August 23rd 07 05:18 PM
combining cells and keeping decimal format Bryan Excel Discussion (Misc queries) 2 March 29th 07 03:52 PM
Keeping the format of a date Louise Excel Worksheet Functions 5 September 15th 06 12:05 PM
Keeping the format when referencing cells? Beard Excel Worksheet Functions 2 February 18th 06 06:49 PM
Combining Cells BUT Keeping source formatting FROSTY Excel Worksheet Functions 1 August 9th 05 12:57 AM


All times are GMT +1. The time now is 03:07 PM.

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"