+ Reply to Thread
Results 1 to 7 of 7

Processing downloaded data

  1. #1
    Brickcounter
    Guest

    Processing downloaded data

    I'm downloading share prices form a web page to excel 97, and I get number &
    text in a single cell. e.g. 343p.
    Is there a formula to remove the text so I can use the resulting number in
    further calcs?



  2. #2
    Valued Forum Contributor
    Join Date
    03-25-2004
    Location
    Boston, MA US
    Posts
    1,094
    Brickcounter,

    If you have multiple text characters and they always appear at the end of the string you can use this array formula.

    =VALUE(LEFT(A1,MAX(IF(ISNUMBER(--MID(A1,ROW(INDIRECT("1:10000")),1)),ROW(INDIRECT("1:10000"))))))

    Commit with Ctrl-Shift-Enter not just Enter.

    If the data always ends in a "p" then you can use this formula:

    =VALUE(SUBSTITUTE(A1,"p",""))

    OR

    Use Text to Columns using the Other delimiter option of "p".

    HTH

    Steve

  3. #3
    Brickcounter
    Guest

    Re: Processing downloaded data

    thanks Steve,
    the Value function served my purpose.
    BC

    "SteveG" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Brickcounter,
    >
    > If you have multiple text characters and they always appear at the end
    > of the string you can use this array formula.
    >
    >

    =VALUE(LEFT(A1,MAX(IF(ISNUMBER(--MID(A1,ROW(INDIRECT("1:10000")),1)),ROW(IND
    IRECT("1:10000"))))))
    >
    > Commit with Ctrl-Shift-Enter not just Enter.
    >
    > If the data always ends in a "p" then you can use this formula:
    >
    > =VALUE(SUBSTITUTE(A1,"p",""))
    >
    > OR
    >
    > Use Text to Columns using the Other delimiter option of "p".
    >
    > HTH
    >
    > Steve
    >
    >
    > --
    > SteveG
    > ------------------------------------------------------------------------
    > SteveG's Profile:

    http://www.excelforum.com/member.php...fo&userid=7571
    > View this thread: http://www.excelforum.com/showthread...hreadid=556106
    >
    >




  4. #4
    Valued Forum Contributor
    Join Date
    03-25-2004
    Location
    Boston, MA US
    Posts
    1,094
    You're welcome.

    Cheers,
    Steve

  5. #5
    Bobocat
    Guest

    Re: Processing downloaded data

    Hi Steven,

    In your formula, I found that 2 minus sign before MID, what is the meaning
    of --MID?
    Moreover, can I use row(1:10000) to replace row(indirect("1:10000")?

    Now I am trying to extract the text character from the cell, sometimes at
    the front or sometimes at the end

    Bobocat

    "SteveG" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Brickcounter,
    >
    > If you have multiple text characters and they always appear at the end
    > of the string you can use this array formula.
    >
    > =VALUE(LEFT(A1,MAX(IF(ISNUMBER(--MID(A1,ROW(INDIRECT("1:10000")),1)),ROW(INDIRECT("1:10000"))))))
    >
    > Commit with Ctrl-Shift-Enter not just Enter.
    >
    > If the data always ends in a "p" then you can use this formula:
    >
    > =VALUE(SUBSTITUTE(A1,"p",""))
    >
    > OR
    >
    > Use Text to Columns using the Other delimiter option of "p".
    >
    > HTH
    >
    > Steve
    >
    >
    > --
    > SteveG
    > ------------------------------------------------------------------------
    > SteveG's Profile:
    > http://www.excelforum.com/member.php...fo&userid=7571
    > View this thread: http://www.excelforum.com/showthread...hreadid=556106
    >




  6. #6
    Valued Forum Contributor
    Join Date
    03-25-2004
    Location
    Boston, MA US
    Posts
    1,094
    Bobocat,

    There is probably a less cumbersome formula but this array formula should work for you.

    =VALUE(MID(A1,MIN(IF(ISNUMBER(--MID(A1,ROW($1:$10000),1)),ROW($1:$10000))),MAX(IF(ISNUMBER(--MID(A1,ROW($1:$10000),1)),ROW($1:$10000)))-MIN(IF(ISNUMBER(--MID(A1,ROW($1:$10000),1)),ROW($1:$10000)))+1))

    Commit with Ctrl-Shift-Enter.

    The "--" is a double unary operator. It coerces excel to recognize the numbers stored as text as numbers. I tested without the indirect function and it appears to work fine.

    HTH

    Steve

  7. #7
    Bobocat
    Guest

    Re: Processing downloaded data

    Thank you so much, I will try
    Bobocat

    "SteveG" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Bobocat,
    >
    > There is probably a less cumbersome formula but this array formula
    > should work for you.
    >
    > =VALUE(MID(A1,MIN(IF(ISNUMBER(--MID(A1,ROW($1:$10000),1)),ROW($1:$10000))),MAX(IF(ISNUMBER(--MID(A1,ROW($1:$10000),1)),ROW($1:$10000)))-MIN(IF(ISNUMBER(--MID(A1,ROW($1:$10000),1)),ROW($1:$10000)))+1))
    >
    > Commit with Ctrl-Shift-Enter.
    >
    > The "--" is a double unary operator. It coerces excel to recognize the
    > numbers stored as text as numbers. I tested without the indirect
    > function and it appears to work fine.
    >
    > HTH
    >
    > Steve
    >
    >
    > --
    > SteveG
    > ------------------------------------------------------------------------
    > SteveG's Profile:
    > http://www.excelforum.com/member.php...fo&userid=7571
    > View this thread: http://www.excelforum.com/showthread...hreadid=556106
    >




+ 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