Matching Item Issue in Excel

majidsiddique

Board Regular
Joined
Oct 22, 2018
Messages
164
Hi,

i have a problem in excel sheet. below mention sheet in a excel sheet but here item length Qty is short as compare to Total Item List. i used Vlookup, match index formula but failed. lookup matched exact length of cell to another cell but here length is problem.

kindly send me solution for this issue.

[TABLE="width: 416"]
<colgroup><col><col><col><col><col></colgroup><tbody>[TR]
[TD]ITEM[/TD]
[TD]Qty[/TD]
[TD][/TD]
[TD]TOTAL ITEM[/TD]
[TD]QTY[/TD]
[/TR]
[TR]
[TD]04122JM[/TD]
[TD]?[/TD]
[TD][/TD]
[TD]LD-007042000[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]04402SM[/TD]
[TD][/TD]
[TD][/TD]
[TD]LD-007046000[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]53280[/TD]
[TD][/TD]
[TD][/TD]
[TD]LD-007048000[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]05504SP[/TD]
[TD][/TD]
[TD][/TD]
[TD]LD-007645000[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]05508SP[/TD]
[TD][/TD]
[TD][/TD]
[TD]LD-008631000[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]75402[/TD]
[TD][/TD]
[TD][/TD]
[TD]LD-008633000[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]76515[/TD]
[TD][/TD]
[TD][/TD]
[TD]LD-008634000[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]76586[/TD]
[TD][/TD]
[TD][/TD]
[TD]LD-008953000[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]786042[/TD]
[TD][/TD]
[TD][/TD]
[TD]LD-010387000[/TD]
[TD]6[/TD]
[/TR]
[TR]
[TD]7875440[/TD]
[TD][/TD]
[TD][/TD]
[TD]LD-041002JM[/TD]
[TD]7[/TD]
[/TR]
[TR]
[TD]78860420[/TD]
[TD][/TD]
[TD][/TD]
[TD]LD-04122JM[/TD]
[TD]8[/TD]
[/TR]
[TR]
[TD]2090[/TD]
[TD][/TD]
[TD][/TD]
[TD]LD-041590CS0[/TD]
[TD]9[/TD]
[/TR]
[TR]
[TD]2067L[/TD]
[TD][/TD]
[TD][/TD]
[TD]LD-04402SM[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]2292[/TD]
[TD][/TD]
[TD][/TD]
[TD]LD-051102A00[/TD]
[TD]11[/TD]
[/TR]
[TR]
[TD]4074-58[/TD]
[TD][/TD]
[TD][/TD]
[TD]LD-051160000[/TD]
[TD]12[/TD]
[/TR]
[TR]
[TD]4092-58[/TD]
[TD][/TD]
[TD][/TD]
[TD]LD-053280000[/TD]
[TD]13[/TD]
[/TR]
[TR]
[TD]4196-88[/TD]
[TD][/TD]
[TD][/TD]
[TD]LD-05508SP00[/TD]
[TD]14[/TD]
[/TR]
[TR]
[TD]4296-88[/TD]
[TD][/TD]
[TD][/TD]
[TD]LD-061102A00[/TD]
[TD]15[/TD]
[/TR]
[TR]
[TD]44216U[/TD]
[TD][/TD]
[TD][/TD]
[TD]LD-070023000[/TD]
[TD]16[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
[TABLE="width: 374"]
<colgroup><col span="3"><col><col></colgroup><tbody>[TR]
[TD]
ITEM[/TD]
[TD]
Qty[/TD]
[TD][/TD]
[TD]
Master List[/TD]
[TD]
Qty[/TD]
[/TR]
[TR]
[TD]04122JM[/TD]
[TD]?[/TD]
[TD][/TD]
[TD]LD-44216U[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]04402SM[/TD]
[TD][/TD]
[TD][/TD]
[TD]LD-4296-8800[/TD]
[TD]8[/TD]
[/TR]
[TR]
[TD]53280[/TD]
[TD][/TD]
[TD][/TD]
[TD]LD-4196-8800[/TD]
[TD]12[/TD]
[/TR]
[TR]
[TD]05504SP[/TD]
[TD][/TD]
[TD][/TD]
[TD]LD-4092-5800[/TD]
[TD]16[/TD]
[/TR]
[TR]
[TD]05508SP[/TD]
[TD][/TD]
[TD][/TD]
[TD]LD-4074-5800[/TD]
[TD]20[/TD]
[/TR]
[TR]
[TD]75402[/TD]
[TD][/TD]
[TD][/TD]
[TD]LD-2067L0000[/TD]
[TD]24[/TD]
[/TR]
[TR]
[TD]76515[/TD]
[TD][/TD]
[TD][/TD]
[TD]LD-05508SP[/TD]
[TD]28[/TD]
[/TR]
[TR]
[TD]76586[/TD]
[TD][/TD]
[TD][/TD]
[TD]LD-05504SP[/TD]
[TD]32[/TD]
[/TR]
[TR]
[TD]786042[/TD]
[TD][/TD]
[TD][/TD]
[TD]LD-04402SM[/TD]
[TD]36[/TD]
[/TR]
[TR]
[TD]7875440[/TD]
[TD][/TD]
[TD][/TD]
[TD]LD-04122JM[/TD]
[TD]40[/TD]
[/TR]
[TR]
[TD]78860420[/TD]
[TD][/TD]
[TD][/TD]
[TD]LD-78860420[/TD]
[TD]44[/TD]
[/TR]
[TR]
[TD]2090[/TD]
[TD][/TD]
[TD][/TD]
[TD]LD-7875440[/TD]
[TD]48[/TD]
[/TR]
[TR]
[TD]2067L[/TD]
[TD][/TD]
[TD][/TD]
[TD]LD-786042[/TD]
[TD]52[/TD]
[/TR]
[TR]
[TD]2292[/TD]
[TD][/TD]
[TD][/TD]
[TD]LD-7658600[/TD]
[TD]56[/TD]
[/TR]
[TR]
[TD]4074-58[/TD]
[TD][/TD]
[TD][/TD]
[TD]LD-7651500[/TD]
[TD]60[/TD]
[/TR]
[TR]
[TD]4092-58[/TD]
[TD][/TD]
[TD][/TD]
[TD]LD-7540200[/TD]
[TD]64[/TD]
[/TR]
[TR]
[TD]4196-88[/TD]
[TD][/TD]
[TD][/TD]
[TD]LD-5328000[/TD]
[TD]68[/TD]
[/TR]
[TR]
[TD]4296-88[/TD]
[TD][/TD]
[TD][/TD]
[TD]LD-22920000[/TD]
[TD]72[/TD]
[/TR]
[TR]
[TD]44216U[/TD]
[TD][/TD]
[TD][/TD]
[TD]LD-20900000[/TD]
[TD]76[/TD]
[/TR]
</tbody>[/TABLE]

i tried vlookup but failed:

=vlookup(left(a1,4),d1:e20,2,0) but this formula is reply

kindly help me to sovle this issue
 
Upvote 0
How about PowerQuery (Get&Transform) ?
Code:
[SIZE=1]let
    Source = Table.NestedJoin(Table1,{"ITEM - Copy"},Table2,{"Master List"},"Table2",JoinKind.LeftOuter),
    #"Removed Columns" = Table.RemoveColumns(Source,{"Qty"}),
    #"Expanded Table2" = Table.ExpandTableColumn(#"Removed Columns", "Table2", {"Qty"}, {"Qty"}),
    #"Removed Columns1" = Table.RemoveColumns(#"Expanded Table2",{"ITEM - Copy"})
in
    #"Removed Columns1"[/SIZE]

[Table="width:, class:head"]
[tr=bgcolor:#FFFFFF][td=bgcolor:#70AD47]ITEM[/td][td=bgcolor:#70AD47]Qty[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]04122JM[/td][td=bgcolor:#E2EFDA]
40​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td]44216U[/td][td]
4​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]04402SM[/td][td=bgcolor:#E2EFDA]
36​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td]4296-88[/td][td]
8​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]53280[/td][td=bgcolor:#E2EFDA]
68​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td]4196-88[/td][td]
12​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]05504SP[/td][td=bgcolor:#E2EFDA]
28​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td]05504SP[/td][td]
32​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]05508SP[/td][td=bgcolor:#E2EFDA]
28​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td]05508SP[/td][td]
32​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]4092-58[/td][td=bgcolor:#E2EFDA]
16​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td]4074-58[/td][td]
20​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]75402[/td][td=bgcolor:#E2EFDA]
64​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td]2067L[/td][td]
24​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]76515[/td][td=bgcolor:#E2EFDA]
60​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td]76586[/td][td]
56​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]786042[/td][td=bgcolor:#E2EFDA]
52​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td]7875440[/td][td]
48​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]78860420[/td][td=bgcolor:#E2EFDA]
44​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td]2090[/td][td]
76​
[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E2EFDA]2292[/td][td=bgcolor:#E2EFDA]
72​
[/td][/tr]
[/table]
 
Last edited:
Upvote 0
.. or with VLOOKUP as you originally tried

Excel Workbook
ABCDE
1ITEMQtyTOTAL ITEMQTY
204122JM40LD-44216U4
304402SM36LD-4296-88008
45328068LD-4196-880012
505504SP32LD-4092-580016
605508SP28LD-4074-580020
77540264LD-2067L000024
87651560LD-05508SP28
97658656LD-05504SP32
1078604252LD-04402SM36
11787544048LD-04122JM40
127886042044LD-7886042044
13209076LD-787544048
142067L24LD-78604252
15229272LD-765860056
164074-5820LD-765150060
174092-5816LD-754020064
184196-8812LD-532800068
194296-888LD-2292000072
2044216U4LD-2090000076
VLOOKUP (2)
 
Upvote 0
Thanks a lot sir, great vlookup concept,
You're welcome.

BTW, I have pruned your long quote as they make the thread harder to read/navigate. If you want to quote, quote small, relevant parts only.
 
Upvote 0

Forum statistics

Threads
1,223,907
Messages
6,175,300
Members
452,633
Latest member
DougMo

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