Results 1 to 8 of 8
  1. #1
    Lounger
    Join Date
    Jan 2014
    Posts
    30
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Macro to Extract/Update certain data from text file to spreadsheet

    Hi,

    I need to extract certain data and update my spreadsheet from text file, at the end of text file there is summary from there i want to extract/update the values to my workbook. The spreadsheet columns hold the (A1) code, (B1) state & (C1) Amount. Amount to be extracted from text file and updated to spreadsheet.
    I have attached the text file and workbook for details.
    Thanks.
    Attached Files Attached Files
    Last edited by John_2014; 2015-11-05 at 11:42.

  2. #2
    Gold Lounger Maudibe's Avatar
    Join Date
    Aug 2010
    Location
    Pa, USA
    Posts
    2,631
    Thanks
    115
    Thanked 645 Times in 589 Posts
    John,

    The codes attached to the following names in the txt file do not match codes attached to the same name in the spreadsheet:

    740 Providence
    741 Bernalillo
    742 Bowie
    749 Macomb
    750 Passaic
    754 Cecil
    755 Montgomery
    756 Milwaukee
    757 Monroe

    Can you explain?

    Maud

  3. #3
    Lounger
    Join Date
    Jan 2014
    Posts
    30
    Thanks
    7
    Thanked 0 Times in 0 Posts
    Hi Maud,

    Can you explain?
    That's because i made the data dummy, while doing that i made mistakes, my regrets.
    '
    Thanks.
    Last edited by John_2014; 2015-11-08 at 01:14.

  4. #4
    Gold Lounger Maudibe's Avatar
    Join Date
    Aug 2010
    Location
    Pa, USA
    Posts
    2,631
    Thanks
    115
    Thanked 645 Times in 589 Posts
    John,

    Could you post a corrected Book2.xlsx as I will be using lookups based on the code number in the solution.

    Maud

  5. #5
    Lounger
    Join Date
    Jan 2014
    Posts
    30
    Thanks
    7
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Maudibe View Post
    John,

    Could you post a corrected Book2.xlsx as I will be using lookups based on the code number in the solution.

    Maud
    Hi Maud,

    Fine, new Book2_Rev.xlsx uploaded in order.

    Thanks.
    Attached Files Attached Files

  6. #6
    Lounger
    Join Date
    Jan 2014
    Posts
    30
    Thanks
    7
    Thanked 0 Times in 0 Posts
    Hi Maud,

    I have uploaded revised excel file and awaiting your response.

    Thanks in advance.

  7. #7
    Gold Lounger Maudibe's Avatar
    Join Date
    Aug 2010
    Location
    Pa, USA
    Posts
    2,631
    Thanks
    115
    Thanked 645 Times in 589 Posts
    Working on it John

  8. #8
    Gold Lounger Maudibe's Avatar
    Join Date
    Aug 2010
    Location
    Pa, USA
    Posts
    2,631
    Thanks
    115
    Thanked 645 Times in 589 Posts
    John,

    Here is a revised spreadsheet with some code that will open the text file and pull in matching amount values for the state based on the code number. Change the complete path of the text file in cell H1.

    I have updated it to be quicker and more generic for your text files

    HTH,
    Maud
    Attached Files Attached Files
    Last edited by Maudibe; 2015-11-15 at 14:59.

Posting Permissions

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