Hi Bubbles_A,
Sorry if I'm not helping here.
Not sure how you want the result,
but maybe the code below is a little help :
The code above will get the sequence number then put it on the next column of the Slot#:
2020-06-09_18-35-13.gif
It first collect the unique value of the first character which are in the Slot# list into array.
Then based on each item of the array, it loops on the Slot# list.
it then put the number sequence on the next cell each time the item match in the list.
For example, in your macro you can have a column helper where you put the vlookup formula,
sort your data in "Shortage" sheet, then clear the contents of the column helper and clear the sequence result in "Data" sheet.
But to be honest I'm not so sure if the code can help you to get your expected result.
Bookmarks