+ Reply to Thread
Results 1 to 13 of 13

Multiple If Condition Formula

  1. #1
    Forum Contributor
    Join Date
    11-12-2012
    Location
    Jeddah, Saudi Arabia
    MS-Off Ver
    2010, 2013, 2016, Office 365
    Posts
    507

    Multiple If Condition Formula

    Hi,

    I am trying to apply a formula with multiple if conditions in Column D, but I could not get the correct result. I need your simple solution to get the expected result as in Column G.


    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Multiple If Condition Formula

    Although it is helpful to show us expected results, you are going to have to explain why you expect that result. What are the conditions and calculations you want to apply to each of those cases?
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Contributor
    Join Date
    11-12-2012
    Location
    Jeddah, Saudi Arabia
    MS-Off Ver
    2010, 2013, 2016, Office 365
    Posts
    507

    Re: Multiple If Condition Formula

    Hi Jeff,

    Expected the results are in Column G. I have already have a formula in Column D only some part of it works. I added one more formula to it but it does not give the results (Highlighted in yellow).

    Please Login or Register  to view this content.
    This part of the when include, it is not giving the result.

    Please Login or Register  to view this content.
    This part of the formula giving the correct result.

    All the conditions are mentioned in the formula.

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Multiple If Condition Formula

    Quote Originally Posted by Barieq View Post
    All the conditions are mentioned in the formula.
    But if the formula is giving the wrong results, then the conditions are not what you intend. That is why I'm asking for the conditions described in text, so I can compare that to the formula and see what doesn't match.

  5. #5
    Forum Contributor
    Join Date
    11-12-2012
    Location
    Jeddah, Saudi Arabia
    MS-Off Ver
    2010, 2013, 2016, Office 365
    Posts
    507

    Re: Multiple If Condition Formula

    Thanks, now the below formula works. But it is giving me error in xls file because of more level of nested formulas. Anyway I am attaching the file with all the conditions, could you please reduce the below formula.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,572

    Re: Multiple If Condition Formula

    Is the problem that the formula in post #5 doesn't work in 97-2003 workbooks which use the .xls file format?
    I ask because in the workbook attached to post #5 all 104 values in column D match those in column G.
    EDIT: The following may work in the 97-2003 versions:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by JeteMc; 09-30-2023 at 10:27 AM. Reason: Added edit
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  7. #7
    Forum Contributor
    Join Date
    11-12-2012
    Location
    Jeddah, Saudi Arabia
    MS-Off Ver
    2010, 2013, 2016, Office 365
    Posts
    507

    Re: Multiple If Condition Formula

    Quote Originally Posted by JeteMc View Post
    Is the problem that the formula in post #5 doesn't work in 97-2003 workbooks which use the .xls file format?
    I ask because in the workbook attached to post #5 all 104 values in column D match those in column G.
    EDIT: The following may work in the 97-2003 versions:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Yes now the formula is working in xlsx, I want it to apply to .xls file but it gives me error. More levels of nesting..
    Last edited by Barieq; 09-30-2023 at 04:02 PM.

  8. #8
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow Re: Multiple If Condition Formula


    Hi,

    to check on some Microsoft website : if I well remember the imbrated IF are limited to seven levels under 2003 versions
    and as your formula has more than seven so the reason why the error arises …

    As a reminder this is the VBA forum section, so next time for a formula create your thread in the appropriate forum section !

  9. #9
    Forum Contributor
    Join Date
    11-12-2012
    Location
    Jeddah, Saudi Arabia
    MS-Off Ver
    2010, 2013, 2016, Office 365
    Posts
    507

    Re: Multiple If Condition Formula

    Yes I know it's VBA Forum, the formula I want to apply to the VBA Code. Can you provide me the code vba for this multiple conditions.
    Last edited by Barieq; 09-30-2023 at 04:42 PM.

  10. #10
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow Re: Multiple If Condition Formula


    Anyway as under Excel 2003 the nested IF can't be over 7 so do you really need to go with very old .xls workbook format ?
    If yes rather than such poor IF formula you should better use a VLOOKUP formula on a range / table
    and once it works manually if really a VBA procedure is necessary then easy to start with the Macro Recorder …

    IF function nested formulas and avoiding pitfalls

  11. #11
    Forum Contributor
    Join Date
    11-12-2012
    Location
    Jeddah, Saudi Arabia
    MS-Off Ver
    2010, 2013, 2016, Office 365
    Posts
    507

    Re: Multiple If Condition Formula

    Thanks for your information. I will solve it by changing the file format.

  12. #12
    Forum Contributor
    Join Date
    11-12-2012
    Location
    Jeddah, Saudi Arabia
    MS-Off Ver
    2010, 2013, 2016, Office 365
    Posts
    507

    Re: Multiple If Condition Formula

    @Marc L,

    Solved... With only three If's

    Please Login or Register  to view this content.

  13. #13
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Thumbs up Re: Multiple If Condition Formula


    Well done, must work even under 2003 version !

+ 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. [SOLVED] If formula with multiple condition
    By leakhna in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-18-2021, 12:43 PM
  2. Help with IFS formula with multiple condition
    By GoldenChicken in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-26-2021, 09:21 AM
  3. If Formula for Multiple Condition
    By zamal264 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-16-2020, 01:32 PM
  4. Multiple Condition Formula Help
    By CRL10GS in forum Excel General
    Replies: 3
    Last Post: 01-05-2018, 03:25 PM
  5. Formula with multiple Condition
    By rizmomin in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 12-07-2017, 04:11 PM
  6. help with multiple condition formula
    By pembr0ke in forum Excel General
    Replies: 1
    Last Post: 02-17-2016, 11:25 AM
  7. Multiple condition IF formula
    By pcarpilot in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-17-2006, 11:07 PM

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