Return if a match and details of match

SallyM

New Member
Joined
Oct 6, 2022
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hi I'm hoping someone can help me or tell me it's just not possible!

I'm trying to create an automatic stock checker by entering a list from our system versus external location reports, once I've entered the data I can only seem to show if there is a match but not which item, status or where the item is located :(

I can get it to return a yes or no, 0 or 1, true or false but nothing that can show item number, location and status e.g. ITEM1234561 Savannah AVLB (On the system list as AVBL and on the Savannah USA Savannah list) and if no match to show ITEM1234561 Savannah No Match (Not on the system list but on the Savannah list) or ITEM1234561 No Match AVLB (On the system AVLB list but not on any location)

I've tried using XMATCH, XLOOKUP, MATCH, VLOOKUP, IFS, INDEX etc and not getting very far

First I added a data input sheet where everything is entered, then there is a second sheet which converts all to the same format (using =SUBSTITUTE('Data Input'!F5,"/","")), third sheet has the converted items and a status or location to the right (I've used some formulas before where I could put if a match return left or right cell so my logic was to try and use that somehow) and a fourth to show the overall results (trying to us =INDEX(Formula!$B$5:$T$19,MOD(ROW()-ROW($B$3)-1,ROWS(Formula!$B$5:$T$19))+1,INT((ROW()-ROW($B$3)-1)/ROWS(Formula!$B$5:$T$19))+1) but it's coming up with #SPILL! to list all tanks mentioned on the second sheet)

Not sure if that makes any sense - I've uploaded some screenshots as my system won't allow the extension download...

Cheers!
 

Attachments

  • Data Input.png
    Data Input.png
    27.9 KB · Views: 19
  • Formatting.png
    Formatting.png
    20.2 KB · Views: 18
  • Results.png
    Results.png
    2.9 KB · Views: 16
  • Status & loactions on the right.png
    Status & loactions on the right.png
    28 KB · Views: 17

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
It's difficult -- for me at least -- to tell what you need and what the data looks like. The pictures are not readable.

This might be a job for VBA but, like I said, I cannot tell. Plus I'm not that great with complex formulas.

Might you provide a workbook (via a link) to look at? If so maybe include some annotations (I use text box shapes) so we can see your data.

The XL2BB addin is really good. Maybe do it from home if providing a workbook is not practical.

If it is helpful, that #SPILL! thing means that your formula returns an "array" of values that overlaps with cells containing data.
 
Upvote 0
I may be out of town without internet for a while but maybe someone can assist.

Based on the workbook provided it is still difficult for me to understand the need. (Other smarter ones on the list MAY understand.)

It might be good to use VBA but I cannot tell. For example a macro could be set up to iterate through data looking for the desired result and put the results into a Results worksheet.

In cells B3 to D3 in the Results worksheet what exactly is being sought and from where? Maybe a few example results done by hand would help.

Consider using Insert => Comment to put an explanation into cells with any cell-specific notes, which might help.
 
Upvote 0
Hi & welcome to MrExcel.
This will only work in a normal range, not a table, but how about
Test Stock Report SM - Mr Excel.xlsx
ABCD
1
2ItemWhereStatus
3ITEM1234561SavannahAVLB
4ITEM2345671Cincinnati Pre-Order
5ITEM3456781JacksonvilleReturns
6ITEM4567891MobileRepairs
7ITEM3456785MobileReturns
8ITEM1234565JacksonvilleAVLB
9ITEM1234567ChicagoAVLB
10ITEM1234566Louisville AVLB
11ITEM1234568New OrleansAVLB
12ITEM1234562DetroitAVLB
13ITEM1234569St LouisAVLB
14ITEM1234563NewarkAVLB
15ITEM2345672CharlestonPre-Order
16ITEM1234564New JerseyAVLB
17ITEM2345673HoustonPre-Order
18ITEM2345674NorfolkPre-Order
19ITEM2345679Pasadena/BestPre-Order
20ITEM3456782Louisville Returns
21ITEM4567892DetroitRepairs
22ITEM8912341Savannah
23ITEM3456784ChicagoReturns
24ITEM3456786New OrleansReturns
25ITEM2345676St LouisPre-Order
26ITEM3456787NewarkReturns
27ITEM3456783Cincinnati Returns
28ITEM2345677CharlestonPre-Order
29ITEM9876541New Jersey
30ITEM2345678HoustonPre-Order
31ITEM3456789NorfolkReturns
32ITEM4567893Pasadena/BestRepairs
33ITEM4567898NewarkRepairs
34ITEM4567897CharlestonRepairs
35ITEM4567896HoustonRepairs
36ITEM4567895Pasadena/BestRepairs
37ITEM4567894Repairs
38ITEM2345675Pre-Order
39ITEM3456788Returns
40ITEM4567899Repairs
41
42
Results
Cell Formulas
RangeFormula
B3:B40B3=UNIQUE(SUBSTITUTE(TOCOL(Table2,1),"/",""))
C3:C40C3=LET(a,SUBSTITUTE(Table2[[Mobile]:[Pasadena/Best]],"/",""),b,Table2[[#Headers],[Mobile]:[Pasadena/Best]],r,ROWS(a),s,SEQUENCE(r*COLUMNS(a),,0),c,TOCOL(a,,1),d,INDEX(b,INT(s/r)+1),BYROW(B3#,LAMBDA(br,XLOOKUP(br,c,d,"",0))))
D3:D40D3=LET(a,SUBSTITUTE(Table2[[AVLB]:[Repairs]],"/",""),b,Table2[[#Headers],[AVLB]:[Repairs]],r,ROWS(a),s,SEQUENCE(r*COLUMNS(a),,0),c,TOCOL(a,,1),d,INDEX(b,INT(s/r)+1),BYROW(B3#,LAMBDA(br,XLOOKUP(br,c,d,"",0))))
Dynamic array formulas.
 
Last edited:
Upvote 0
Solution
Hi - thanks!

Sorry for not replying sooner - I have just tried this out and it's perfect!!

Thank you so much!!
 
Upvote 0
Glad to help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,551
Members
449,088
Latest member
davidcom

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