+ Reply to Thread
Results 1 to 5 of 5

What am I going wrong?

  1. #1
    Registered User
    Join Date
    04-09-2011
    Location
    Pontefract
    MS-Off Ver
    Office 2019
    Posts
    61

    What am I going wrong?

    Hi there,

    I have two numbers MJ123 =YES and MJ321=NO the formula seems to work fine with just number but when I place any letters in front it makes no sense,

    Thanks in advance

    =IF(A1=123,"NO",IF(A1=321,"YES",""))

    =IF(D1=MJ123,"NO",IF(D1=MJ321,"YES",""))
    Attached Files Attached Files

  2. #2
    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,202

    Re: What am I going wrong?

    MJ123 is a cell reference

    try

    =IF(D1="MJ123","NO",IF(D1="MJ321","YES",""))

  3. #3
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: What am I going wrong?

    try below
    =IF(D1="MJ123","NO",IF(D1="MJ321","YES",""))

    apart from being a cell reference alphanumerics are treated as text so it is needed to be used along with double quotation mark
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    WANT TO SAY THANKS, HIT ADD REPUTATION (*) AT THE BOTTOM LEFT CORNER OF THE POST

    More we learn about excel, more it shows us, how less we know about it.

    for chemistry
    https://www.youtube.com/c/chemistrybyshivaansh

  4. #4
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,612

    Re: What am I going wrong?

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution.

    Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.

    To change a Title go to your first post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
    Ben Van Johnson

  5. #5
    Registered User
    Join Date
    04-09-2011
    Location
    Pontefract
    MS-Off Ver
    Office 2019
    Posts
    61

    Re: What am I going wrong?

    Sorry about the poor thread title.... what do you suggest as a title?

    Thanks john and hemesh

+ 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. Wrong coding or RANDBETWEEN is wrong?
    By zbor in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 07-31-2013, 10:01 AM
  2. Please help, something wrong.
    By todmac in forum Excel General
    Replies: 2
    Last Post: 01-13-2011, 03:27 PM
  3. What am I doing wrong?
    By jewels in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 12-08-2005, 10:10 AM
  4. [SOLVED] where does it go wrong?
    By minostrada in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-29-2005, 03:45 AM
  5. What's wrong with this
    By Brad in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-28-2005, 09:10 PM
  6. IF gone wrong
    By Turnipboy in forum Excel General
    Replies: 1
    Last Post: 11-17-2005, 07:25 AM
  7. What is wrong?
    By Andy Dorph in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-12-2005, 12:06 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