VLOOKUP: How to return unique values from one column if constant value is in another column on separate sheet based on constant value cell

kznmrexcel

Board Regular
Joined
Jun 16, 2010
Messages
88
Office Version
  1. 2016
Platform
  1. MacOS
I have a list of scanned inventory where we are receiving replacements of broken Chromebooks on a specific trouble ticket. The worksheet, AssetRecd, with the replacements being scanned into our inventory as they arrive, looks like this:

Asset received and scannedScan dateTicket
T100247782/4/2576725
T100277242/4/2576725
T100235402/4/2576725
T20033540​
2/21/25​
77173


A separate sheet, BrokenCBsenttoIT, which shows the broken devices being sent out for repair, looks like this:

Asset bcTicketDate of ticketDate of sent device recd *by* IT at district officeSent to or collected byTicket # - replacements sent to GVReplacement bc recd
T10048434767251/31/20252/4/25IT staff76725
T10020505767251/31/20252/4/25IT staff76725
76393378767251/31/20252/4/25IT staff76725
T10014789771732/12/20252/15/25Pony77173
T10011287771732/12/20252/15/25Pony77173

We would like to return a specific asset barcode in each row from the AssetRecd worksheet next to each line item shown on the BrokenCBsenttoIT worksheet if the ticket # matches. The twist is that, for instance, asset barcode #T10048434 listed in the first column of BrokenCBsenttoIT does not match a specific barcode on AssetRecd. We only have the ticket number, 76725, on each sheet.

We want to return or "use" each replacement asset barcode only one time on one line from AssetRecd to the BrokenCBsenttoIT, even though lining up the asset barcodes will be random as long as the ticket number matches. If possible, our results in the Replacement bc recd column would look like what's shown below, and should we not have enough devices scanned into the AssetRecd worksheet, we "run out" and do not show a result for every line item with the same ticket number on the BrokenCBsenttoIT sheet.

Is this possible?

Asset bcTicketDate of ticketDate of sent device recd *by* IT at district officeSent to or collected byTicket # - replacements sent to GVReplacement bc recd
T10048434767251/31/20252/4/25IT staff76725T10024778
T10020505767251/31/20252/4/25IT staff76725T10027724
76393378767251/31/20252/4/25IT staff76725T10023540
T10014789771732/12/20252/15/25Pony77173
T20033540​
T10011287771732/12/20252/15/25Pony77173

Note that the last cell is blank, indicating that we did not yet receive a replacement device for T10011287.

Is this possible?
 
Hello, could you please clarify whether either there are some matches of tickets AND barcodes and you would like to "randomly" assign only those cases where this is not true or all barcodes are to be assigned "randomly" (provided that there is a match between tickets)? Also, is it supposed to be for Excel 2016 as stated in your profile or a newer version?
 
Upvote 0
Excel 2016 (also used on Google Sheets, which seems to use the same functions well)
There is no correlation between a barcode of a device being sent for repair and another one sent back as replacement, other than they are both listed for the same repair ticket number. We're interested in a way to see if, for instance, we sent in 3 devices but only got back 2 on the same ticket. If we can randomly assign individual barcodes from the list of replacements going from the top to the bottom to individual barcodes sent out for repair, the thinking is that, if we didn't receive the correct number, some of the items sent out for repair would show that they still need to be replaced.
 
Upvote 0
@hagia_sofia , Apologies for the interruption.
I was wondering if this works-
VLOOKUP_How to return unique values from one column if constant value is in another column_kznmrexcel.xlsx
ABCDEFGHIJKL
1AssetRecdBrokenCBsenttoIT
2Asset received and scannedScan dateTicketsset bcTicketDate of ticketDate of sent device recd *by* IT at district officeSent to or collected byTicket # - replacements sent to GVReplacement bc recd
3T1002477802/04/2576725T100484347672501/31/2502/04/25IT staff76725T10024778
4T1002772402/04/2576725T100205057672501/31/2502/04/25IT staff76725T10027724
5T1002354002/04/2576725763933787672501/31/2502/04/25IT staff76725T10023540
6T2003354002/12/2577173T100147897717302/12/2502/15/25Pony77173T20033540
7T100112877717302/12/2502/15/25Pony771730
Sheet1
Cell Formulas
RangeFormula
L3:L7L3=INDEX($A$3:$A$7, AGGREGATE(15, 6, ROW($A$3:$A$7)-ROW($A$3)+1 / ($K$3:$K$7=C3) * (COUNTIF($C$3:C3, C3)=COUNTIF($K$3:$K$7, C3)), 1))
Dynamic array formulas.
 
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