+ Reply to Thread
Results 1 to 4 of 4

Two criteria logic statment

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    04-04-2016
    Location
    dallas tx
    MS-Off Ver
    365 (15.0.5501.1000)
    Posts
    539

    Two criteria logic statment

    I have a logic statement that checks to see if a cell contains a word. and the adjacent cell contains a number. depending on if the word is correct and what number is selected, another cell populates with another number. My formula works but I am having trouble adding another layer to it.
    The selection numbers will always be a 1 through 5 selection while the word will be yes or no.

    Yes 1 would return 6
    yes 2 would return 7 and so on.

    I want to add another if statement to display another set of numbers when the word changes from yes to no.

    No 1 would return 11
    No 2 would return 12

    And then another set when changed to a 3rd word

    Maybe 1 would return 16
    Maybe 2 would return 17

    When I try to add the "No" logic statement to the formula it woks as long as the word is yes but as soon as I change the word to no it returns false since the formula recognizes that the first of the statement (when we were checking for the word yes) is false so it returns false.

    How do I get it to recognize the word change and what to do instead of defaulting to false?
    Attached Files Attached Files
    Last edited by chriswrcg; 04-14-2023 at 12:06 PM.

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,285

    Re: Two criteria logic statment

    One way:

    VLOOKUP(O4,INDEX((J4:K8,J10:K14),,,MATCH(N4,{"yes","no"},0)),2,FALSE)
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Forum Contributor
    Join Date
    04-04-2016
    Location
    dallas tx
    MS-Off Ver
    365 (15.0.5501.1000)
    Posts
    539

    Re: Two criteria logic statment

    That is the way

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,285

    Re: Two criteria logic statment

    You're welcome.



    It would be very nice if you were to just click the Add Reputation button at the foot of any of the posts of members who helped you reach a solution.

    Finally, if that takes care of your original question, please click on "Thread Tools" from the menu link (just above the first post in the thread) and mark this thread as SOLVED.

+ 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] For Next Loop with an if statment (or replacing an if statment ?)
    By MikeGee in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-30-2020, 01:55 PM
  2. if statment with multiple criteria
    By jw01 in forum Excel General
    Replies: 1
    Last Post: 06-03-2019, 06:34 PM
  3. Problem with SUMIF() with AND() statment as criteria
    By castled in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 06-25-2015, 12:35 PM
  4. [SOLVED] If statment with multiple criteria
    By fatboyzfishing in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-30-2015, 11:17 AM
  5. Condensing IF, ElseIF, Else statment with multiple criteria.
    By beenbee in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-06-2014, 10:44 AM
  6. Replies: 2
    Last Post: 06-06-2012, 10:59 PM
  7. [SOLVED] If Statment using Criteria
    By Brent E in forum Excel General
    Replies: 3
    Last Post: 05-12-2005, 01: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