XLookup - Sorting data with headers

JMoney

New Member
Joined
Apr 16, 2020
Messages
3
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
A co-worker asked me to fix her VLookup today because she had added and removed columns. I was excited to show her XLookup, and created formulas in her data set used XLookup instead of a VLookup. It worked beautifully, except when she showed me that she needs to sort random sets of data in the range. The sort returned with the XLookup referring to the wrong lookup cell. I changed it back to a VLookup, and it sorted normally. I am still learning the XLookup, and wanted to know why the sort by date was not only not sorting the dates, but changing the formula to pick up the wrong row? I
 
Hi, potentially you also have the new dynamic array functions available as well. If sorting seems to mess up the XLOOKUP (which it should not according to my understanding, it is able to always look up an exact match) you might want to wrap a SORT/SORTBY function. I have neither available for the moment, so I can't experiment unfortunately. I'm just thinking out loud here.
 
Upvote 0

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