Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Excel


Advertisements:










Macro To Import TXT Data


I have a TXT file that is properly format for a nice print out but not in any fashion to work in an excel or access file.

My txt file looks something like this
Header info Row 1
Header info Row 2
Header info Row 3
ACCT# Value Descripton ~ Part number
Customer Name ~ Vendor Name
Customer add1 ~ Vend add1
Customer add2 ~ Vend add2
Custom city, st, zip ~ vend city, st, zip

Repeat about 5 or 6 more entries
do a page bread and repeat the headers and then 5 or 6 more entries

I want to automatically copy the entries and place the data into Row 1 of Excel starting in Column 1 through Column 12

Then the 2nd entry would be in row 2 etc


View Complete Thread with Replies

Sponsored Links:

Related Forum Messages:
Macro Code To Import Data
I am trying to use a dynamic VBA code to import data into a xcel sheet from another sheet. I currently have it working but in the code I have the directory and the file name listed for the file to be imported. I would like to change this to a cell referance inside my sheet so that I can make changes to the name of the file or the directory location and the VBA code would use the cell reference as the source data.


View Replies!   View Related
Macro Button: Import Data
how to make a button(s) which will import data. I have to make a report and import some cells from 350 other excel files. Report is attached to this post. In the yellow cells should be buttons. The code for first one is :

Sub CopyRanges() ....

View Replies!   View Related
Import Data And Delete Macro
after importing data (data >> get external data >> import text file) and running a macro that contains

Cells(i, 5).EntireRow.Delete Shift:=xlShiftUp


i cannot insert any data into the next column below. why is this so? is it because of the excel memory that remembers that a macro has been previously ran in that cell before? example i import text file into B1 then the data will be imported into different cells using delimiters. the data will occupy from row 1 to 22. After i run the macro which combines fields with similar data the data will occupy row 1 to 15. then when i try to import data into B16. the "import text file" option will be grayed out. why is this so? how do i solve the problem?

View Replies!   View Related
Import Web Data Macro Using Today's Date In Url
I have recorded a macro to import web data, from a sporting site,
problem is URL is date and event specific.

View Replies!   View Related
Macro/vba: Grouping Data From Csv Then Import Into Excel
I have a data file saved as csv like this:

Risk Postcode,Effective Year Month,Written Premium,Written Units,Earned Premium,Earned Units,Claim Cost,Claim Count,Glass Manufacture Decade,
2600,200507,0,0,5.7354,0.0765,0,0,1920,
2600,200508,0,0,5.7354,0.0765,0,0,1920,
2600,200509,0,0,7.1693,0.09563,0,0,1920,
2700,200510,0,0,5.7354,0.0765,0,0,1920,
2700,200507,0,0,5.7756,0.0885,0,0,1930

what i want to do is to group the record with the same postcode together and just return one record for each postcode in excel.

so the output will have the postcode, the sum of written premium, written units.

I understand i can use Access to do it, but I want just to use excel for this task.

View Replies!   View Related
Macro To Export And Import A Module And Assigning Different Macro Automatically
Macro to export and import a module and assigning different macro automatically ...

View Replies!   View Related
Date Format- Data Retrieved Via Import Data Tools
I have the following data retrieved via import data tools ...

View Replies!   View Related
Import Macro ..
I have only ever created macros in existing workbooks. Is there an easy way to copy a macro from one workbook to another, without having to run a new macro in the new workbook and then paste the code into it from the old workbook?

View Replies!   View Related
External Data In Spreadsheet Without Having To Import All The Data
I'm wondering if I can use external data in an excel spreadsheet without having to import all the data. I basically need a persistent connection with the external data and I want the excel spreadsheet to get the item descriptions by using the item number as the user types in the item number. Writing out the descriptions is killing me and I have all my products in an excel spreadsheet already. I really need someway to link two separate excel files together. One with data and one with user input that searches that data as I type in the item number.

View Replies!   View Related
Macro To Import .DAT File
I would like to have a macro that will allow me to browse to the desired file and import the data into columns. I have the macro working to the point of allowing me to browse, select the file, and pasting the contents into the active sheet.

The things that I need help with are:

1. Getting the data to paste into a specific cell instead of A1. Currently the code is

CELLS.SELECT
ACTIVESHEET.PASTE

I would like the data to start in A7.


2. Getting the file parsed into columns. The format of the .DAT file is static and only has 4 columns. Currently when it imports, the entire record (row) all of the data is in the same column. I would like it separated into individual columns if possible.

View Replies!   View Related
Macro To Import From .csv Files
1. I've recorded a macro that imports values from 6 different .csv files at once. The problem is that not all of these files are going exist upon import. Is there a way to tell the macro to only import if the file exists? And to skip if the import of that file if it doesn't exist? Right now the debugger stops the macro because of file not found.

2. I want to press a button on Sheet 1 that copies Sheet 1 into a new Sheet that's named with today's date. E.g. I press the "Archive"-button, the sheet is copied to a new sheet with the name "051308".


View Replies!   View Related
Import/Copy Macro
I'm trying to create a macro that will import data from another excel
file, into my current excel file.

Basically, I see the process going as follows:
1. Run Macro via Button
2. Pop-Up Window asking for File Location (importBook)
3. Import Data from importBook into sheet entitled Data
4. Click OK once import is complete

I've got some knowledge of coding but macro coding knowledge is
limited. If anyone has an existing code or can whip one up, I would be
very appreciative.

I started out with this

Dim filename As Variant
filename = Application. GetOpenFilename()
Workbooks.Open filename

View Replies!   View Related
Import Log File With Macro
I did a macro the import a log file from a specific directory and now i want that the user could enter the path of the directory that contain the file Is there a way to do it?

ub ALL_Logs_files()

'
' Logssss Macro
' Macro recorded 3/4/2007 by dzaitoun
'

Sheets.Add
ActiveSheet. Name = "Foresight FP Data"

With ActiveSheet.QueryTables.Add(Connection:= _
"TEXT;C:Documents and SettingsdzaitounDesktopLog out filesforesight.fp.out" _ , Destination:=Range("A1"))
.Name = "foresight.fp"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True ..............

View Replies!   View Related
Import Macro To Personal.xls
I have found several examples of excellent macro code on this site.

Is there a procedure to import a macro code ( saved as a TXT file) into the Personal.xls file?

For example, the following code removes blank spaces and converts text to proper case.

Is there an easy way to save this as a macro in my Personal.xls file?

'Macro Code to apply TRIM and PROPER functions on the selected range ..

View Replies!   View Related
Import Macro With No Extensions By Timestamp
I want to automate the download process of these scan files we use. I can figure out how to do that if not for the two wildcards I'm about to throw out.

What I can't seem to figure out is how to use VBA to determine which files to import. I was thinking about possibly having VBA look for the time stamps on these files in the scan file directory, and then only import those ones which created in less than an hour from current time.

I have only a few days of VBA experience, so I don't have a clue where to start. If anyone could provide assistance/point me in the right direction.

By the way, the files that I am importing will be a comma delimited file. However, for some reason, the files are all extensionless (without .xxx)

View Replies!   View Related
Macro - Report Header Import
I've got a basic handle on the application/use of macros, & personally use them for cleaning up data exported from a very very old as400esq application.

My problem is that i have managed to clean up all the blank data & piffle, but Im stupped by the header part of the text dump.

Heres an example;
A B C D E F
-------------------Header A-------------
1 3 john 50 piano
4 1 Bill 25 horn
6 5 Ted 60 trumpet
-------------------Header B-------------
3 3 Phil 71 Cello
1 1 James 83 Viola
3 2 Earnie 62 Violin

I basically want to rid the header rows from the spreadsheet & drop the header description (Header A/ Header B) into column F for all those items below until you get to the next header.

View Replies!   View Related
Import Macro - Getting An Error When Running It
I tried to adapt this code into my own from another thread. [url]

BUT, I am getting an error when running it. On the "For i" line. And I know just enough VBA to be dangerous. Can someone help?

I have another code setup to run if a certain cell equals "October" then it calls ImportData. Then this code is supposed to pull all files out of My documents/TechConnect/October08 and place the data into sheet 1....

View Replies!   View Related
Macro To Import Log Files With Different Delimiters
I need to import a number of log files into a spreadsheet, each log will go into a separate tab. The logs are text files (.log) that have the same structure but slightly differ from each other.

For example all the logs will have many lines of data all starting with a date and then a number of delimited fields. In some logs the delimiter is a coma, in others is a unique charachter such as "{" or "@". Also the delimited fields are not a given quantity, they can vary too from log to log. How can I write a macro that understands what delimiter needs to be used and then imports all the file accordingly into one spreadsheet (in separate tabs)?

I tried something with the macro recorder and browsed for directions on the internet but really am clueless on this one. I am using windows 2000, and referenced Windows Scripting Runtime.

View Replies!   View Related
Import Text File 4 Macro
I'm trying to import a text file with an Excel 4 macro. I tried the Open.Text function but I cant assign a date (YYYYMMDD) format to the first field.

View Replies!   View Related
Import Text File Using A Macro
Can we create a macre that can convert txt file into excel.

View Replies!   View Related
Import Data
I have this VBA macro which imports data from a text file. I do not know exactly how to make it good.

I have two sheets, named <INDATA> <Drawing_list>

On sheet <Drawing_List> I made a command button with this ....

View Replies!   View Related
Import Data From The Web (VBA)
there is i website that i want to imoport data from it to my excel sheet using vba, but the poblem is that the website will need my username and password...

i search around for possible threads and i found a very close one but couldnt have it do the submit option. also i donot want it to show me the intenet explorer window. i just wantit to do these steps:
after clicking a button:

1-logon to the site using my user and password
2-redirecting to the report link and improt what ever is in that page
3- all this with out opening IE.

Public Declare Function ShowWindow Lib "user32" (ByVal lHwnd As Long, ByVal lCmdShow As Long) As Boolean

Private Sub LoginTone()

'Dim ie As InternetExplorer
'Set ie = New InternetExplorer
Dim ie As Object
Set ie = CreateObject("InternetExplorer.Application")

With ie
.Navigate "http://s8.brono.com:80/mongol/fiona/index.php" ; this is the login address
Do While .busy And .readyState 4: DoEvents: Loop.......................


View Replies!   View Related
Import Of Data ...
The task that I have to make is a little bit complicated, especially for reason that I am not v VBA programmer. But however here is the task (and is not a school assignment).

First I have to clear the worksheet Invoice_Plan (file Financialplan.xls), but the whole row(s) that have data in column F (comment) have to stay on worksheet.

Than I have a worksheet Data (file invoices.xls where are all invoices from year 2009) and in column A are the data, that I have to import into in worksheet Invoice_Plan to (second file FinancialPlan.xls) in column A data under following rules (other must be skipped):

View Replies!   View Related
Import Multiple Text Files & Copy Each Import
I'm attempting to import around 200 (and growing!) separate text files into Excel. I am using the formula below to import the text file and then using a separate macro to select the information I need, copy it into another spreadsheet, and then run the import macro again.

However, I have a problem in that my import macro gives me 'Run-time error '1004:

Application defined or user defined error''. At first this wasn't a problem as the information is pasted into the spreadsheet despite the error anyway. However, now that I am looping the macro it is obviously causing more problems as it prevents the loop. I would really appreciate it if anyone knows of a work-around or can spot an error in the coding to resolve this!

The code below shows is for the import macro only:

Sub ImportTextFile(FName As String, Sep As String)

Dim RowNdx As Long
Dim ColNdx As Integer
Dim TempVal As Variant
Dim WholeLine As String
Dim Pos As Integer
Dim NextPos As Integer
Dim SaveColNdx As Integer

View Replies!   View Related
Speed Up A Macro (text File Import)
Attached is a workbook that takes an imported text file, inserts rows with text.

It is SLOW, you can watch each line being inserted with the text, I would think with such a small sample dataset it would be much much quicker.

Information: See attached xls file.

On sheet1 is the imported data, sheet2 is a copy of the imported data so one can copy and paste to sheet1 as needed with out re-importing for test purposes and only for this query. (Sheets2 thru 3 are not used otherwise).

There is a command button on sheet one which will run macro "aaa". If you run this you will see how slow it is and exactly what it is doing.

I am simply looking for a way to speed this up, I have some files that are 10 times the size of the sample data and they take 10 or more minutes to run.

View Replies!   View Related
Creating Macro For Automated Import Of A .txt File
Create macro for automated import of a .txt file ...

View Replies!   View Related
Macro To Import Chosen Text File
How can I import data from a text file into my activeworksheet? Also, I need the user to be able to choose which text file to import.

View Replies!   View Related
Import External Data
I'm trying to pull in data from another Excel workbook which gets updated on a regular basis. Using the Import External Data fucntion in Excel I created a query which pulls the data from the original workbook into a tab in the workbook I'm using. The issue I'm having is that not all of the column headers get pulled in when using the Import External Data function. I tried typing the column headers in myself but they disappear again after refreshing the data set. Any ideas what is causing the issue?


View Replies!   View Related
Normalizing Data For Import
I need to import a massive spreadsheet into QuickBase. It will have close to twentyG records when(if) I can do this thing.

The table i'm importing into (Groups) is a details table which carries the 'Many' attribute in a M:N relationship.

There is a column in the spreadsheet (Groups) that is distributed over several columns:

UserID---------------Groups
=====================================
12345---------------SPE-UID, SPE-PRE, SPR-DDR
34567---------------ADR-NNB
56789---------------NNI-ZIY, HII-PRE, SPR-DDR

In order to import into QuickBase, I need these data to be normalized:

UserID---------------Groups
=====================================
12345---------------SPE-UID
12345---------------SPE-PRE
12345---------------SPR-DDR
34567---------------ADR-NNB
56789---------------NNI-ZIY
56789---------------HII-PRE
56789---------------SPR-DDR

Can Excel create a normalized arrangement like what I have above without my having to manually work this? It would take days if I had to.


View Replies!   View Related
Import Appropriate Data To Worksheet
I have a workbook that contains an 'AllData' sheet. That sheet has 6 columns titled "category, keyword, bid, advertisers, search vol, online". Each category has its own worksheet and i want to put the data for each category onto the corresponding worksheet. I am having a difficult time describing this so I have attached a brief example. I have to do this for 145 categories so I would much prefer to do it automatically rather than manually.

View Replies!   View Related
Import Data From Several Worksheets
I have several of the attached files that come in every week for me to process. I would like to be able to put all of them in a folder and have the highlighted columns copy to one master file and eliminate all the extra blank rows. I also need it to sort by salesman with all of their sales in the different catagories grouped together. I am not sure if this can be done given the way the salesman's names are not on each line with their sales.

View Replies!   View Related
Import Of External Data
Iíve got a question regarding import of external data in excel. The workbook I am conceiving at the moment does have a database query from another excelfile(a report from my business system) via the standard Excel functionality and it works perfectly fine.
What I canít figure out is how to re-direct my query to any file/path I choose.

At the moment I just replace my original file with a new freshly updated one but I am stuck with the original path and filename or else it wonít work.


View Replies!   View Related
External Data Import
I am trying to import the data on the url below. When I go to the external data inport the page is loaded and I click the indicator to load the central table but when the data loads the page is severally corrupted. I have found this on a few pages but some pages load correctly.

View Replies!   View Related
Import Data Via VBA Script
I've just been task to create a VBA script macro button in Excel so it automatilly pulls data from my SQL database. Can anyone show/point me to the right direction on how to accomplish this?

View Replies!   View Related
Import Data From Different Spreadsheets
I am trying to import data from different spreadsheets "about 100" to a principal spreadsheet which will have all the centralized data. I included the principal spreadsheet layout and a sample of two detail spreadsheets. The information that I want to import is from column B 1 to 5 from the detail spreadsheets and put into the principal spreadsheet from row D to G.

Is there any way to import this information automatically, like creating a macro or something similar.


View Replies!   View Related
Access Data Import
I am having some issues importing data from Excel to Access. I am attempting to import about 45000 rows of data from Excel to Access. It appears Access is only importing about 16000 of the 45000 rows. I am using 'import' in 'get external data'.

View Replies!   View Related
Not Enough Memory On Data Import
I'm trying to import data into my sheet with formulae like this in row1(Columns A:I): ='F:Dir[File.xls]Sheet'!A2.

The files I'm importing the data from all have 50.000 rows and 9 columns, so I copy the formulae downward 50.000 times. This generates an error ('Not enough memory'), not surprisingly. I've also tried to do it in steps by way of VBA; first two thousand, copy and paste values, next two thousand etc. But that doesn't work either.

Does anyone know of a solution to this memory problem or a way to work around it (without opening the files with the data in them).

View Replies!   View Related
Import Data Or Lookup
I am trying to import data from an external source file (Excel) into an Excel sheet that will get uploaded into a db accounting system.

The source data varies month to month in the number of rows and need I to import 7 columns.

The upload file will be saved as a text file for the upload.
I tried to use Import External Data, but since the rows vary in size (anywhere from 1 - 2000 rows) I had to create a named range for the entire column. Upon saving this caused all rows beyond the last row of data to have quotes in them which will kill the upload.
Is there a way around this with the Import External Data, or is there a better way through some combination of INDEX, MATCH, INDIRECT or the like?

View Replies!   View Related
Import Data Grayed Out
This is on the Data- Import External Data menu.

Please how can I enable it to continue my work?

View Replies!   View Related
Garbled Data After CSV Import
I have excel 2003 & when I import a csv file, the left column is all garbled & not readable.

The program I used to create the file is called auction yen, which analyses eBay's Want It now forum & allows you to save it as a .csv file

Here are some pics of the file & also a link to download it.
[url]

View Replies!   View Related
Import Data To New Sheet
how can I import data to another sheet in VB in excel as in my coursework i have 5 drivers in seperate workbooks and I also have a main workbook. from my main workbook I got a drop down box so if i choose a particular driver it will import it into a new sheet.

View Replies!   View Related
Transposing Data For Import
I need to transpose some data for import into our accounts package, the budgets are produced in a fairly standard horizontal format with periods across the top & account codes vertically.

The import requires period data to be be transposed vertically

I have attached a worksheet with an example, is this possible in excel. the only way I have managed to accomplish this is via MS Access

View Replies!   View Related
Import Data Via Combobox
I am trying to trigger an event when a value from a combobox in Excel is chosen. E.g If i choose "Option 1" from the combobox then push Command_Button 1 (for example) i would like excel to connect to my database and pull all information on "Option 1", if i change my mind and want to see all information on ("Option 10"), i would like it to go and get "Option 10" info anfter the button is pushed. I have had a look around and cant see anything that comes close to completing this. I though about using the worksheet change event to trigger this but the application comes back stating "Application Error or object defined error".

View Replies!   View Related
Import Bloomberg Data
If it is actually not possible to change the way that bloomberg exports the information to excel then i think there might be two potential ways around it...neither of which i am sure how to do...

1) write some sort of macro which takes data from the new workbook, pastes it into the active workbook then closes the newly created workbook. Potential problem here is that whenever it creates a new workbook it has a slightly different name. eg. "abc1" then "abc2" etc.

2) Write some sort of macro which gets a list of companies from bloomberg with upcoming events over the next week, put this into the active workbook and then simply use the bloomberg get functions to fill out the info.

View Replies!   View Related
Import Updated Data From Web
Is there a way to have Excel retrieve updates from a Web Site? Specifically what I am interested in getting is flight schedule information from sites like USAir, JetBlue, American or Other carriers. I have a list of Dates and FLight numbers in a spreadsheet, I would like to get updates on Arrival, Departure or status ( Delayed / Cancelled etc ). The Excel sheet would provide Date, Carrier, Flight Number, Departure Point (if Needed ), Destination Point ( if needed ) and flight Departure and Arrival Times. I would want to pass this data to the appropriuate Web site.

View Replies!   View Related
Import Data From Another File
My task is to make an excelfile that import data from other excelfiles. These data should then be summarized. There's not always same files. I should be able to add more files.

View Replies!   View Related
Excel Macro Referencing A Variable File Name To Import
I have this Macro for Excel which imports 1 file C:datafilesuser1-data-1.txt into cell E52:

View Replies!   View Related
Import Contact Info From Macro Address Book 4.0.6
At job, Mac OSX and Address Book 4.0.6 with contact info including in many cases emails. I'd like to get it of there, into Excel to manipulate, and ultimately into a FileWrecker Pro database. How to export 1087 entries from Address Book including only selective data fields is the question, and I know that's "slightly" OT, but I do want to import into Excel, so I hope that vindicates me! If not, and you can point me to a good MacForum, I'll settle.

View Replies!   View Related
Import Data From Spreadsheets To A Pdf Form
How to import data from excel spreadsheets to a pdf form? I have a PDF form and was wondering if you could have the data from an excel speadsheet automatically go into my PDF form.


View Replies!   View Related
Batch Import External Data
I have several thousand text files, each with three columns of numbers. My goal is to convert each of these to a dbf file with three distinct columns (which is why simply renaming each with .dbf at the end doesn't work.) I can do this for an individual file by using the "Import External Data" Tool in Excel, selecting the "Fixed Width" option (which divides the figures into three distinct columns), and then saving the file as a dbf. I need to do this for several thousand files, however, so I can't do each by hand.

View Replies!   View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved