+ Reply to Thread
Results 1 to 3 of 3

Creating a macro that gets data from text file and charts it.

  1. #1
    Registered User
    Join Date
    04-08-2014
    Location
    Hendersonville, NC
    MS-Off Ver
    Excel 2010
    Posts
    3

    Question Creating a macro that gets data from text file and charts it.

    OK
    Need to create a macro that imports data from a text file one or two columns. Place the data starting at "A1" and down. Data could be any length of rows. My macro does this "Range(Selection, Selection.End(xlDown)).Select. The problem is three lines down..." ActiveChart.SetSourceData Source:=Range("Sheet1!$A$1:$A$15")". How do I pass the Range Selection to the ActiveChart.SetSourceData Source to get all rows starting from "A1" to the bottom of data? It could be column "B1" included also. Each sheet in the Excel file might have a different text file to import.

    Any help would be greatly appreciated!

    jon124

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,614

    Re: Creating a macro that gets data from text file and charts it.

    Try:
    Please Login or Register  to view this content.
    or probably even better:
    Please Login or Register  to view this content.
    Best Regards,

    Kaper

  3. #3
    Registered User
    Join Date
    04-08-2014
    Location
    Hendersonville, NC
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Creating a macro that gets data from text file and charts it.

    thank you that's it.

+ 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. Creating text file from textbox (MACRO)
    By boon-yao.tek in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-11-2013, 11:12 AM
  2. Creating a text file and writing data to it
    By Thomas.stenson in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 03-09-2013, 02:09 PM
  3. Creating charts using text/nominal data
    By indibones in forum Excel General
    Replies: 4
    Last Post: 11-24-2010, 12:58 PM
  4. [SOLVED] Creating charts from a .dat file with vba.
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-19-2006, 12:40 AM
  5. Creating a text file and printing excel spreadsheet data onto it
    By Brett Smith in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-22-2005, 12:25 PM

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