+ Reply to Thread
Results 1 to 3 of 3

VLookup error when comparing 2 columns

  1. #1
    Registered User
    Join Date
    07-17-2018
    Location
    Anaheim CA
    MS-Off Ver
    360
    Posts
    1

    VLookup error when comparing 2 columns

    Hi all,

    I am having some trouble doing a very basic VLOOKUP where Im comparing two columns.

    My Formula is =VLOOKUP(A1|$B$1:$B$82786|1|FALSE) and copied down. I am just getting N/A errors and don't understand why. I am attaching a screenshot. Shouldn't line 16 have returned a value?

    Any help would be greatly appreciated!

    Excel Error.jpg

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,437

    Re: VLookup error when comparing 2 columns

    It's possible you have trailing spaces on one side or the other so the data appears the same but isn't.

    It also looks as though column A may be formatted as text and column B is formatted as numeric but left aligned.

    If that's the case, you could try:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Cool Re: VLookup error when comparing 2 columns

    maybe use text2columns, set text for both then try vlookup or index/match again

    text2columns:
    - delimited
    - next
    - next
    - text
    - finish

    text2columns works with single column selection so you need to select range in column A (t2c) then select range in column B (t2c)

    if you change these columns to the real numbers you'll lost leading zeroes

    your choice

    0348660 9028
    #N/A
    #N/A
    =VLOOKUP(A1,$B$1:$B$22,1,0)
    0538440 9031
    #N/A
    #N/A
    100380 9037
    #N/A
    #N/A
    =INDEX($B$1:$B$22,MATCH(A1,$B$1:$B$22,0))
    10343 9042
    #N/A
    #N/A
    10580 9044
    #N/A
    #N/A
    105920 9060
    #N/A
    #N/A
    107480 9066
    #N/A
    #N/A
    107680 9086
    #N/A
    #N/A
    107970 9088
    #N/A
    #N/A
    108760 9081
    #N/A
    #N/A
    11061 9112
    #N/A
    #N/A
    110920 9117
    #N/A
    #N/A
    111510 9124
    #N/A
    #N/A
    112040 9126
    #N/A
    #N/A
    114590 9127
    #N/A
    #N/A
    9134 9134 9134 9134
    115820 9138
    #N/A
    #N/A
    115990 9139
    #N/A
    #N/A
    11631 9144
    #N/A
    #N/A
    11756 9152
    #N/A
    #N/A
    11772 9153
    #N/A
    #N/A
    11800 9165
    #N/A
    #N/A
    text text vlookup index/match
    Last edited by sandy666; 07-17-2018 at 06:33 PM.

+ 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. Replies: 3
    Last Post: 04-24-2016, 03:18 PM
  2. [SOLVED] Syntax Error: Multi-dimensional Array Comparing 3 columns using If/Or/And Statement
    By Pauly723 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 12-29-2014, 04:05 PM
  3. Vlookup in different sheets comparing columns
    By azzyd in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-25-2014, 11:25 PM
  4. Comparing Open Orders - What to use? VLookup within VLookup?
    By benjamin09 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-28-2014, 05:38 PM
  5. [SOLVED] IF AND or SUMIFS comparing Months from 2 date columns and text from 2 other columns
    By jrochet in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 09-22-2012, 11:06 AM
  6. [SOLVED] Vlookup Comparing 2 Columns of data
    By ithomso1 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-29-2012, 09:25 AM
  7. Comparing two columns using vlookup
    By aakritir in forum Excel General
    Replies: 2
    Last Post: 08-19-2010, 06:06 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