+ Reply to Thread
Results 1 to 7 of 7

how to automatically remove text data among stock prices?

  1. #1
    Registered User
    Join Date
    04-16-2013
    Location
    canada
    MS-Off Ver
    Excel 2007
    Posts
    8

    how to automatically remove text data among stock prices?

    Hi, every one here. I would be very grateful if anyone could help me to solve the problem. my problem is:
    I have worksheet for importing stock prices from yahoo, but every time when the worksheet refreshed for updating data, there are many text data like words"split","date".etc came together among prices. is there any way to remove such thing automatically. thanks.

    E

  2. #2
    Forum Contributor Portuga's Avatar
    Join Date
    02-20-2004
    Location
    Portugal
    MS-Off Ver
    365
    Posts
    852

    Re: how to automatically remove text data among stock prices?

    You could create a macro that deletes all letters and other characters you dont want in it.
    This is a crude approach and i´m sure the code could be refined, but it works.

    Select the data and then run the macro.
    Add more characters to the code if needed.

    Please Login or Register  to view this content.
    If you found the solution to your question. Mark the thread as "Solved"
    Thank everyone that helped you with a valid solution by clicking on their

    There is no such thing as a problem, only a temporary lack of a solution

  3. #3
    Registered User
    Join Date
    04-16-2013
    Location
    canada
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: how to automatically remove text data among stock prices?

    Thanks so much. Your code perfectly solved my problem and very efficient, it reduce my too many work for deleting each text line, now I just highlight each sheet and run your macro . Since I have over 100 stocks in different sheets (over 100 sheets), there is any way for your macro to run automatically. For example, every day when I open the file, all data in each sheets automatically updated, how can the macro can automatically highlight all sheets and run your macro? Thanks so much.

  4. #4
    Forum Contributor Portuga's Avatar
    Join Date
    02-20-2004
    Location
    Portugal
    MS-Off Ver
    365
    Posts
    852

    Re: how to automatically remove text data among stock prices?

    I´m sure there are ways to loop through every sheet in the workbook using VB, but I´m not sure how.

    Maybe one of the VB experts here can help you.

    Something like this I assume, but this only works on the active sheet for some reason:

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    04-16-2013
    Location
    canada
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: how to automatically remove text data among stock prices?

    Hi, thanks so much for your help. after use your second macro, there is a problem occur. The first macro code no longer work like before. it can't remove symbol *, if I add * in the list, it removed all data I highlighted.
    second problem is the text removed, but left blank rows among the data, how to delete the blank rows after removing text from them.
    My main purpose is to delete all the rows which contain text, like picture attached, I want delete row 68 and row 69.
    123.PNG


    Thanks.

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: how to automatically remove text data among stock prices?

    Only my guess
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    04-16-2013
    Location
    canada
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: how to automatically remove text data among stock prices?

    Thanks so much for your great help. This is perfect one.

+ 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