+ Reply to Thread
Results 1 to 5 of 5

Help: Multiple IF formulas

  1. #1
    Registered User
    Join Date
    01-26-2012
    Location
    New York
    MS-Off Ver
    Excel 2010
    Posts
    5

    Help: Multiple IF formulas

    Hi,

    I'm trying to create a formula that takes one of two courses of action, depending on the relationship between two variables.

    In effect, I'm trying to combine the following two IF formulas:

    1. =IF(AND(AG35="TRUE",Z35>AB35),AB35-Z35)

    2. =IF(AND(AG35="TRUE",Z35<AB35),Z35-AB35)


    Could someone point out the correct syntax?

    Thank you!!

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2406 Win 11 Home 64 Bit
    Posts
    23,951

    Re: Help: Multiple IF formulas

    =If (And(AG35="True",Z35>AB35),AB35-Z35, if(And(AG35="TRUE",Z35<AB35),Z35-AB35, Value if both If Statements are False))
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    01-26-2012
    Location
    New York
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Help: Multiple IF formulas

    Thank you!

  4. #4
    Forum Contributor
    Join Date
    11-26-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    159

    Re: Help: Multiple IF formulas

    =if(and(ag35="true",z35>ab35),ab35-z35,
    if(and(ag35="true",z35<ab35),z35-ab35))

  5. #5
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,481

    Re: Help: Multiple IF formulas

    Give a try:
    Please Login or Register  to view this content.
    Alternative formula:
    Both cases, AB35-Z35 or Z35-AB35 will returns minus of the different
    Please Login or Register  to view this content.
    Quang PT

+ 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