+ Reply to Thread
Results 1 to 5 of 5

Can't get XLOOKUP to work

  1. #1
    Registered User
    Join Date
    08-22-2023
    Location
    Finland
    MS-Off Ver
    0ffice365
    Posts
    2

    Can't get XLOOKUP to work

    Hi

    I'm new to forum, and I have Finnish version of Excel, sorry for bad language/incorrect term.

    In brief, what I'am doing:
    I have hundreds of lines of CAN-BUS messages. They are in hexadesimal format, and four characters in middle defines Parameter Group Number)pgn). In example, sheet 1, column A I have hexadesimal adresses. In column B, I used POIMI.TEKSTI, I guess it's LEFT(?) to extract those four characters. In column C, Hex is transformed to decimal with HEKSADES (HEX2DES). In second sheet, (sorry, couldn't cut it just to make sure all numbers appear) I have J1939 Can-bus standard, where are listed which pgn:s belong to standard. It was in pdf format, so I had to do another LEFT to get five digits after pgnXXXXX.

    First thing I have to do, is to find out if pgn in first sheet is in J1939 or not. I tried XLOOKUP (XHAKU).

    in cell D3 I have =XLOOKUP(C3;'J1939'!B4:B199;'J1939'!C4:C199;"No")

    I have pgn number in sheet1 Column C, so i'm trying if C3 can be found in J1939, pgn is in column B in 1939. I also added column C to 1939, filled with "Yes". So, if value of C3 is in J1939 column B, it would return value from J1939 column C, which is always "Yes", if not, it should return "No"

    In all cases function returns "No", even though numbers can be found in J1939 column B.

    What I dont understand, am I missing something?

    All numbers in example sheet 1 are in J1939, looked them manually.

    example.xlsx
    Last edited by vahapesa; 08-22-2023 at 10:34 AM.

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

    Re: Can't get XLOOKUP to work

    Welcome to the forum.

    In B4 copied down:

    =--MID(A4;4;5)

    The -- will convert text to a number. Then the XLOOKUP will work.
    Attached Files Attached Files
    Last edited by AliGW; 08-22-2023 at 10:37 AM. Reason: Workbook added.
    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-22-2023
    Location
    Finland
    MS-Off Ver
    0ffice365
    Posts
    2

    Re: Can't get XLOOKUP to work

    Thank you I had never heard about that "--" before.

  4. #4
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,080

    Re: Can't get XLOOKUP to work

    even though numbers can be found in J1939 column B.
    There are no numbers in col B, the MID function returns text.
    Try
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  5. #5
    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,923

    Re: Can't get XLOOKUP to work

    Glad to have helped.

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, you may not be aware that you can thank anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.

+ 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. Will XLookup Work?
    By WWAL82 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-04-2023, 02:21 AM
  2. [SOLVED] While using =XLOOKUP the first 2 lines work than it stops
    By MrTreehugger in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-09-2023, 11:14 AM
  3. Need Help with Xlookup
    By Akhon in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-10-2023, 09:27 AM
  4. Replies: 4
    Last Post: 03-29-2023, 04:24 PM
  5. XLOOKUP Does Not Work With Text-based As Lookup Variable
    By SweetBaboo in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-26-2022, 01:56 PM
  6. Replies: 7
    Last Post: 09-16-2022, 09:43 AM
  7. [SOLVED] Convert XLOOKUP Function to Work with Older Excel Versions
    By MCC_16 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 09-17-2021, 10:19 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