+ Reply to Thread
Results 1 to 13 of 13

IF function "True" not recognizing numbers

  1. #1
    Registered User
    Join Date
    09-22-2009
    Location
    Newport Beach, California
    MS-Off Ver
    Excel 2002
    Posts
    8

    Question IF function "True" not recognizing numbers

    I am working in two different files. If number "40556" on worksheet B is showing on worksheet A, the function is to state "TRUE", but it's stating "FALSE". Both files' numbers are listed as GENERAL under FORMAT CELLS. Please help!

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: IF function "True" not recognizing numbers

    Trailing spaces? Use TRIM or LEN to verify there is ONLY 5 characters in the cell containing 40556
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Registered User
    Join Date
    09-22-2009
    Location
    Newport Beach, California
    MS-Off Ver
    Excel 2002
    Posts
    8

    Re: IF function "True" not recognizing numbers

    Special-K, I tested and there are only 5 characters.

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: IF function "True" not recognizing numbers

    Which function are you using?

    Just because the format says "general" doesn't mean the cells are formatted the same. Check the two "matching" cells using the formula

    =ISNUMBER(cell)

    [replace "cell" with the relevant cell reference]. They both need to be TRUE (or both FALSE) otherwise you have a "data mismatch"

  5. #5
    Registered User
    Join Date
    09-22-2009
    Location
    Newport Beach, California
    MS-Off Ver
    Excel 2002
    Posts
    8

    Re: IF function "True" not recognizing numbers

    I am using the "IF" function. I am comparing numbers in two different files.

  6. #6
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: IF function "True" not recognizing numbers

    Ok so assume you are using

    =IF(Sheet1!A1=Sheet2!B2,TRUE,FALSE)

    what do you get if you try

    =IF(Sheet1!A1+0=Sheet2!B2+0,TRUE,FALSE)

  7. #7
    Registered User
    Join Date
    09-22-2009
    Location
    Newport Beach, California
    MS-Off Ver
    Excel 2002
    Posts
    8

    Re: IF function "True" not recognizing numbers

    I tried and it's not working. This is frustrating as I use the IF function all the time.

  8. #8
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: IF function "True" not recognizing numbers

    Can you post the workbook or a sample that shows the formulas that don't work?

  9. #9
    Registered User
    Join Date
    09-22-2009
    Location
    Newport Beach, California
    MS-Off Ver
    Excel 2002
    Posts
    8

    Re: IF function "True" not recognizing numbers

    Here are the two files I'm working on. The IF function is in the CDM file.
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    09-22-2009
    Location
    Newport Beach, California
    MS-Off Ver
    Excel 2002
    Posts
    8

    Re: IF function "True" not recognizing numbers

    I didn't post the attachments correctly. I will re-post in a few. Sorry!

  11. #11
    Registered User
    Join Date
    09-22-2009
    Location
    Newport Beach, California
    MS-Off Ver
    Excel 2002
    Posts
    8

    Re: IF function "True" not recognizing numbers

    Okay, here's the correct files. The IF function is in the CDM file.
    Attached Files Attached Files

  12. #12
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: IF function "True" not recognizing numbers

    I don't see anything wrong. You are comparing each cell in A2:A10 in CDM file to a single cell, A2, in the other file.....only one of them matches so you get one TRUE, in C6.

    Do you mean to compare each value in A2:A10 CDM to all the values in A2:A10 in the other file? If so you need to use MATCH like this in C2 copied down

    =IF(ISNUMBER(MATCH(A2,'[Grouped%20Charge%20Codes(1).xls]Sheet1'!$A$2:$A$10,0)),TRUE,FALSE)

    Note: that's how the workbook name came out when I opened it, you probably need to amend it in your formula......
    Last edited by daddylonglegs; 09-22-2009 at 07:46 PM.

  13. #13
    Registered User
    Join Date
    09-22-2009
    Location
    Newport Beach, California
    MS-Off Ver
    Excel 2002
    Posts
    8

    Thumbs up Re: IF function "True" not recognizing numbers

    You are exactly right! Thank you so much!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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