Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You need to write you own VBA excel macro
It wuld look somethin like this sub Get Data() PrefixFileName = "PrefixFilename" for i = 1 to 251 MyfileName = Prefixfilename + Cstring(i) ' converts integer i to a string Workbooks.Open Filename:=MyfileName, ReadOnly:=True ' Removed pathname from file name so it can be referenced in this program. 'Basic doesn't like the full pathname???? stupid microsoft Do While (1) CharPosition = InStr(MyfileName, "\") If CharPosition 0 Then MyfileName = Mid(MyfileName, CharPosition + 1) Else Exit Do End If Loop Cells("A1").Copy _ Destination:=Workbooks(MyWorkbook).Worksheets (MyWorksheetName). _ Range("F2"). _ Offset(rowOffset:=0, columnOffset:=0) Next i end sub "Tommy" wrote: I need to import financial data from 251 days, and wondered if there is a script or method that I can use to do this, so that I dont have to repeat "import external data" 250 times? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
importing multiple .dat files! | Excel Worksheet Functions | |||
Importing from multiple Excel files | Excel Discussion (Misc queries) | |||
importing multiple text files into the same worksheet | Excel Discussion (Misc queries) | |||
importing multiple text files URGENT!!! HELP | Excel Worksheet Functions | |||
importing multiple text files??? | Excel Discussion (Misc queries) |