+ Reply to Thread
Results 1 to 2 of 2

Macro to combine a Text File & Excel file into one Separate workbook

  1. #1
    Forum Contributor
    Join Date
    10-02-2013
    Location
    Houston, TX
    MS-Off Ver
    office 365
    Posts
    638

    Macro to combine a Text File & Excel file into one Separate workbook

    I have 2 Files that I would like to combine into one workbook- each having its own TAB AT BOTTOM. I would like to open a excel spreadsheet named "Comparison" and have a button "Macro" that when activated it would ask for first the file to import and then you would select the Text File (Pason Data Run 1) and it would import it into its own tab with the excel sheet.

    One of the problems I have when importing the text file is (2 of the columns) need to be married together as one. ( Date & Time ) on the new worksheet and the other data in there own respective columns -- I would like the date and time to read like ( ex: "8/12/14 06:01" )

    A. The problem I have had with this is when I import the text file into excel manually it does not read the date properly so I have to manually change it so it recognizes it as a date then combine the date and time into one column.

    I have included an excel sheet named "How the Pason Data Should Look Once Imported as text" this is how it looks after I imported it manually - notice that column (a,b,c) are highlighted Column 'A' would not format as date so I had to create column 'B' and manually enter in the dates then in Column 'D' I combine column (C & B) to make my date and time format.

    then you could run another macro for the Excel sheet (well Guide Run 1) to import into its own tab with in the new workbook.

    I use both Files (Pason Data run 1 & Well guide Run 1) to run a correlation log and I need the date and times the same for that to happen.

    There is a lot more I want to do but i thought I would start with this. Any help would be great.

    I have attached 3 files
    1- Text file that need to be import to new sheet (pason data run 1)
    1- excel file that needs to be included on that same workbook juts different tab
    1- example of my import into excel manually of the Pason data

  2. #2
    Valued Forum Contributor
    Join Date
    03-22-2013
    Location
    Australia,NSW, Wirrimbi
    MS-Off Ver
    Excel 2013
    Posts
    1,057

    Re: Macro to combine a Text File & Excel file into one Separate workbook

    Hi..

    Give this a whirl for you first part (importing text file with correctly showing date format)..

    Please Login or Register  to view this content.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 2
    Last Post: 04-12-2013, 07:56 PM
  2. [SOLVED] VBA Script to run from separate file instead of current excel workbook
    By chouston in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-12-2013, 07:16 PM
  3. Replies: 1
    Last Post: 02-23-2013, 08:36 AM
  4. Macro button to separate workbook as a file name referenced from cell.
    By Moonpie in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-09-2012, 12:19 PM
  5. Can you e-mail separate sheets in an Excel Workbook file?
    By FruityPebbles in forum Excel General
    Replies: 5
    Last Post: 04-01-2012, 03:05 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1