+ Reply to Thread
Results 1 to 5 of 5

Assistance with using the IF & AND together in a formula

  1. #1
    Forum Contributor
    Join Date
    10-10-2012
    Location
    Australia
    MS-Off Ver
    Excel 2016 on 365 Subscription (Win 10)
    Posts
    134

    Assistance with using the IF & AND together in a formula

    Hi there,

    I have been working for a long time on this spreadsheet and I got it to finally to work as expected .... that was until I tested so amendments to the raw data.

    Now I find that the formula works in some instances but not others and I can't seem to resolve it.

    Any assistance would be most grateful.

    I have added Notes to cells EA7-10, EE7-10 & EI7-10 to explain what the expected results should be for each of those cells.
    Last edited by [email protected]; 05-08-2020 at 03:54 AM.

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

    Re: Formula not quite working as expected

    If it's OK I add an equal sign (cell EI10, pull up for other values
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    The SUM function is redundant in your formula
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    I did not resolve the values between parenthesis to keep the logic structure

  3. #3
    Forum Contributor
    Join Date
    10-10-2012
    Location
    Australia
    MS-Off Ver
    Excel 2016 on 365 Subscription (Win 10)
    Posts
    134

    Re: Formula not quite working as expected

    Awesome, thanks Pepe, I have tested both of your formulas and they both work OK. I'll use the =IF(AND(EA10>0;EE10>=0),-($A$2-EH10+(-($A$2-ED10))),-($A$2-EH10)) as you have explained the SUM function I used initially is redundant.

    Thanks heaps

  4. #4
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Formula not quite working as expected

    I don't get the logic of the calculation.
    But from expected results

    EI7
    =IF(OR(EA7>0,EE7>0),EH7-ED7,EH7-$A$2)

    or just
    =EF7

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

    Re: Formula not quite working as expected

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however the thread title does not really convey what your request is about. Tell us what you are trying to do, not how you think it should be done.

    Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)
    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

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Formula dependency order (precedents) not working as expected (Excel bug?)
    By lsmith999999 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 01-24-2020, 12:01 AM
  2. Match Column formula not working as expected
    By Moggzy in forum Excel General
    Replies: 1
    Last Post: 09-20-2019, 04:04 AM
  3. IF AND Formula not working as expected
    By mra1984 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-31-2018, 10:43 AM
  4. [SOLVED] MODE formula not working as expected
    By JakeMann in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 11-14-2017, 02:18 PM
  5. [SOLVED] Formula in CF not working as expected
    By ImranBhatti in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-10-2017, 07:58 AM
  6. [SOLVED] Formula not working as expected
    By nalamarmite1 in forum Excel General
    Replies: 4
    Last Post: 03-08-2016, 08:34 AM
  7. vlookup/if formula not working as expected
    By Shocked in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-11-2008, 10:06 AM

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