+ Reply to Thread
Results 1 to 5 of 5

cant get if statement working

  1. #1
    Forum Contributor
    Join Date
    04-27-2014
    Location
    england
    MS-Off Ver
    excel 2003,2016 and google sheets
    Posts
    126

    cant get if statement working

    Hey in google excel when i use this statement it works

    =IF(D5="win", "3", IF(D5="draw", "1", IF(D5="lose", "0", "")))

    but i want to use it with a value for example

    =IF(D5="3", "3", IF(D5="2", "1", IF(D5="6", "8", "")))

    but when i use this it wont work, any ideas why not / a fix?

  2. #2
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: cant get if statement working

    Why do you have quotes around the 3? why not just D5=3?
    Please ensure you mark your thread as Solved once it is. Click here to see how.
    If a post helps, please don't forget to add to our reputation by clicking the star icon in the bottom left-hand corner of a post.

  3. #3
    Forum Contributor
    Join Date
    04-27-2014
    Location
    england
    MS-Off Ver
    excel 2003,2016 and google sheets
    Posts
    126

    Re: cant get if statement working

    that fixes it thank you, i thought i needed them guess not, thanks for help.

  4. #4
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: cant get if statement working

    I believe the quotes make the number a text number, so it isn't the same.

  5. #5
    Forum Contributor
    Join Date
    04-27-2014
    Location
    england
    MS-Off Ver
    excel 2003,2016 and google sheets
    Posts
    126

    Re: cant get if statement working

    ok cool thanks for that +1

+ 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. IF Statement Not Quite Working
    By jimmydougle in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-18-2013, 05:52 AM
  2. Working While Statement Stops Working
    By Verbaruab in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-10-2011, 05:58 PM
  3. IF statement not Working
    By vijay2482 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-06-2009, 08:27 AM
  4. IF statement not working
    By TJAC in forum Excel General
    Replies: 2
    Last Post: 01-13-2006, 09:15 AM
  5. If statement not working right
    By TimT in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-11-2005, 02:05 PM

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