strange issue with pulling info to fill columns

nzt101

New Member
Joined
Sep 20, 2022
Messages
30
Office Version
  1. 365
  2. 2021
  3. 2007
Platform
  1. Windows
Hey guys,

i have an excel workbook, i've found a macro to use =vlookupneg, to look at columns to the left of the data cell im using.
the vlookupneg has worked perfectly on other sheets i'm setting up, but now i've got two worksheets that are filled with information loaded and transformed from 2 external xlsx files
im trying to put 2 columns of data from one sheet into the other sheet, details as below (ive compressed the columns that aren't neccessary)

=VLOOKUPneg(H2,Sheet2!H:H,-2,FALSE) <- in M2
=VLOOKUPneg(H2,Sheet2!H:H,-4,FALSE) <- in N2

1664148953992.png


while the first row has worked, the table has autofilled the rows under with H3, H4, H5, and aren't working
the below is the info im trying to pull across, both of the sheets are sorted in the same way

1664149030278.png


any ideas on what the problem could be or how i could fix it?

thanks in advance :)
 
Query tools are much better at lookups than Excel is and can easily do lookups on multiple columns with click and drag as opposed to sometimes quite complex formulas.

What you want to do is called Merge in Power query and the link (lookup) between tables is called a Join.
Here a couple of youtube videos.
1) Bill Jelen 6 mins
2) Jon Acampora 9.5 mins


 
Upvote 0

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest

Forum statistics

Threads
1,215,706
Messages
6,126,344
Members
449,311
Latest member
accessbob

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top