Results 1 to 8 of 8

Logical test for integer or non- integer

Threaded View

  1. #1
    Registered User
    Join Date
    08-01-2011
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2007
    Posts
    3

    Logical test for integer or non- integer

    I am trying to calculate the relative percent difference (rpd) between the values in two cells where one or both the values may be input as "<0.1" (as an example). The rpd formula is:

    =ABS(x-y/((x+y)/2))

    Where the data values could be any of the following four formats:

    x , y
    1 , 2
    1 , <0.2
    <0.2 , 2
    <0.1 , <0.1

    If both values are in the "<0.1" format I need "BBL" to be displayed, If one is "<0.1" I need the formula to see that cell as "0.1" (I can have another cell with "0.1" that it can reference).

    I think all I need is a nested IF statement where the logical test decides if each cell is an integer or not.

    Closest I've got (which doesn't work) is:

    =IF((AND(A1>0,B1>0)),ABS((A1-B1)/((A1+B1)),IF(A1<0,ABS((C1-B1)/((C1+B1)/2)),IF(B1>0,ABS((A1-C1)/((A1+C1)/2)),(IF((AND(A1<0,B1<0)),BBL,"Error")))))

    Where C1 is "0.1"

    Any help would be awesome!
    Last edited by MHRW; 08-04-2011 at 12:51 AM.

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