LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 17
Default Creating Directory Structure from Cell Value

I previously posted this to the incorrect group. Sorry about that.

I was able to create a partial structure from information in a
previous post.

Post Follows:
From user: Farhad


Dim Fldr As Scripting.FileSystemObject
Set Fldr = New Scripting.FileSystemObject
If Fldr.FolderExists("C:\Reports\2007-09-18") Then
Else
Fldr.CreateFolder "C:\Reports\2007-09-18"
End If


make sure you have referred to MicroSoft Scripting Runtime from
ToolsReferences


Thanks,
--
Farhad Hodjat


Question:
Assuming that the value of Cell D2 is a date in the format 12/2/07
18:39.


I would like to create the following file structure from that
information


Drive:\Place Where Data is Stored\Year\Month (two digit) Month
(Verbal)
\Day (two digit)


So with the data from Cell D2 it would look like this:


Drive:\Place Where Data is Stored\2007\12 December\02\


I have used the following adjustment to the data and can't seem to
get
the full file structure.


"Drive:\Place Where Data is Stored\" & Format(Range("D2").Value,
"YYYY") & "\" & Format(Range("D2").Value, "mm") & " " &
Format(Range("D2").Value, "MMMM") &"\" & Format(Range("D2").Value,
"dd")


With the previous formula I either get an error or nothing happens at
all or I get a directory structure like this "Drive:\Place Where Data
is Stored\200711\ or Drive:\Place Where Data is Stored\200711November
\. The workbook where the data is contained is the active workbook.


 
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
Create Directory Structure from Cell Value. [email protected] Excel Discussion (Misc queries) 0 December 3rd 07 09:02 PM
VLOOKUP - Saves entire directory structure Armatidge Excel Worksheet Functions 0 February 20th 07 01:53 AM
creating directory for workbook Renee Excel Discussion (Misc queries) 3 August 28th 06 10:00 AM
Creating Links to files in a shared directory grewpp Excel Discussion (Misc queries) 4 February 9th 06 04:22 PM
Slow opening directory structure in Excel 2002 Nyte Excel Discussion (Misc queries) 0 August 4th 05 04:44 PM


All times are GMT +1. The time now is 09:28 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"