+ Reply to Thread
Results 1 to 15 of 15

if function with three choice

  1. #1
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    if function with three choice

    can please check this formula and find
    HTML Code: 

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    81,247

    Re: if function with three choice

    Find what? What is the formula meant to do? Explain in words what you want.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: if function with three choice

    Quote Originally Posted by AliGW View Post
    Find what? What is the formula meant to do? Explain in words what you want.

    in cell B12 looking for the following three chice
    1- Present At start
    2-Present At start & End
    3-Present At End
    if first choice is present in B12 the value is will be data in E1
    if second choice is present in B12 the value is will be data in E2
    if third choice is present in B12 the value is will be data in E3

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    81,247

    Re: if function with three choice

    Try this:

    =IF(SEARCH("Present At start",B12), E1,IF(SEARCH("Present At start & End",B12),E2,IF(SEARCH("Present At End",B12),E3,"")))

  5. #5
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: if function with three choice

    Quote Originally Posted by AliGW View Post
    Try this:

    =IF(SEARCH("Present At start",B12), E1,IF(SEARCH("Present At start & End",B12),E2,IF(SEARCH("Present At End",B12),E3,"")))

    there is no difference between case Present At start , Present At start & End its give the same choice

  6. #6
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: if function with three choice

    i think its because & symbol
    Quote Originally Posted by AliGW View Post
    Try this:

    =IF(SEARCH("Present At start",B12), E1,IF(SEARCH("Present At start & End",B12),E2,IF(SEARCH("Present At End",B12),E3,"")))

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    81,247

    Re: if function with three choice

    You aren't giving enough detail.

    Will you please attach a sample Excel workbook?

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired solution is also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.

  8. #8
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: if function with three choice

    please see my attached example
    Attached Files Attached Files

  9. #9
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,258

    Re: if function with three choice

    It will not work because

    "Present At start" is found in conditions 1 and 2: you need to change condition 2 to "Both Present" or similar.

    =IF(ISNUMBER(SEARCH("Present At start",B12)), E1,IF(ISNUMBER(SEARCH("Both Present",B12)),E2,IF(ISNUMBER(SEARCH("Present At End",B12)),E3,"")))

  10. #10
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,258

    Re: if function with three choice

    Alternative ..

    =IF(EXACT(UPPER("Present at Start"),UPPER(B12)),E1,IF(EXACT(UPPER("Present At Start & End"),UPPER(B12)),E2,IF(EXACT(UPPER("Present At End"),UPPER(B12)),E3,"")))

    You can remove the UPPER if the selection is via drop-down BUT ensure text in formula matches the drop down values.

  11. #11
    Registered User
    Join Date
    07-14-2017
    Location
    Hà Nội
    MS-Off Ver
    2013
    Posts
    12

    Re: if function with three choice

    Just a trick :
    PHP Code: 
    B15=INDEX(F1:F3;MATCH(LEN(B12);{16;22;14};0)) 

  12. #12
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    81,247

    Re: if function with three choice

    Brilliant, Ketxu ... except for one small thing:

    What happens if B12 contains this?

    "Does this match?"

  13. #13
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: if function with three choice

    thanks dear Johntopley
    its work good with my spreadsheet

    Quote Originally Posted by JohnTopley View Post
    Alternative ..

    =IF(EXACT(UPPER("Present at Start"),UPPER(B12)),E1,IF(EXACT(UPPER("Present At Start & End"),UPPER(B12)),E2,IF(EXACT(UPPER("Present At End"),UPPER(B12)),E3,"")))

    You can remove the UPPER if the selection is via drop-down BUT ensure text in formula matches the drop down values.

  14. #14
    Forum Contributor
    Join Date
    11-28-2013
    Location
    Ljubljana
    MS-Off Ver
    Office 365
    Posts
    1,054

    Re: if function with three choice

    thank you dear AliGW and Ketux for your help
    best regards

  15. #15
    Registered User
    Join Date
    07-14-2017
    Location
    Hà Nội
    MS-Off Ver
    2013
    Posts
    12

    Re: if function with three choice

    Quote Originally Posted by AliGW View Post
    Brilliant, Ketxu ... except for one small thing:

    What happens if B12 contains this?

    "Does this match?"
    So, this is just funny, not general solution / catching error ^^

+ 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. Multiple Time Stamps depending on choice in Drop Down List Choice
    By insayah in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-25-2022, 09:53 AM
  2. Make an multiple choice quiz with randomized choice
    By shaterroi in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-16-2015, 11:04 AM
  3. Replies: 3
    Last Post: 12-09-2013, 04:21 AM
  4. Drop Down Box Choice Selects Volume Function
    By Tony Pass in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-29-2013, 01:40 AM
  5. Dtaa validation as a choice in a IF function
    By sirenwerks in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-26-2013, 11:51 AM
  6. Replies: 2
    Last Post: 07-10-2012, 04:37 PM
  7. Replies: 1
    Last Post: 02-01-2005, 03: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