Create Folders With Dates
Mar 2, 2008
I have a silly little sheet that i am trying to create to help me create a lot of folders on my pc. The sheet will basically make a consecutive group of folders that list out a 7 day period and a week number.
The problem i am having is trying to paste the special values of the dates in a group of cells, and then using those values to create my multiple sets of folders. I do not know how to get around it using the 5-digit date codes when it creates the folders.
View 3 Replies
ADVERTISEMENT
May 21, 2014
I am attempting to create a macro that will create a new folder on the network drive Arie:quotes that will create the new folder and save the the file in the new folder. I need the name of the file and folder to be set to the master (worksheet) cell "B3". and then if possible have it be conditional that if cell "B40" on the same master (worksheet) has a value to have the value added at the end of the filename via hyphen. This workbook has numerous worksheets in it approx 15 worksheets. I am not sure if this is relevant.
As an brief example.
Cell "B3" on the master(worksheet) contains a job name I-40 bridge
So initially I would like the Folder name and file name to be I-40 Bridge
However once the Cell "B40" has been filled in with the value 54213 then I would like the file to renamed to I-40 Bridge-54213 and saved within the same folder.
I am currently working with Excel 2007 Pro edition on windows 8. I
I have found several other macro's that work with an auto save but i am unsure of how to change the directory to the network drive and show the correct file paths. This is the example of the macro I am currently working with.
Public Sub SaveAsA1()
ThisFile = Range("B3").ValueMkDir "C:NewFolder"ChDir "C:NewFolder"ActiveWorkbook.SaveAs Filename:=ThisFileEnd Sub
View 4 Replies
View Related
Mar 31, 2014
I want to open C:Projects
and for each Project in Projects, create a new folder with the actual month (e.g. "03" or "12")
Im running the Makro from a file where I'd like to put the month in a cell -> so the code refers to cell("A1") wich has value 01 and creates a folder "01" in every projectfolder in C:Projects
View 3 Replies
View Related
Dec 6, 2007
I m having difficulty combining code to do this; create folder in network drive from excel list
T:Bob
Then subfolder T:BobFinancials
Then subfolder T:BobSecurity
View 3 Replies
View Related
May 25, 2006
way to create a group of folders in a specific location using a list of cells from an XLS file as the folder names.
For example, it would take whatever text is in Cell A1 and create a new folder in a specified location. It would take the text in Cell A2 and create a new folder in the same specified location. Etc.
View 9 Replies
View Related
Oct 17, 2006
I would like to create new empty folders from the list in column B.
The number of folders will vary depending on how many entry in column B.
I need the folders to be created in an existing folder in the "current directory" called "Shop_Drawings".
The following code may be able to be modified.
Sub CreateFolders()
Dim MyFile As String
Dim sDir As String
Dim rng As Range
Set rng = Sheets("Matdata").Range("B2")
While rng.Value <> ""
MyFile = rng.Text
sDir = "CurDirShop_Drawings" & MyFile
''above is where I am having trouble...don't know the correct syntax''
MkDir sDir
Set rng = rng.Offset(1)
Wend
End Sub
I have attached a sample workbook.
I have been getting by with code which requires changing the destination in the module whenever making folders in different diectories or drives.
View 6 Replies
View Related
Jun 26, 2007
I need to create a macro that will allow the user to create a directory based on a template directory, with all directory paths/ names stored in workbook cells:
1) Create a new directory (name/path specified in workbook)
2) Go to a template directory & copy the entire directory, subdirectories & all files
3) Paste them into the new directory
4) Save a copy of the workbook into the specified location from (3)
Example:
X:Templates
-copy all to-
X:Projects(Value specified in workbook cell)
View 3 Replies
View Related
Dec 23, 2008
I have created an appointment schedule spreadsheet. Once I get the spreadsheet running smoothly, I would like to create a worksheet for every day of the year that we are open.
I have decided to have one main folder with 26 subfolders in it. In each of those 26 subfolders, there will be one workbook with 12 worksheets in it. That will be two weeks worth of appointments as we are open Mon-Sat. Of course I want to name the worksheet tabs at the bottom of the workbook according to the appropriate calendar date. Then there is also a cell at the top of each page that also has the date, the same as the date on the tab. Just wondering if there is a simple way to create a macro to rename all these worksheet tabs, or if I have to physically open up each workbook, and rename all the worksheet tabs according to the calendar date. Then once the worksheet tab is named, can you make it automatically put the same date into Cell A1?
View 9 Replies
View Related
Apr 16, 2009
I want to create 26 - 27 folders (depends on financial year)
Basically in the current folder I want the folders to be created in the following format FE 22-04-09 for each fortnight in the financial year.
View 9 Replies
View Related
Feb 18, 2009
I have a list of file names sans extension in column A. I want to search a folder I specify and if file is found create a hyperlink to said file either in a new cell or in column A.
The code I have does the search fine, but its hyperlinking is offset and I can’t get it to match the link to the file name.
Also it breaks if it can not find the file.
Here is the code...
View 9 Replies
View Related
Jul 15, 2006
I have attached a workbook that creates new folders based on text in a cell.
As you can see when the button is pressed it runs the macro which when it is done calls the next & so on.
What I would like to know is there a way of acheiving the same results with a single macro.
Eg column A contains 4 cells with text. The macro when run will check for cell content then create folder based on that text macro will stop when next cell is empty.
View 9 Replies
View Related
Feb 8, 2013
My problem is to create a macro that will list all folders, subfolders and files in an order in excel. So that I know which folders and files belong to which main folder, more like a hierarchy.
For example,
Sourcefolder
Subfolder 1
File1
I have code that list all files in folders and subfolders, but it does not put them in a hierarchy fashion.
View 8 Replies
View Related
Jun 12, 2014
I need to back up files, which may be excel or MSword, by copying them from different directories, say C: to the backup directory, say X:. any vba to backup the files? I expect the vba can copy all file listed in column A.
E.g. C: est1File1.xls or C: est2File2.doc, and then pasted to the directory in column B. e.g. X:BackupFolder1 or X:BackupFolder2.
View 1 Replies
View Related
Dec 20, 2011
I have folders with different assigned folder icons based on the content in the folders.
I would like to arrange these folders in the window based on the assigned folder icons and then by alphabetical order.
How it is to be done. Can we make use of vba having the folders path list in one column of excel sheet?
View 9 Replies
View Related
Jul 8, 2013
macro and I think this has me on my way; however, I do not understand the code and I am having difficulty modifying it. It returns the path in cell $A1 of my workbook, but I get reference errors in $B1:$L1.
I would like for the code to start entering the values in row 2 of my current worksheet. Row 1 I want to make a header row. The first column I like having the file path. Can the path be changed to a hyperlink? I would then like for it to return the values in $AP1:$BC1 to $B1:$O1 of my current workbook.
View 4 Replies
View Related
Aug 16, 2009
I have managed to get this far - I have put together a macro (from different threads on this site) that opens closed workbooks, copies data in one of the sheets (same sheet in each of 28 books), and pastes the data it into a master book sheet, each paste starting below the last. So that bit is working. The first bit of help I need is a line of code that will make the macro loop through a number of sub folders in a main folder. My code at the moment works as long as I specify a path that ends with the name of one subfolder, and it only loops through this subfolder. I would like the path to end at the folder that holds all the subfolders ('Workbooks' in the path below), and then add some code that tells it to apply the macro to all subfolders in this folder, so it loops through them all.
The second issue is that after the macro goes to the closed book(s), copies the data in there and pastes it into the master sheet (into columns E:FG), I then need it to go back to the workbook it just copied from, go the same sheet, to three specific cells on that sheet (FH1:FH3), copy the content, go back to the master sheet, and now repeatedly paste the content (values only and transposed) of these three cells into three cells (in columns B:D, with row number being dependent on what rows the first lot of data was copied into) next to every row it just previously pasted in for me. When it loops to the next workbook, it needs to do the same, and the three cells will have different content than the ones in the previous workbook paste.
I dont know how to define the range it needs to paste into the second time. I tried using the definition I used for the first paste (MCDrow), to tell it that it is the same rows, just different columns, but this is not working.
Here is what I have so far, which does the first part of what I need, except for needing a way to have it loop through all subfolder in the 'Workbooks' folder (at the moment it lists Barwon South West as a subfolder in that path, but I actually have multiple subfolders, not all called Barwon South (all different names) that it needs to loop through and do both the first and the second paste for. I have taken out the code I was trying to use to do the second paste, as this was not working and the code is pretty messy as it is (I sort of bumble along, being so new, and I know the code is not very clean or efficient!).
Can someone help me put in the few lines I need to loop through all my subfolders (if you give me an example I can probably extrapolate), but to get you started, three of the subfolders are Barwon South West, Eastern Region and Gippsland. And can someone help me put in the code that will do the second paste for each workbook?
Sub Click2()
Application. ScreenUpdating = True
Dim MCDrow As Long
'Dim SubFolders As String
MCDrow = ThisWorkbook.Sheets("Client Data").Range("A65536").End(xlUp).Row
Fpath = "Q:Clinical ServicesCS Statewide DatabaseWorkbooksBarwon South West" ' change to your directory
'SubFolders = True
Fname = Dir(Fpath & "*.xls")
Do While Fname <> ""
ThisWorkbook.Sheets("Client Data").Unprotect
Workbooks.Open Fpath & Fname
Worksheets("Client Data").Activate
Worksheets("Client Data").Unprotect
View 6 Replies
View Related
Apr 4, 2014
I am working on Project Planning, I need to create the Progress curve for our Project based on Weight Factor every month.
I need to create the Plan and actual curve based on the dates defined in particular activities. Once the activity progress is calculated every month based on cut off date then it will sum product with corresponding WF to get the progress achieved every month. Presently I am calculating the values every month and pasting the values in Chart data every month. I had created the S Curve and attached here.
Now my objective is to automatically calculate the values for the entire cut off date at one time (From Project Start to End). i.e I don't want to do any manual work in the Chart. I will update only the actual Dates in the file, then the curves need to get automatically updated.
1) I don't want to calculate the progress for individual activities, I would like to calculate the overall progress directly.
2) When I change the Cut off date, then the previous values needs to become static.
View 1 Replies
View Related
Mar 17, 2008
I am trying to create a list which will summarise information from a dataset depending on two input cells in which dates are inputted by the user. I would really appreciate it if you could have a look at the file I have attached and give me some idea as to what formulae I should be using!
It is important that the position of the output list remains where it is (as ideally I want to draw graphs using the information summarised in the output list.
If your confused now when you look at the file it should make a bit more sense.
View 7 Replies
View Related
Apr 1, 2009
I have been asked to create a calendar which will display, on the applicable date of expiry, a contract name. Basically so someone can go and see what contracts are due to expire. And then if a new contract comes up it will automatically be added.
I have a list of Contract names in one column followed by the expiry date.
I have looked around and there are some things which could help but they are seriously complicated and I can't work out how to apply it to my situation.
View 11 Replies
View Related
Apr 16, 2014
I am trying to create a rolling 30 day average based on a date in a particular cell. I have 62 columns that I am looking at. We can call A1 7/1/14 and the 62nd column 8/31/14 for simplicity sake. I want to grab 30 values in row 2 as these columns are filled in daily so 8/1/14 takes the average of 7/2/14-8/31. On 8/5, I want 7/6-8/4 so on and so forth. The average that I need has to include at least one averageif stating that only nonzero "<>0" figures should be tabulated (just have business day transaction data but need all dates listed to tabulate 30 days). The range of dates will be fixed every month and info copied to tabulate on the first day.
View 1 Replies
View Related
Oct 23, 2013
I have a column with dates in each cell. I need the user to the able to pick a date from a list in the adjacent cell but it must be a date on the same weekday.eg if cell a1 is 23/10/2013 then cell b1 should display a list of Fridays in the future for the user to select from and then it should put the selected value in the cell (eg 30/10/2013).
View 1 Replies
View Related
May 2, 2008
I have been perusing various Excel sites in hopes of finding a macro or function that can create columns based upon two dates input into specific cells. My ultimate goal is to use this macro or automated function so that when the user inputs the dates, the columns would automatically be created for them, rather than having them do it manually.
ideally, the 'start' and 'finish' dates are named cells and the macro could determine the difference between the two and automatically insert columns to the left of a ' Totals' column.
View 9 Replies
View Related
May 12, 2009
I have a variable list of items in date order, there could be one, more than one, or, no items for any one date Each item has it's own line. I need a formula in a separate column (column F) to total each day's items. Column A includes the Date. Column F is a cumulative total (as in Column C) for items on the same date. Column C=D+E. I am looking for a formula which will add up items in column C if they have the same date in column A, and put the answer in the last cell in column F for that date. Example........................
View 5 Replies
View Related
Jan 13, 2013
I am creating a very simple spreadsheet to manage my gym memberships. It basically has membership number, first name, last name, membership type (drop down box) start date and expiry date. I have put in conditional formatting so that the expiry date goes red when expired but i want to try and automate the inputting of the dates so for example.
If i select '1 week membership) from the drop down box in the membership type box it will firstly change the start date to the current date (i think this is using the NOW() function) and secodnly changes the expriry date to todays date plus 6 days. Ofcourse i want the expiry date to increase depending on the selection so if i select 1 month membership it would be now date plus 28 days.
I am stuck as to how i can do this and from internet tutorials have been told it requires macro as it cant be done any other way?
View 14 Replies
View Related
Feb 11, 2008
i wanted to create a macro that will autofilter my starting dates in I to the newest date entered. So ive recorded the macro: ....
View 9 Replies
View Related
Jul 16, 2013
It is for a calibration spreadsheet that I run that keeps track of when items are due to be calibrated.
It works at the moment and has populated my outlook with calendar entry and reminder 2 weeks before they are due - which is perfect.
The problem is when I update one of the calibration dates I will want to re-run the macro to create a new appointment - but this will duplicate all the appointments that already exist! very annoying since there are over 200 items.
Sub outlook_appointment()
Dim olApp As Outlook.Application
Dim olAppItem As Outlook.AppointmentItem
[Code]...
View 1 Replies
View Related
Jul 18, 2013
Excel 2007 I have a spreadsheet of file boxes the keeps a log of boxes, contents, locations and shred dates. Currently figuring out when and which boxes can be shredded is a manual hunt, find, and then deal with it. I can use CF and Sorting but I have been looking at some search type functions to return a list meeting the requirements and trying to step my way towards that.
1st attempt. Was find out how many boxes meet the shred (before today) that have not already been detroyed. Column K is the Shred Date, D1 is Todays date, Column G is Status. Got this working good.
[QUOTE]]=SUMPRODUCT(--(Log!K2:K2136(lessthan)STATS!D1)*SIGN(LEN(Log!K2:K2136)))-(COUNTIF(Log!G2:G2136,"Destroyed"))[/QUOTE
My failed attempt came at trying to find the earliest shred date excluding those that have been destroyed. This is not really neeed but I was hoping it would get me closer to creating the list of boxes that meet shred that have not already been destroyed.
Note: Column A is the Box No. and the spreadsheet contains blanks as we continue to add file boxes to storage.
Below array formula find the highest box number used by each department.
Code:
=A4&"-"&TEXT(MAX(IF(Log!$A$2:$A$2136"",(LEFT(Log!$A$2:$A$2136,LEN(A4))=A4)*RIGHT(Log!$A$2:$A$2136,3))),"000")
I would like to create a list of boxes including Column A "Box no.", Column H "Location", Column K "Shred Date" for any box whose shred date is before today that has not aleady been labeled "Destroyed" in Column G.
View 4 Replies
View Related
Jun 20, 2008
I have about 20 plus workbooks in a folder. Each has 52 sheets, Fridays date, that I want to copy all the data from each sheet.
Is there a way to open all workbooks in a folder and copy all data from on all the various sheets into a single workbook?
I'm trying to gather the info and make a small data base from the various books. I'd like not to have to call each workbook by name as the file names change or get added to.
View 11 Replies
View Related
Oct 10, 2008
I have found a lot of posts which show me how to list a directory tree in an Excel file, usually using a macro. I'm just uninitiated with VBA / VBS and simply don't have the time to figure it out now (it really isn't part of my job description... I'm rather doing a favor here).
I need to be able to re-generate an excel-based list of clients at will. The client names are subdirectories of different case types. There aren't tons of case types, right now maybe 20 but I need to be able to add case types without breaking the script.
case_typeslast,_first_name........
View 5 Replies
View Related
Dec 25, 2010
I have created a macro named "SummaryCalculation" and I want to run this macro to more than 100 excel files which are saved in subfolders in a main folder. Each subfolders have atleast one excel file. I want the macro to be run with in these subfolders not the files are in main folder.
View 3 Replies
View Related