+ Reply to Thread
Results 1 to 4 of 4

Can somebody explain to me what does this formula mean?

  1. #1
    Registered User
    Join Date
    08-26-2010
    Location
    Ohio, USA
    MS-Off Ver
    Excel 2003
    Posts
    10

    Can somebody explain to me what does this formula mean?

    =IF(ISERROR(N23/F23),0,IF(ABS(N23/F23)>10,"NM",IF(AND(N23>0,(N23/F23)<0),-N23/F23,IF(AND(N23<0,(N23/F23)>0),-N23/F23,N23/F23))))

    word by word for each of the ISERROR, 0, IF(ABS... etc. Thank you.

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,452

    Re: Can somebody explain to me what does this formula mean?

    Have you checked the syntax of the different functions used?

  3. #3
    Registered User
    Join Date
    08-26-2010
    Location
    Ohio, USA
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Can somebody explain to me what does this formula mean?

    E23=6156 F23=6169 N23=13 (6169-6156). That formula is put into column O to yield 0.21%

    but I could've easily done =(F23/E23)/E23 to yield 0.21% as well. Why did someone have to make the formula that long?

  4. #4
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Can somebody explain to me what does this formula mean?

    liur3n,

    That formula says the following (reading from left to right):
    If N23/F23 results in an error, then output 0
    Else if the absolute value of N23/F23 is greater than 10, then output "NM"
    Else if N23 is greater than 0 and N23/F23 is less than 0, then output -N23/F23
    Else if N23 is less than 0 and N23/F23 is greater than 0, then output -N23/F23
    Else output N23/F23

    Basically, if the cell F23 = 0 (which would cause an error, as anything divided by 0 results in "#DIV/0"), the formula returns 0 (to avoid the error)
    Then the formula checks if the division would result in a value higher than 10 (regardless of if the value is positive or negative), and if so, the formula returns "NM"
    Then, the formula checks the sign of the numerator (N23), and makes the formula result the same sign, so if the numerator is positive, the result is positive, or if the numerator is negative, the result is negative.
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

+ 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