+ Reply to Thread
Results 1 to 12 of 12

If formulas

  1. #1
    Registered User
    Join Date
    08-01-2013
    Location
    Cardiff
    MS-Off Ver
    Office 365
    Posts
    64

    If formulas

    Hi

    I am after an if formula that is reliant on two different cells. for example

    Cell C3 is reliant on C1 and C2

    If C1 is 'No' and C2 is 'No' C3 = 'N/A'

    If C1 is 'Yes' C2 will be 'No' C3 = 'N/A'

    If C2 is 'Yes' C1 will be 'No' C3 = 'Required'

    I am not sure if this is possible?

    Thanks for your help in advance!

  2. #2
    Forum Contributor
    Join Date
    03-17-2005
    Location
    Canterbury, Kent
    MS-Off Ver
    2003, 2010
    Posts
    285

    Re: If formulas

    Is this what you are after?

    =IF(OR(AND(C1="No",C2="No"),AND(C1="Yes",C2="No")),"N/A","Required")

    Windy

  3. #3
    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
    44,425

    Re: If formulas

    Formula: copy to clipboard
    Please Login or Register  to view this content.



    Regards, TMS
    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


  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: If formulas

    If C1 is 'No' and C2 is 'No' C3 = 'N/A'
    If C1 is 'Yes' C2 will be 'No' C3 = 'N/A'
    If C2 is 'Yes' C1 will be 'No' C3 = 'Required'
    is the same as
    If C1 is 'No' and C2 is 'No' C3 = 'N/A'
    If C1 is 'Yes' C2 will be 'No' C3 = 'N/A'
    If C1 is 'no' C2 will be 'yes' C3 = 'Required'

    so surely you just want to test if c2 is "yes"? =if(c2="yes","required",""n/a")
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  5. #5
    Registered User
    Join Date
    08-01-2013
    Location
    Cardiff
    MS-Off Ver
    Office 365
    Posts
    64

    Re: If formulas

    I am working on a QA form for different types of mechanical and electrical systems.

    For example a chilled water system

    is a chiller packaged (C1) or not Packaged (C2)

    If the chiller is packeged (C1), the Cooling Tower (C3), will be Not Applicable if however it is a Non packaged system (C2) it will be a required asset so I know with out having to interogating the system too much.

    another possibility will be pump (C4) if (C1) and (C2) are both 'No' (C4) will be 'N/A' if either are 'Yes' then (C4) will be 'Required'

    I should have given a little more detail originally. Sorry.

    Windy 58,

    Thanks for your reply. The only problem (although not a big one) the field is always identified as required. In all honesty I can live with that!

    Thank you!

  6. #6
    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
    44,425

    Re: If formulas

    Being pedantic, this is what you have asked for:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    In this instance, if C1 and C2 are both "yes", you get "not valid"

    You should maybe allow for the scenario when one or both of the cells is blank:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Regards, TMS

  7. #7
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  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
    44,425

    Re: If formulas

    Now why would you do that, when we were getting on so nicely. Naughty.

  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
    44,425

    Re: If formulas

    Is this resolved?



    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.

  10. #10
    Registered User
    Join Date
    08-01-2013
    Location
    Cardiff
    MS-Off Ver
    Office 365
    Posts
    64

    Re: If formulas

    Thanks for your help guys!

    The formula worked great but I then realised that another section of teh sheet needed a little bit more info. Hence the new post as well.

    Sorry for the duplicate just didn't think people would look at the same thread again.

    It is appreciated!

  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
    44,425

    Re: If formulas

    You're welcome.

    Trouble is, the new thread DOES look very like the original.

    I would have thought that,based on the suggestions here, you would be able to adapt the formula(e) to meet the additional requirement.

    So that people understand that the new thread is not a duplicate, I suggest you change the Thread Title ... maybe add "Part 2" or something.

    And, for me, it always helps to understand the problem/requirement if you post a sample workbook.

    And finally, in the new thread, post the link of the original thread a) for background and b) to show that this is a different thread/requirement.


    Please mark this thread solved as indicated in my last post.

    Regards, TMS

  12. #12
    Registered User
    Join Date
    08-01-2013
    Location
    Cardiff
    MS-Off Ver
    Office 365
    Posts
    64

    Re: If formulas

    Taken on board!

    Thanks TMS

+ 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] Need Formulas to Hide Partial Concatenate Data and Help Determining Two Other Formulas
    By Mattdim805 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 12-13-2013, 04:11 PM
  2. Using Cell references in file paths for formulas to create dynamic formulas
    By MichaelStokesJr in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-04-2013, 11:49 AM
  3. Replies: 5
    Last Post: 09-25-2013, 02:51 PM
  4. Ctrl+Shift+Enter (CSE) array formulas in VBA using differing formulas
    By officeguy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-11-2012, 04:31 PM
  5. Replies: 5
    Last Post: 05-05-2008, 02:22 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