Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Cell C2 contains a date in this format: 7/23/2006 How can I convert that date and place it in this file path automatically, I put the result I need in bold? ='C:\Documents and Settings\PC\My Documents\Green Books\[GB_*072306*-Q6150.xls]DailyWS'!$D$5 Thank you, Em -- Emma317 ------------------------------------------------------------------------ Emma317's Profile: http://www.excelforum.com/member.php...o&userid=36598 View this thread: http://www.excelforum.com/showthread...hreadid=563417 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'd format the date and add it into the file path, something like this:
Dim strDate as String, strPath as String strDate = Format(Range("C1").Value, "MMddyy") strPath = "'C:\Documents and Settings\PC\My Documents\Green Books\[GB_*" & strDate & "*-Q6150.xls]DailyWS'!$D$5" |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Thanks for the reply, but I'm not sure how to put that in my worksheet. I don't know much more than just typing into the cells. Does this go somewhere else? Do I have to create a file that will run this? Sorry, but I'm new at this. Thanks, Emily -- Emma317 ------------------------------------------------------------------------ Emma317's Profile: http://www.excelforum.com/member.php...o&userid=36598 View this thread: http://www.excelforum.com/showthread...hreadid=563417 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ah! I apologize for the delay inresponding and for misunderstanding
what you were trying to do. I thought you were programming this behind the scenes in VBA. If you want to do that in a cell on a worksheet, using your example type the following formula into cell D2 (or wherever you want to result to end up): ="'C:\Documents and Settings\PC\My Documents\Green Books\[GB_*" & IF(LEN(MONTH(C1))=1,"0" & MONTH(C1),MONTH(C1)) & IF(LEN(DAY(C1))=1,"0" & DAY(C1),DAY(C1)) & RIGHT(YEAR(C1),2) & "*-Q6150.xls]DailyWS'!$D$5" Thanks, Cory Emma317 wrote: Cell C2 contains a date in this format: 7/23/2006 How can I convert that date and place it in this file path automatically, I put the result I need in bold? ='C:\Documents and Settings\PC\My Documents\Green Books\[GB_*072306*-Q6150.xls]DailyWS'!$D$5 Thank you, Em -- Emma317 ------------------------------------------------------------------------ Emma317's Profile: http://www.excelforum.com/member.php...o&userid=36598 View this thread: http://www.excelforum.com/showthread...hreadid=563417 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Create filename based on cell contents | Excel Worksheet Functions | |||
Macro to Save As with filename based on cell contents. | Excel Programming | |||
How can I insert the contents of a cell as a filename? | Excel Programming | |||
Create filename based on cell contents | Excel Programming | |||
cell contents as filename | Excel Programming |