Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 17
Default Create Directory Structure from Cell Value.

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. The workbook where the data is contained is the active workbook.
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
how can i create a telephone directory from an excel sheet tal Excel Discussion (Misc queries) 1 October 15th 07 09:20 AM
VLOOKUP - Saves entire directory structure Armatidge Excel Worksheet Functions 0 February 20th 07 01:53 AM
How can I create a class reunion directory from a spreadsheet? BRENDA Excel Discussion (Misc queries) 3 October 27th 05 04:09 PM
Slow opening directory structure in Excel 2002 Nyte Excel Discussion (Misc queries) 0 August 4th 05 04:44 PM
Create a Backup in Different Directory [email protected] Excel Discussion (Misc queries) 1 August 2nd 05 09:27 PM


All times are GMT +1. The time now is 02:17 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"