+ Reply to Thread
Results 1 to 3 of 3

Thread: Formula with Text

  1. #1
    Forum Contributor
    Join Date
    12-28-2006
    Location
    Germany
    MS-Off Ver
    2003
    Posts
    137

    Formula with Text

    I have a spreadsheet that contains data in a cell that is formatted like:

    3 for 50

    It will always be coded like that, no other format. How do I get excel to return the number 3, but not the for 50 in a new cell? Is there a way I can tell Excel to return the number before the word for?

    Thanks.

  2. #2
    Forum Moderator dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003 & 2007
    Posts
    3,714

    Smile

    Good morning kingsolo

    Do you want to return the number as a value, so it can be used in other formulae? If so use this formula :
    =VALUE(LEFT(A1,FIND("for",A1,1)-2))
    (assumes your data starts in A1.

    Otherwise, use this :
    =LEFT(A1,FIND("for",A1,1)-2)

    HTH

    DominicB

  3. #3
    Forum Contributor
    Join Date
    12-28-2006
    Location
    Germany
    MS-Off Ver
    2003
    Posts
    137
    Thanks... worke like a charm.

+ 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.2.0