+ Reply to Thread
Results 1 to 8 of 8

Extracting Text As A Number in a Betting Odds

  1. #1
    Registered User
    Join Date
    10-04-2012
    Location
    Not here, it's rubbish!
    MS-Off Ver
    Excel 2003/2007/2010
    Posts
    66

    Extracting Text As A Number in a Betting Odds

    Hi All,

    I’m sure this kind of question has been asked before in this forum but I haven’t been able to find anything close. Plus, 3 days of working on this problem and I’m near to defeat!

    So, the problem here is fairly straight forward. In the attached file are 3 columns; Stake placed in £ Sterling and the betting odds in column B. The first thing to note is that the odds need to be typed in and displayed as xx/y or x/yy or xx/yyy etc. So, this column is formatted as text to achieve this. This also may be the source of part of the problem.

    What I need to do with column B is extract as a number before the slash / and after the slash so I can calculate the winnings on the stake placed. The maximum number of characters before and after the slash / will be no more than four but can occur in various combinations.

    The problem for me I don’t know how to locate the position of the slash / and extract what is before and after it in any combination of characters before and after. If this is possible, can what is extracted then be treated as a number? Or, is my choice of formatting incorrect?

    Hoping someone can help me. Many thanks in advance.
    Attached Files Attached Files

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Extracting Text As A Number in a Betting Odds

    I didn't download your file.

    For the numbers to the left:

    =--LEFT(A1,FIND("/",A1)-1)

    For numbers to the right:

    =--MID(A1,FIND("/",A1)+1,5)
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,215

    Re: Extracting Text As A Number in a Betting Odds

    Beaten by T.V.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,987

    Re: Extracting Text As A Number in a Betting Odds

    With data in B2, to find the numbers before the slash:

    =LEFT(B2,FIND("/",B2)-1)

    and after:

    =MID(B2,FIND("/",B2)+1,999))
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  5. #5
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Extracting Text As A Number in a Betting Odds

    try this formulas
    Attached Files Attached Files

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Extracting Text As A Number in a Betting Odds

    Quote Originally Posted by rcm View Post
    try this formulas
    ------
    https://www.excelforum.com/showthread.php?t=1040120

  7. #7
    Registered User
    Join Date
    10-04-2012
    Location
    Not here, it's rubbish!
    MS-Off Ver
    Excel 2003/2007/2010
    Posts
    66

    Re: Extracting Text As A Number in a Betting Odds

    Thank you all for replying. I've some new formulae to study!

  8. #8
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Extracting Text As A Number in a Betting Odds

    You're welcome. We appreciate the feedback!

+ 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. How to calculate Bookmaker real odds (odds less commission) in Excel 2013 ?
    By sbeekallan in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 04-09-2015, 08:43 AM
  2. Betting odds conversion from fractions to percentages
    By gbilic in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 04-04-2013, 11:03 AM
  3. [SOLVED] extracting number from cell contains both text and number alternatively
    By green369 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-03-2013, 10:17 AM
  4. Replies: 3
    Last Post: 08-31-2011, 09:11 AM
  5. Formula required to calculate betting odds/returns
    By jonrayworth in forum Excel General
    Replies: 0
    Last Post: 07-13-2010, 08:14 AM
  6. betting odds combinations,
    By JOOJOHN in forum Excel General
    Replies: 2
    Last Post: 02-14-2009, 10:17 AM
  7. Replies: 6
    Last Post: 07-29-2008, 03:23 PM

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