+ Reply to Thread
Results 1 to 7 of 7

function to return true/na/false when value doesn't match

  1. #1
    Registered User
    Join Date
    09-24-2018
    Location
    Singapore
    MS-Off Ver
    2017
    Posts
    16

    Exclamation function to return true/na/false when value doesn't match

    Hello, hope someone could help me

    I have attached an excel sheet where the before sheet is the original table and the after sheet is table with the intended function (green column)

    The main thing is, the id number is being "remembered" by excel to match with an equipment no. Then if a different equipment no. uses the same id number, the function will run as false.

    Thanks.
    Attached Files Attached Files

  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,780

    Re: function to return true/na/false when value doesn't match

    I do not see any attempt to use or adapt the formula you said was working in your previous thread. Please do as much for yourself as you can first: don't expect us to start from scratch every time you slightly change your requirements. Thanks!
    Last edited by AliGW; 10-13-2018 at 06:11 AM.
    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
    Forum Expert
    Join Date
    05-01-2014
    Location
    California, US
    MS-Off Ver
    Excel 2010
    Posts
    1,795

    Re: function to return true/na/false when value doesn't match

    [.... deleted by me; misdirection ....]
    Last edited by joeu2004; 10-13-2018 at 11:21 AM. Reason: deleted

  4. #4
    Forum Expert
    Join Date
    05-01-2014
    Location
    California, US
    MS-Off Ver
    Excel 2010
    Posts
    1,795

    Re: function to return true/na/false when value doesn't match

    @pizzabae.... You did a good job of demonstrating your requirements.

    But I did not do a good job of following them in my previous response. (Klunk!)

    Try the following formula in E2 and copy down through E5:

    Please Login or Register  to view this content.
    This assumes that you consistently use nothing (empty cell) in column C as demonstrated, not dash ("-") as you use in column B.
    Last edited by joeu2004; 10-13-2018 at 11:29 AM. Reason: simpler in red

  5. #5
    Registered User
    Join Date
    09-24-2018
    Location
    Singapore
    MS-Off Ver
    2017
    Posts
    16

    Re: function to return true/na/false when value doesn't match

    Quote Originally Posted by AliGW View Post
    I do not see any attempt to use or adapt the formula you said was working in your previous thread. Please do as much for yourself as you can first: don't expect us to start from scratch every time you slightly change your requirements. Thanks!
    Hello Ali

    Get where you're coming from. My bad from being too dependent on others. Ive tried to twist it around but I still cannot get it right. I'm pretty sure I've understood it wrongly. Here is the function that I've used:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    1) If cell B2 contains - or blank, return NA. This is the logical test and return value if it is true.

    2)lookup A2 to see the equipment plate no. This is the reference value to see where the ID no. belongs to

    3) Array A to C is where I will find the values to match the ID no. to the equipment plate no

    4) 1 is because I am referring back to the equipment plate no. to see if the ID nos matched

    5) 0 is to attain exact match

    6) = C2 is for excel to see if the ID no matched, is the same as the equipment plate no

    Using this function would only return NA or false. Appreaciate if you can advise me on this. I would continue trying.

  6. #6
    Registered User
    Join Date
    09-24-2018
    Location
    Singapore
    MS-Off Ver
    2017
    Posts
    16

    Re: function to return true/na/false when value doesn't match

    Hi joeu2004

    Heheh, I saw ur prev post and tried it. Actually for column C, it would not be empty and will be filled up with a new id No. So yeah, the previously posted function did not work. Understood why.

    Your shorter function worked even if column C had a value or not. Ultimately, the excel attached is just a mock sheet. The actual sheet contained 700+ rows and much more columns. Hence, Ive made minor chanegs from your formula and double click down.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Thank you so much for your help!
    Last edited by jeffreybrown; 10-13-2018 at 12:05 PM. Reason: Removed full quote!

  7. #7
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: function to return true/na/false when value doesn't match

    Please try at E2 and drag down

    =IF(OR(B2="-",B2=""),"NA",ISERROR(MATCH(A2&B2,INDEX(A$1:A1&C$1:C1,),)))

    or and press Ctrl + Shift + Enter
    =IF(ISNUMBER(B2),AND(A2&B2<>A$1:A1&C$1:C1),"NA")

+ 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. Does the OR function only return True or False?
    By maxhecht2 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-05-2017, 06:36 PM
  2. [SOLVED] FIND Function: Possible to return True or False?
    By McStagger in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-29-2017, 10:21 AM
  3. [SOLVED] Match formula to search range of columns to return True or False result
    By Twaddy006 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-09-2015, 05:42 PM
  4. match the data from the other tabs and return value if true or false
    By pphg in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-05-2013, 04:33 AM
  5. [SOLVED] Match specific words in cell and return value if true or false
    By jbrooksia in forum Excel General
    Replies: 3
    Last Post: 03-27-2012, 04:15 PM
  6. Match and return a true false value
    By dcaraher in forum Excel General
    Replies: 2
    Last Post: 09-25-2009, 06:42 AM
  7. Function to return True/False if all are validated as True by ISNU
    By Tetsuya Oguma in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-15-2006, 06:30 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