Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default ecel:create a file name from data in worksheet

I wish to extract data from several workbooks that are created every day.
The daily workbooks have a common eliment in their file names Eg.
On the 1st of june the file names would be :-
ABC 010607
def 010607
on the 2nd of june the file names would be:-
ABC 020607
def 020607
I wish to create ao spread sheet that I cancreate the file name:-

ABC+"010607"
def+"010607"
The next day I would just have to update the +"******"


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,117
Default ecel:create a file name from data in worksheet

this should give you some ideas...........

dim sFileName as string
dim sPath as string
dim dDate as date
dim sDate as string

sFileName = "ABC"
sPath = "Z:\Susan\My Documents\DANC Rehab 2005\" '<---- change to
your path

set dDate = format( xxxxx, "ddmmyy")
' xxxx = wherever the date is set in the workbook
' you could just set a hidden cell with =today()
' and reference that

Workbooks.SaveAs Filename:=sPath & sFileName & dDate & ".xls"

untested - might have minor bugs to be worked out.
hope it helps!
susan


On Jun 3, 2:48 pm, carter30
wrote:
I wish to extract data from several workbooks that are created every day.
The daily workbooks have a common eliment in their file names Eg.
On the 1st of june the file names would be :-
ABC 010607
def 010607
on the 2nd of june the file names would be:-
ABC 020607
def 020607
I wish to create ao spread sheet that I cancreate the file name:-

ABC+"010607"
def+"010607"
The next day I would just have to update the +"******"



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
Create a formula in a date range to locate a specific date - ecel util Excel Discussion (Misc queries) 0 February 19th 07 03:03 PM
Use detailed data in one worksheet to create summary data as chart source rdemyan Charts and Charting in Excel 0 January 23rd 07 02:18 PM
create 50 copies of a worksheet in the same file Lynn Excel Worksheet Functions 5 December 22nd 06 04:17 AM
How do I create a new worksheet for a subset of data Bennie Excel Discussion (Misc queries) 2 July 20th 06 11:26 PM
how do i create and save a new file or worksheet autmatically ever DAN Excel Discussion (Misc queries) 0 March 30th 05 03:07 PM


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

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"