+ Reply to Thread
Results 1 to 4 of 4

If function giving me the wrong answer

  1. #1
    Registered User
    Join Date
    08-20-2018
    Location
    Texas
    MS-Off Ver
    Office 365
    Posts
    52

    If function giving me the wrong answer

    When I enter =IF(C2=P3, "match", "no match"), the result is no match even though they both equal 4.


    C2 = 4

    P3 = 4 – the four is displaying in the cell. It is the result of this formula:

    =SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(INDEX($V2:$AE2,MATCH(C3,$V$1:$AE$1,0)),"#", 0), "DD", "0"), "TTT", "0"


    It is saying I can't compare 4 against a function/formula?

  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
    80,460

    Re: If function giving me the wrong answer

    Try this:

    =IF(C2=VALUE(P3),"Match","No Match")
    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
    Registered User
    Join Date
    08-20-2018
    Location
    Texas
    MS-Off Ver
    Office 365
    Posts
    52

    Re: If function giving me the wrong answer

    Thanks, that works!

    I tried entering: =IF(VALUE(C2)=P3, "match", "no match"). I'm a newbie/dummy, but learning.

  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
    80,460

    Re: If function giving me the wrong answer

    It's P3 that's returning text instead of a real number, not C2.

    Glad to have helped.

+ 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] IF Function Returns Wrong Answer
    By EverClever in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-12-2017, 12:54 PM
  2. IF Function Returns Wrong Answer
    By EverClever in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 07-28-2017, 02:05 PM
  3. [SOLVED] Interquartile range function giving wrong results
    By gko_87 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-04-2017, 12:21 PM
  4. [SOLVED] Dividing cell is giving wrong answer
    By jwlamb in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 12-30-2014, 08:15 PM
  5. [SOLVED] Using Offset function as the array in the PercentRank function is giving wrong result
    By Bobneil in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 08-06-2013, 09:29 PM
  6. Vlookup giving wrong answer
    By toclare84 in forum Excel General
    Replies: 5
    Last Post: 08-26-2010, 08:53 AM
  7. IF function giving wrong result
    By dzorug in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-23-2005, 11:41 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