+ Reply to Thread
Results 1 to 3 of 3

[SOLVED] Trouble combining multiple IF, AND and OR

  1. #1
    Registered User
    Join Date
    10-10-2016
    Location
    Coimbra, Portugal
    MS-Off Ver
    2016
    Posts
    86

    [SOLVED] Trouble combining multiple IF, AND and OR

    Hi.
    I need to combine these 3 conditions:

    1. =IF(OR(AND(C174="Daughter"), AND(C174="Miss"), AND(C174="Mrs"), AND(C174="Girl")), "Female", "")
    2. =IF(OR(AND(C174="Son"), AND(C174="Bishop"), AND(C174="Mr."), AND(C174="Boy")), "Male", "")
    3. If the cell is blank leave it blank.

    Currently I'm using this syntax (found it googling):

    =IF(ISNUMBER(SEARCH("Daughter",C173)),"Female",IF(ISNUMBER(SEARCH("Girl",C173)),"Female",IF(ISNUMBER(SEARCH("Mrs.",C173)),"Female",IF(ISNUMBER(SEARCH("Miss",C173)),"Female",
    IF(ISNUMBER(SEARCH("Son",C173)),"Male",IF(ISNUMBER(SEARCH("Boy",C173)),"Male",IF(ISNUMBER(SEARCH("Mr.",C173)),"Male",IF(ISNUMBER(SEARCH("Bishop",C173)),"Male",""))))))))

    Gets the job done, but it's not as optimized and elegant.

    I've been trying to nest the entire thing, but I can't seem to figure out the logic.
    Help?

    PR
    Last edited by Pr0; 01-18-2018 at 01:10 PM.

  2. #2
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Trouble combining multiple IF, AND and OR

    Try this one
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  3. #3
    Registered User
    Join Date
    10-10-2016
    Location
    Coimbra, Portugal
    MS-Off Ver
    2016
    Posts
    86

    Re: Trouble combining multiple IF, AND and OR

    It doesn't get any more optimized than this.
    Thank you AlKey! :D

    P

+ 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] Trouble with combining MID and VLOOKUP
    By DG328 in forum Excel General
    Replies: 5
    Last Post: 06-14-2016, 11:22 AM
  2. Trouble Combining Cell Values
    By CCSLBuckles in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-11-2015, 05:51 PM
  3. [SOLVED] Trouble combining two formulas into one
    By mr63249 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 09-06-2013, 08:53 AM
  4. trouble combining LEFT and MATCH
    By jakeopolis in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-12-2013, 09:48 AM
  5. Having trouble combining AND and IF
    By hammerb in forum Excel General
    Replies: 2
    Last Post: 10-05-2011, 10:24 AM
  6. Trouble Combining Functions
    By jturenne in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-06-2009, 01:35 PM
  7. Trouble Combining Codes
    By dogsoul in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-19-2009, 02:43 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