+ Reply to Thread
Results 1 to 7 of 7

import data from txt to excel starting from a specific date to other date

  1. #1
    Registered User
    Join Date
    04-30-2009
    Location
    Spain
    MS-Off Ver
    Excel 2010
    Posts
    88

    import data from txt to excel starting from a specific date to other date

    I've got a csv file with comma delimiters, and would like to retrieve the data within a chosen date range. The date format at the beggining of each row is mm/dd/yyyy and the inputs are the initial date and end date so as the search ignores those rows out of the chosen range.

    Is it possible to do that?
    Last edited by dvb_24; 11-23-2011 at 06:10 AM. Reason: clarify

  2. #2
    Registered User
    Join Date
    04-30-2009
    Location
    Spain
    MS-Off Ver
    Excel 2010
    Posts
    88

    Re: import data from txt to excel starting from a specific date to other date

    I have this but don't know how to match the dates

    Do While Not a.AtEndOfStream

    strLine = a.ReadLine

    Loop

  3. #3
    Registered User
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,164

    Re: import data from txt to excel starting from a specific date to other date

    Can you please attach the CSV file and also provide the date range you are looking at with its respective fields in the file.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  4. #4
    Registered User
    Join Date
    04-30-2009
    Location
    Spain
    MS-Off Ver
    Excel 2010
    Posts
    88

    Re: import data from txt to excel starting from a specific date to other date

    Thanks for your help. I would like to get from 1st of june 2010 to 1 of sep 2011.

    I'm having troubles to upload the csv file so have upload a txt instead which has a different delimiter but think that might be very similar.
    Attached Files Attached Files
    Last edited by dvb_24; 11-22-2011 at 05:09 AM.

  5. #5
    Registered User
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,164

    Re: import data from txt to excel starting from a specific date to other date

    Is this date range constant? Or do you want the user to input the date range?

  6. #6
    Registered User
    Join Date
    04-30-2009
    Location
    Spain
    MS-Off Ver
    Excel 2010
    Posts
    88

    Re: import data from txt to excel starting from a specific date to other date

    The range is not constant so would like it to be flexible.

  7. #7
    Registered User
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,164

    Re: import data from txt to excel starting from a specific date to other date

    Use this code -
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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