+ Reply to Thread
Results 1 to 11 of 11

help with nesting if statements? or

  1. #1
    Registered User
    Join Date
    09-27-2017
    Location
    here
    MS-Off Ver
    2007
    Posts
    5

    help with nesting if statements? or

    Hi All

    Seems I'm have a bit of trouble piecing this together...and ideas would help me greatly. I've tried all I know and even some stuff I don't know....no luck...sigh....

    L12="X" AND M12="" AND N12="" AND O12="" THEN J12-1
    L12="" AND M12="X" AND N12="" AND O12="" THEN J12-1
    L12="X" AND M12="X" AND N12="" AND O12="" THEN J12-2
    L12="" AND M12="" AND N12="" AND O12="" THEN J12


    thanks

    Cutterwolf

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,440

    Re: help with nesting if statements? or

    Try something like:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    09-27-2017
    Location
    here
    MS-Off Ver
    2007
    Posts
    5

    Re: help with nesting if statements? or

    Hey, Good Morning,

    thanks for the response....

    it works halfway...and is better than what i had for sure....I may have explained it wrong....

    If a user selects and "x" in either N12 or O12 it shouldn't be a blank result ("") it would just not affect the outcome either way if that makes sense....


    Im enclosing the file... I am working on the "TOPS" tab

    thanks again for your help!

    Cutterwolf
    Attached Files Attached Files

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,440

    Re: help with nesting if statements? or

    Not looked at it yet but columns N and O appear to be redundant in relation to the outcome of the other combinations. That's why I took them out and put something in place for them both being NOT blank. Perhaps it should NOT/OR rather than NOT/AND

  5. #5
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: help with nesting if statements? or

    I am not clear what you are doing but it seems that
    j12-countif(l12:m12,"X") may be close to what you require or be a main part of your formula

  6. #6
    Registered User
    Join Date
    09-27-2017
    Location
    here
    MS-Off Ver
    2007
    Posts
    5

    Re: help with nesting if statements? or

    Sorry, I will try and explain...

    the idea is that when an x is selected in one of the 2 columns/cells (L,M,) ..it triggers the size to change by 1 in the R column/cell , if there is no x it remains the same. the N and O don,t affect the R column/Cell but will affect the S column/cell in the same way when I add the formula to it, but it wont affect the L or M in the same fashion....


    I will try to add the suggested code...

    Thanks to you both for your suggestions..
    Last edited by cutterwolf44; 04-04-2019 at 10:49 AM.

  7. #7
    Registered User
    Join Date
    09-27-2017
    Location
    here
    MS-Off Ver
    2007
    Posts
    5

    Re: help with nesting if statements? or

    Thanks for the guidance guys...I was over thinking it....it made sense what you said...

    thanks again!!!

    Please Login or Register  to view this content.

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,440

    Re: help with nesting if statements? or

    You're welcome.



    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

  9. #9
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,440

    Re: help with nesting if statements? or

    I think you may have missed a trick here as davsth's solution is much neater. I was looking at the problem again and came to exactly the conclusion that davsth did ... but he beat me to it in post #5. Basically, you subtract 1 whenever there is an "X" in columns L:M, so it makes sense to just count the number of Xs. No nested IF required, especially as you are no longer taking into account the other columns.

  10. #10
    Registered User
    Join Date
    09-27-2017
    Location
    here
    MS-Off Ver
    2007
    Posts
    5

    Re: help with nesting if statements? or

    Jeez...your right...I did miss that, since I was so focused on the "not making the other 2 become affected". I lost sight of how easy it really was.... Kudos to Davsth as well.

  11. #11
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,440

    Re: help with nesting if statements? or

    You're welcome.


    All credit to davsth

+ 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. Nesting IF Statements
    By glail in forum Excel General
    Replies: 1
    Last Post: 02-04-2017, 10:58 AM
  2. Nesting IF and OR statements
    By cheeky300 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-20-2014, 08:17 AM
  3. [SOLVED] Nesting 3 OR statements
    By Groovicles in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-13-2014, 10:19 AM
  4. nesting more than 7 if statements
    By KAPearson in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-28-2012, 06:24 AM
  5. Nesting more than 7 If Statements, need help
    By Padgoi in forum Excel General
    Replies: 7
    Last Post: 10-24-2008, 11:55 AM
  6. Nesting IF statements
    By penny in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-03-2007, 04:02 PM
  7. nesting if statements
    By tjb in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-09-2005, 07:05 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