+ Reply to Thread
Results 1 to 3 of 3

IF formula with double condition

  1. #1
    Forum Contributor
    Join Date
    03-18-2013
    Location
    Bulgaria
    MS-Off Ver
    Excel 2010
    Posts
    139

    IF formula with double condition

    Hello guys,

    I have this formula
    =IF(ABS(H34)+ABS(H38)=ABS(H43); "Equal"; "Not Equal")

    However I found that I must adjust it accordingly with another condition.

    Basically if H34>0 and H38>0, or if H34<0 and H38<0 - the formula should be =IF(ABS(H34)+ABS(H38)=ABS(H43); "Equal"; "Not Equal")
    However if H34>0 and H38<0, or if H34<0 and H38>0 - the formula should be =IF(ABS(H34)-ABS(H38)=ABS(H43); "Equal"; "Not Equal")

    Can I do that with some more advanced expression of IF formula, or do I need to use another method to accomplish that?

    Thank you in advance!

  2. #2
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561

    Re: IF formula with double condition

    Try this:

    =IF(H34*H38>=0,IF(H34+H38=H43,"Equal","Not equal"),IF(ABS(34)-ABS(H38)=ABS(H43),"Equal","Not equal"))

    Might be adapted depending on how you want to treat zeros.
    CC


    If you feel really indebted please consider a donation to charity. My preferred charity is ActionAid but there are plenty of worthy alternatives.

  3. #3
    Forum Contributor
    Join Date
    03-18-2013
    Location
    Bulgaria
    MS-Off Ver
    Excel 2010
    Posts
    139

    Re: IF formula with double condition

    It works great! I adjusted it a little, however I found another issue. It doesn't give me proper valuation, and I think I found the reason. One of the amounts in the calculation is 50 345.32
    However if I increase the decimal point to 10, it appears as 50345.3200000834. How do I make excel ignore any digit after the second decimal ?

    P.S.: I included ROUND and it is working now. Thank you for your help!
    Last edited by dreddster; 04-15-2013 at 07:52 AM.

+ 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