+ Reply to Thread
Results 1 to 6 of 6

If a cell contains certain data, how to get different answers?

  1. #1
    Registered User
    Join Date
    01-31-2019
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    10

    Wink If a cell contains certain data, how to get different answers?

    Hi,

    I am trying to get Cell R23 to look at Cell A23, and if A23 contains the text "JACK", the word "CORRECT" goes into R23, if Cell A23 contains any other text/value other than "JACK" for R23 to read "WRONG" but if A23 is blank then R23 to be left blank.

    I have tried this formula unsuccessfully; =IF(A23,"*JACK*","CORRECT","WRONG",>0,"")

    Any suggestions would be most welcome.

    Thanks

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,740

    Re: If a cell contains certain data, how to get different answers?

    =IF( A23 = "", "" , IF( SEARCH("jack",A23,1), "CORRECT","WRONG"))
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Registered User
    Join Date
    01-31-2019
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: If a cell contains certain data, how to get different answers?

    Hi Wayne,

    Many thanks for the help. It nearly works. If A23 is blank then R23 is blank. Good. If A23 = "JACK" then R23 = "CORRECT". Good.

    Only issue is when A23 is say "FRED" or "JAKE" then instead of R23 stating "WRONG" it is reading #VALUE!
    Is it something I have done wrong?

  4. #4
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,740

    Re: If a cell contains certain data, how to get different answers?

    my bad
    try
    =IF( A23 = "", "", IF( ISNUMBER(SEARCH("jack",A23,1)), "CORRECT","WRONG"))

  5. #5
    Registered User
    Join Date
    01-31-2019
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: If a cell contains certain data, how to get different answers?

    Thank you Wayne, you are a genius!
    So glad I came to this forum for such kindness to help others.

    Kind regards
    Brian

  6. #6
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,740

    Re: If a cell contains certain data, how to get different answers?

    you are very welcome

+ 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] 2 ANSWERS, 1 cell
    By Smokin_Joe in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-31-2019, 09:43 AM
  2. Replies: 1
    Last Post: 02-09-2015, 06:25 PM
  3. Is there a way to populate a cell with 1 of 4 possible answers?
    By pfulghum in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-03-2012, 10:03 AM
  4. [SOLVED] Count the number of matches in a row of one word answers with a row of correct answers
    By flammer4 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-03-2012, 01:17 PM
  5. Replies: 6
    Last Post: 08-29-2010, 11:30 AM
  6. Answers to sum in same cell
    By Hero in forum Excel - New Users/Basics
    Replies: 7
    Last Post: 07-23-2010, 05:38 PM
  7. [SOLVED] I need to return one of three answers in a cell
    By Kath in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-03-2006, 05:40 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