+ Reply to Thread
Results 1 to 4 of 4

IF Formula Query for Integers and Non-Integers

  1. #1
    Forum Contributor
    Join Date
    11-11-2011
    Location
    London England
    MS-Off Ver
    Excel 2011 for Mac
    Posts
    157

    Question IF Formula Query for Integers and Non-Integers

    Hi,

    I have a worksheet for working out percentages for College Basketball spreads in relation to handicaps and in short I am looking to minimise the amount I need to do manually.

    In short all I am struggling to make work is how it determines the percentages for calculating a tie.

    If the Handicap equals a non-integer (e.g. 1.5 - it's usually a half of something) the percentage = 0%.

    I have the handicap in cell A8. What I am struggling to think of is a suitable IF criteria to force this. The cell for the tie% is B11 and the Game Power Rating difference needs to be positive which I have forced in C8.

    If the handicap in A8 is an integer the formula I will add is:

    NORMDIST((A8+0.5),C8,10,TRUE)-(NORMDIST((A8-0.5),C8,10,TRUE))

    I've probably missed a bracket somewhere above but am confident in the formula.

    I am thinking the easiest way of doing this is through an IF function but cannot think of a suitable IF criteria to sort determine an integer from a non-integer.

    The rest of the sheet I have reduced down to the point where you just need to add team names, ratings and a handicap.

    I'd be grateful for any advice anyone can offer (and am happy to attach the sheet).

    Thanks in advance,
    Last edited by mrvp; 03-09-2012 at 07:36 PM. Reason: Solved.

  2. #2
    Forum Expert icestationzbra's Avatar
    Join Date
    01-07-2004
    MS-Off Ver
    2007, 2010
    Posts
    1,421

    Re: IF Formula Query for Integers and Non-Integers

    if you are looking to figure out whether a number is integer or not, you could use something as simple as this:

    =IF(A1-INT(A1)<>0,"not","int")

    with your number in A1.

  3. #3
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: IF Formula Query for Integers and Non-Integers

    im not sure i understand the full desired output, but here is an if statement that will help you.

    =IF(MOD(A8,1)>0,WHAT TO DO IF NON-INTEGER,WHAT TO DO IF INTEGER)
    If you liked my solution, please click on the Star -- to add to my reputation

    If your issue as been resolved, please clearly state so and mark the thread as [SOLVED] using the thread tools just above the first post.

  4. #4
    Forum Contributor
    Join Date
    11-11-2011
    Location
    London England
    MS-Off Ver
    Excel 2011 for Mac
    Posts
    157

    Re: IF Formula Query for Integers and Non-Integers

    Thanks DGagnon - I tried this solution first and it works absolutely fine (except it revealed an error in another formula when dealing with handicaps that are integers as I now have something that should add up to 100% adding up to somewhere between 100 and 110%). A little bit more work to do for me yet.

    Many thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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