Vlookup, Index & Match - Grab values and compare

cybid

New Member
Joined
Apr 11, 2021
Messages
12
Office Version
  1. 2019
Platform
  1. Windows
Greetings to all.
First of all, I am new to this forum and need the help of your excel knowledge.

I have a workbook with the Sheets: A, B, C. On the B sheet I am collecting data from sheet A, and trying to collect other data from sheet C. Since the VLOOKUP wont collect negative col_index_num, I am trying to find a solution with index and match formula, but can't manage it. I am posting 2 images to give a visual of my problem. If you need other info or more details, please let me know and maybe I can upload the document for you. As you can see on the image number 2 I need to collect data with blue circle- only the value next to the 'direct:' text.

Thnx in advance.
 

Attachments

  • 1.JPG
    1.JPG
    43.3 KB · Views: 17
  • 2-a.JPG
    2-a.JPG
    27.2 KB · Views: 16
Product B is not properly visible in the screen capture so I can't see the relativity of the data.
 
Upvote 0

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
WASTE 3.0-TEST - Copy.xlsx
ABCDEFGHIJKLMN
1RAW MATERIALS
2KodiTTotaliProduktiKodiTTotaliProduktiKodiTTotaliProdukti
310111.490,616product a1395018400
41025.590,181product b1402018500
51035.670,443product c14292018600
61046.860,000product d1434.0750,00018700
71050.020,0001440.5860,00018800
81060.030,00014524018900
910781.300,0001460.060,00019200
1010863.008product 11470.120,00019300
1110942.005product 21480.030,00024000
1211019.0001490.170,00024500
131112.0001503027300,000
141124.00015100,00027400,000
151133.00015200,00027500
161147.00015826.3580,00027700
171152.00015994027800
181162.000160139027900
1911733.00016171028100
2011879.00016274028200
2112013.00016327028300
221210.000,0001650028400
2312222.000,0001660028500
241230.430,0001670028700
2512719.000,0001680028800
261280.940,0001710028900
271291.080,0001720029000
281308.0001730029100
29131258.000,0001740029600
301320.0301750029700
31133112.0001760029800
321349.0001770029900
3313527.0001780030000
341362.0001790030100
351386.0001800030100
PRINT
Cell Formulas
RangeFormula
B3:B35B3=IFERROR(INDEX(WasteTOSHIBA!$P$1:$P$300,MATCH(A3,WasteTOSHIBA!$A$5:$A$304,FALSE)),0)
C3C3=RAWMATERIAL2.0!$B$23
C4C4=RAWMATERIAL2.0!$B$24
C5C5=RAWMATERIAL2.0!$B$25
C6C6=RAWMATERIAL2.0!$B$26
C7C7=RAWMATERIAL2.0!$B$27
C8C8=RAWMATERIAL2.0!$B$28
C9C9=RAWMATERIAL2.0!$B$29
C10C10=RAWMATERIAL2.0!$B$3
C11C11=RAWMATERIAL2.0!$B$4
C12C12=RAWMATERIAL2.0!$B$13
C13C13=RAWMATERIAL2.0!$B$14
C14C14=RAWMATERIAL2.0!$B$15
C15C15=RAWMATERIAL2.0!$B$16
C16C16=RAWMATERIAL2.0!$B$17
C17C17=RAWMATERIAL2.0!$B$6
C18C18=RAWMATERIAL2.0!$B$7
C19C19=RAWMATERIAL2.0!$B$8
C20C20=RAWMATERIAL2.0!$B$9
C21C21=RAWMATERIAL2.0!$B$10
C22C22=RAWMATERIAL2.0!$B$30
C23C23=RAWMATERIAL2.0!$B$31
C24C24=RAWMATERIAL2.0!$B$32
C25C25=RAWMATERIAL2.0!$B$33
C26C26=RAWMATERIAL2.0!$B$34
C27C27=RAWMATERIAL2.0!$B$35
C28C28=RAWMATERIAL2.0!$B$51
C29C29=RAWMATERIAL2.0!$B$36
C30C30=RAWMATERIAL2.0!$B$52
C31C31=RAWMATERIAL2.0!$B$50
C32C32=RAWMATERIAL2.0!$B$59
C33C33=RAWMATERIAL2.0!$B$60
C34C34=RAWMATERIAL2.0!$B$61
C35C35=RAWMATERIAL2.0!$B$62
L4:L35,G3:G35G3=IFERROR(VLOOKUP(F3,WasteTOSHIBA!$A$9:$W$300,16,FALSE),0)
H3H3=RAWMATERIAL2.0!$B$63
H4H4=RAWMATERIAL2.0!$B$65
H5H5=RAWMATERIAL2.0!$B$53
H6H6=RAWMATERIAL2.0!$B$44
H7H7=RAWMATERIAL2.0!$B$45
H8H8=RAWMATERIAL2.0!$B$56
H9H9=RAWMATERIAL2.0!$B$38
H10H10=RAWMATERIAL2.0!$B$39
H11H11=RAWMATERIAL2.0!$B$40
H12H12=RAWMATERIAL2.0!$B$43
H13H13=RAWMATERIAL2.0!$B$57
H14H14=RAWMATERIAL2.0!$B$41
H15H15=RAWMATERIAL2.0!$B$42
H16H16=RAWMATERIAL2.0!$B$37
H17H17=RAWMATERIAL2.0!$B$12
H18H18=RAWMATERIAL2.0!B18
H19H19=RAWMATERIAL2.0!$B$93
H20H20=RAWMATERIAL2.0!$B$94
H21H21=RAWMATERIAL2.0!$B$95
H22H22=RAWMATERIAL2.0!$B$72
H23H23=RAWMATERIAL2.0!$B$73
H24H24=RAWMATERIAL2.0!$B$74
H25H25=RAWMATERIAL2.0!$B$75
H26H26=RAWMATERIAL2.0!$B$77
H27H27=RAWMATERIAL2.0!$B$79
H28H28=RAWMATERIAL2.0!$B$99
H29H29=RAWMATERIAL2.0!$B$101
H30H30=RAWMATERIAL2.0!$B$102
H31H31=RAWMATERIAL2.0!$B$70
H32H32=RAWMATERIAL2.0!$B$96
H33H33=RAWMATERIAL2.0!$B$97
H34H34=RAWMATERIAL2.0!$B$98
H35H35=RAWMATERIAL2.0!$B$84
L3L3=IFERROR(VLOOKUP(K3,PRODUCTMIX!$A$9:$W$300,16,FALSE),0)
M3M3=RAWMATERIAL2.0!$B$87
M4M4=RAWMATERIAL2.0!$B$88
M5M5=RAWMATERIAL2.0!$B$89
M6M6=RAWMATERIAL2.0!$B$90
M7M7=RAWMATERIAL2.0!$B$91
M8M8=RAWMATERIAL2.0!$B$103
M9M9=RAWMATERIAL2.0!$B$5
M10M10=RAWMATERIAL2.0!$B$47
M11M11=RAWMATERIAL2.0!$B$54
M12M12=RAWMATERIAL2.0!$B$55
M13M13=RAWMATERIAL2.0!$B$46
M14M14=RAWMATERIAL2.0!$B$48
M15M15=RAWMATERIAL2.0!$B$92
M16M16=RAWMATERIAL2.0!$B$67
M17M17=RAWMATERIAL2.0!$B$68
M18M18=RAWMATERIAL2.0!$B$69
M19M19=RAWMATERIAL2.0!$B$66
M20M20=RAWMATERIAL2.0!$B$80
M21M21=RAWMATERIAL2.0!$B$81
M22M22=RAWMATERIAL2.0!$B$82
M23M23=RAWMATERIAL2.0!$B$11
M24M24=RAWMATERIAL2.0!$B$64
M25M25=RAWMATERIAL2.0!$B$76
M26M26=RAWMATERIAL2.0!$B$71
M27M27=RAWMATERIAL2.0!$B$78
M28M28=RAWMATERIAL2.0!B58
M29M29=RAWMATERIAL2.0!$B$104
M30M30=RAWMATERIAL2.0!$B$105
M31M31=RAWMATERIAL2.0!$B$106
M32M32=RAWMATERIAL2.0!$B$107
M33M33=RAWMATERIAL2.0!$B$108
M34M34=RAWMATERIAL2.0!$B$58
M35M35=RAWMATERIAL2.0!$B$19
Cells with Conditional Formatting
CellConditionCell FormatStop If True
H18Cell Value>0textNO
M3:M35Cell Value>0textNO
C4:C35Cell Value>0textNO
C3,H3:H17,H19:H37Cell Value>0textNO


WASTE 3.0-TEST - Copy.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXY
1
211.04.202122:37:44Store:page:1 / 5
3
4Report 5.3: Total waste report
5
6date: 01.04.2021 - 10.04.2021
7
8amount
9rawmaterial no.namequantity( )
10
11direct:11.4890
12
13by PLU:5.4740
14
15101Product Atotal:16.9630(1,1012)18.68
16
17direct:5.5870
18
19by PLU:3.5960
20
21102Product Btotal:9.1830(2,0549)18.87
22
23direct:5.6720
24
25by PLU:1.1840
26
27103Product Ctotal:6.8560(0,6521)4.47
28
29by PLU:0.0160
30
31104Product Dtotal:0.0160(1,7000)0.03
32
33by PLU:0.0320
34
35105total:0.0320(1,3375)0.04
36
37by PLU:0.0200
38
39106total:0.0200(2,7600)0.06
40
41direct:81.3000
42
43by PLU:2.4087
44
45107total:83.7087(1,4492)121.31
46
47direct:63.0000
48
49by PLU:38.0000
50
51108total:101.0000(0,2171)21.93
52
53direct:42.0000
54
55by PLU:57.0000
56
57109total:99.0000(0,5555)54.99
58
59direct:19.0000
60
61by PLU:114.0000
62
63110total:133.0000(0,1314)17.48
64
65direct:2.0000
66
67by PLU:6.0000
68
69111total:8.0000(0,2229)1.78
WasteTOSHIBA


I uploaded mini-sheet of Sheet B and Sheet C.. On Sheet C there is a product D by ID 104 and doesn't have a direct: value as Product C, Product B or Product A. The given formula for product D, grabs the total value(6.86) of Product C above. So I was hopping if the product doesn't have a direct: value the formula could ignore and give 0.
 
Upvote 0
This might work, but with such chaotic source data, anything that does work will be based on luck more than anything else.
Excel Formula:
=IFERROR(INDEX(WasteTOSHIBA!$P:$P,AGGREGATE(15,6,ROW(WasteTOSHIBA!$P$11:$A$300)/(A3,WasteTOSHIBA!$A$15:$A$304)/(WasteTOSHIBA!$L$11:$L$300="Direct:"),1)),"")
 
Upvote 0
This might work, but with such chaotic source data, anything that does work will be based on luck more than anything else.
Excel Formula:
=IFERROR(INDEX(WasteTOSHIBA!$P:$P,AGGREGATE(15,6,ROW(WasteTOSHIBA!$P$11:$A$300)/(A3,WasteTOSHIBA!$A$15:$A$304)/(WasteTOSHIBA!$L$11:$L$300="Direct:"),1)),"")
This one does not work. Unfortunately it is a chaotic source data but I tried to come around the desired results.
Anyway, thank you for your time. I'll try to find some other solutions.
 
Upvote 0
Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: Vlookup, Index & Match - Grab values and compare! HELP
If you have posted the question at more places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0
Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: Vlookup, Index & Match - Grab values and compare! HELP
If you have posted the question at more places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
Thnx for alerting me. And no I have cross-posted in other forums. These are only 2 forums which I'm seeking help.
 
Upvote 0
Typo in the formula, had a comma where it should be =
Excel Formula:
=IFERROR(INDEX(WasteTOSHIBA!$P:$P,AGGREGATE(15,6,ROW(WasteTOSHIBA!$P$11:$A$300)/(A3=WasteTOSHIBA!$A$15:$A$304)/(WasteTOSHIBA!$L$11:$L$300="Direct:"),1)),"")
 
Upvote 0
Typo in the formula, had a comma where it should be =
Excel Formula:
=IFERROR(INDEX(WasteTOSHIBA!$P:$P,AGGREGATE(15,6,ROW(WasteTOSHIBA!$P$11:$A$300)/(A3=WasteTOSHIBA!$A$15:$A$304)/(WasteTOSHIBA!$L$11:$L$300="Direct:"),1)),"")

Thanks to you our processing time has been great at work. Me and my team are thankful to you. Today we came across to another 'glitch', according to formula. PRDOUCT D(refering to the mini-sheet I uploaded) instead of 'by PLU:' did have only 'direct:' value which is different to PRODUCT C, because PRODUCT C has 2 values (direct: & by PLU: ). The formula did not know about this and didn't grab the 'direct:' value. We hope you could help us for the last time on this. Thank you in advance.
 
Upvote 0
I'm not sure that I follow correctly, there is no 'direct' value for PRODUCT D, so there is no value to grab.

The way that the formula works, it looks for the product / item code in column A, then it looks for "Direct:" 4 rows above the product / item code. If it finds both then it returns the corresponding value in column P.

In your mini sheet example, the formula will return 5.67 for PRODUCT C (item 103), but will return nothing (blank) for PRODUCT D as there is no corresponding result in the data.
 
Upvote 0
I'm not sure that I follow correctly, there is no 'direct' value for PRODUCT D, so there is no value to grab.

The way that the formula works, it looks for the product / item code in column A, then it looks for "Direct:" 4 rows above the product / item code. If it finds both then it returns the corresponding value in column P.

In your mini sheet example, the formula will return 5.67 for PRODUCT C (item 103), but will return nothing (blank) for PRODUCT D as there is no corresponding result in the data.
Greetings jason
Yes I can see, in that way the formula works perfectly when there is no 'direct', but when there is a product only with 'direct' value and doesn't have 'PLU" value it doesn't grab the 'direct' value.
I can post a screenshot just to show the product only with 'direct' and not 'PLU'.
I hope I described it correctly now.
Thank you
product.JPG
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,692
Members
448,979
Latest member
DET4492

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