+ Reply to Thread
Results 1 to 3 of 3

String Logic Comparison not working

  1. #1
    Registered User
    Join Date
    12-16-2015
    Location
    Vermont
    MS-Off Ver
    2016
    Posts
    2

    String Logic Comparison not working

    Hi There,
    Based on documentation I've found through Microsoft and elsewhere I see that I can make a IF statement which reads a string in a cell and gives a true or false output.

    I believe I have all the syntax correct, but I'm getting a false output no matter what. Here's a screenshot of what I'm dealing with..

    https://dl.dropboxusercontent.com/u/...2015.43.23.png

    I'm using Excel 2016. Cell B5 has a value of 'yes' and my formula in B6 is =IF(B5="yes", 100, 50)

    So I'm expecting an output of 100, but all I'm getting in 50. Any clue to what's happening/what I'm doing wrong?

    Thanks a bunch for your help.

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: String Logic Comparison not working

    Probably an extra space in B5, "yes " maybe
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    12-16-2015
    Location
    Vermont
    MS-Off Ver
    2016
    Posts
    2

    Re: String Logic Comparison not working

    Oh my goodness. That was it! An extra space (invisible space of course). Thank you @ChemistB.

+ 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. nested If logic isn't working, plz help...
    By raj3076 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-16-2013, 05:31 AM
  2. Using VBA to search for a string (fuzzy logic)
    By masond3 in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 10-30-2013, 09:26 AM
  3. Help with string concatenation logic
    By Nahkranoth in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-16-2013, 06:49 AM
  4. String Comparison
    By tactical in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-13-2011, 01:15 PM
  5. Larger than ">" comparison not working when used with a string
    By sungsam in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-16-2009, 03:33 AM
  6. String comparison
    By HurricaneDan in forum Excel General
    Replies: 4
    Last Post: 11-08-2006, 02:05 PM
  7. comparison string VBA excell
    By stats in forum Excel General
    Replies: 5
    Last Post: 03-16-2006, 06:15 PM
  8. String Comparison
    By Purnima in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-08-2005, 08:06 AM

Tags for this Thread

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