Results 1 to 26 of 26

[VBA] Copying data from Excel to .txt File

Threaded View

  1. #1
    Registered User
    Join Date
    01-30-2020
    Location
    Planet Earth
    MS-Off Ver
    2016
    Posts
    96

    [VBA] Copying data from Excel to .txt File

    Hello

    I am trying to make VBA to copy data from Excel to .txt file.
    The problem is that I am not quite sure of 2 things

    1) How to define the range so that VBA should know to take a specific range for each Car make (for the first Car make the range was initiated manually). So I think the condition would be something like: If(Car make==same as Car make from rows below), then do a minimum on Mileage for that range, and this should be done for each Car make.
    .
    2) How to make the code more efficient rather than declaring a lot of variables. As there would be hundreds of entries (multiple Car makes, and after each make the lowest Mileage should be displayed). As what has been done so far for rows 2-3 should also be done for rows 4-7, and so on... But for the sake of the example I kept it short.


    Below you'll find attached the Workbook (the code is located in Module1), as well as the expected Answers in the .txt file.

    I would be more than grateful if someone could help me out with it.

    Many thanks, I appreciate it!

    Gordon
    Attached Files Attached Files
    Last edited by Gordon85; 03-23-2020 at 08:06 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Copying data from one excel file to another based on key value
    By mfgoose in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-14-2015, 03:41 AM
  2. Copying the data from 3 files to 1 Excel file
    By spe88 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-19-2015, 03:57 AM
  3. Copying data from a file to an Excel spreadsheet
    By alexander.small in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-01-2013, 07:24 AM
  4. copying data from txt into Excel file
    By MalgosiaMen in forum Excel General
    Replies: 1
    Last Post: 08-07-2013, 04:32 AM
  5. [SOLVED] Closed excel file. Data copying.
    By pixel34 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-04-2013, 03:27 PM
  6. [SOLVED] I need a macro for copying the data of all excel files into one sheet of a excel file.
    By pavan_yuvaraj in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 10-18-2012, 09:23 AM
  7. copying data from several files to one excel file
    By sharman in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-02-2006, 09:40 AM

Tags for this Thread

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