Data to match

dinkss

Board Regular
Joined
Aug 25, 2020
Messages
129
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hi there,

I have created 2 worksheets with data. First is all materials used and second has the bottle type used for each of material. How can I match it? I mean - how to assign data from bottle types to material? Is there any formula like vlookup or anything else? I have no idea how to start :( Can you help me please?

I just want to get YES / NO to show in the rows with material number which would indicate what bottle type is used for which product.
 

Attachments

  • 01.png
    01.png
    52 KB · Views: 20
  • 02.png
    02.png
    95.5 KB · Views: 18
OK, thanks. You have entered the 8 results manually by the look of it. What about ...

and explain how you got those entered results manually?

Why does B587 get a YES? (Be specific with cell references)
Same for C587, D589 etc
 
Upvote 0

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
OK, thanks. You have entered the 8 results manually by the look of it. What about ...



Why does B587 get a YES? (Be specific with cell references)
Same for C587, D589 etc
I only put that manually, to show what I would like to get in each row and column.
 
Upvote 0
I was careless with the use of $ in my untested first post.
If I understand correctly then this should hopefully give you what you are wanting.

Book1
ABCDEFGHIJKLMNOPQ
1Product25mL Architect Natural25mL Architect Natural Alternate25mL Architect Black25mL Architect Black Alternate32mL Architect Natural32mL Architect Natural Alternate32mL Architect Black32mL Architect Black Alternate60mL Architect Natural60mL Architect Black4mL Round5mL Natural4mL Amber Glass5mL Dropper Natural5mL Dropper White10ml Dropper Natural
2Material NumberLF990933990933LF990935990935LF990937990937LF990939990939938961G41290LFG41132938363LFG41085938731938723938671
32R98A0001                
42R98B0001                
52R98C0001                
62R98D0001                
72R98E0001                
82R98F0001                
92R98G0001Yes               
102R98G0005                
112R98H0001 YesYes             
122R98H0005                
132R98L0001               Yes
142R98M0001               Yes
153P25A0002                
163P25B0002                
173P25C0002                
183P25D0002                
193P25E0002                
203P25F0002                
213P25G0002                
223P25G0003                
233P25G0005                
243P25G0006                
253P25H0002 YesYes             
263P25H0003 YesYes             
273P25H0005                
MASTER-MATERIAL
Cell Formulas
RangeFormula
B3:Q27B3=IF(COUNTIF('PRODUCT & BOTTLE TYPE'!A$3:A$2000,$A3)>0,"Yes","")
 
Upvote 0
Solution
I was careless with the use of $ in my untested first post.
If I understand correctly then this should hopefully give you what you are wanting.

Book1
ABCDEFGHIJKLMNOPQ
1Product25mL Architect Natural25mL Architect Natural Alternate25mL Architect Black25mL Architect Black Alternate32mL Architect Natural32mL Architect Natural Alternate32mL Architect Black32mL Architect Black Alternate60mL Architect Natural60mL Architect Black4mL Round5mL Natural4mL Amber Glass5mL Dropper Natural5mL Dropper White10ml Dropper Natural
2Material NumberLF990933990933LF990935990935LF990937990937LF990939990939938961G41290LFG41132938363LFG41085938731938723938671
32R98A0001                
42R98B0001                
52R98C0001                
62R98D0001                
72R98E0001                
82R98F0001                
92R98G0001Yes               
102R98G0005                
112R98H0001 YesYes             
122R98H0005                
132R98L0001               Yes
142R98M0001               Yes
153P25A0002                
163P25B0002                
173P25C0002                
183P25D0002                
193P25E0002                
203P25F0002                
213P25G0002                
223P25G0003                
233P25G0005                
243P25G0006                
253P25H0002 YesYes             
263P25H0003 YesYes             
273P25H0005                
MASTER-MATERIAL
Cell Formulas
RangeFormula
B3:Q27B3=IF(COUNTIF('PRODUCT & BOTTLE TYPE'!A$3:A$2000,$A3)>0,"Yes","")


I will try it and will get back to you :) thanks
 
Upvote 0
I was careless with the use of $ in my untested first post.
If I understand correctly then this should hopefully give you what you are wanting.

Book1
ABCDEFGHIJKLMNOPQ
1Product25mL Architect Natural25mL Architect Natural Alternate25mL Architect Black25mL Architect Black Alternate32mL Architect Natural32mL Architect Natural Alternate32mL Architect Black32mL Architect Black Alternate60mL Architect Natural60mL Architect Black4mL Round5mL Natural4mL Amber Glass5mL Dropper Natural5mL Dropper White10ml Dropper Natural
2Material NumberLF990933990933LF990935990935LF990937990937LF990939990939938961G41290LFG41132938363LFG41085938731938723938671
32R98A0001                
42R98B0001                
52R98C0001                
62R98D0001                
72R98E0001                
82R98F0001                
92R98G0001Yes               
102R98G0005                
112R98H0001 YesYes             
122R98H0005                
132R98L0001               Yes
142R98M0001               Yes
153P25A0002                
163P25B0002                
173P25C0002                
183P25D0002                
193P25E0002                
203P25F0002                
213P25G0002                
223P25G0003                
233P25G0005                
243P25G0006                
253P25H0002 YesYes             
263P25H0003 YesYes             
273P25H0005                
MASTER-MATERIAL
Cell Formulas
RangeFormula
B3:Q27B3=IF(COUNTIF('PRODUCT & BOTTLE TYPE'!A$3:A$2000,$A3)>0,"Yes","")

I am super delighted! It is working 100% :) Thank you so much!

Can you please explain to me the formula you used? So I can understand this? It would be very helpful for me as I am starting my adventure with Excel.

Thanks in advance!
 
Upvote 0
@dinkss Great that we were able to get you up and running.

Essentially, the solution is checking each Product & Bottle Type column to see if the Material listed in Master-Material A exists.
This could be done in various ways. I chose to use the COUNTIF function. @Peter_SSs chose to use the MATCH function.

The whole thing is made fairly simple because your Product headings in both sheets are in the same order. The only difference is that on Product & BT they run from column A: ... and on the Master-Material they run from column B: .... So to check the product in Master B, we check column A of P&BT

The material we are checking is always in Master A so make that column absolute, using $A Leave the row number as relative, so that it increments as and when formula pulled down.
Thus first material reference is $A3

COUNTIF('PRODUCT & BOTTLE TYPE'!A$3:A$2000,$A3) - Asks how many instances of Material $A3 in the P&BT range A$3:A$200
If material $A3 is listed one or more times the COUNTIF will return the count as a positive integer. If not listed, the COUNTIF will return zero, 0.

=IF(COUNTIF('PRODUCT & BOTTLE TYPE'!A$3:A$2000,$A3)>0,"Yes","")
The IF statement simple says return 'Yes' if the COUNTIF is greater than zero, otherwise return an empty cell.

As the formula is dragged down, $A3 increments to compare the material of each row.
As the formula is dragged across, the Countif range A$3:A$2000 increments to become B$3:B$200.... etc.

Hope that helps.
 
Upvote 0
@dinkss Great that we were able to get you up and running.

Essentially, the solution is checking each Product & Bottle Type column to see if the Material listed in Master-Material A exists.
This could be done in various ways. I chose to use the COUNTIF function. @Peter_SSs chose to use the MATCH function.

The whole thing is made fairly simple because your Product headings in both sheets are in the same order. The only difference is that on Product & BT they run from column A: ... and on the Master-Material they run from column B: .... So to check the product in Master B, we check column A of P&BT

The material we are checking is always in Master A so make that column absolute, using $A Leave the row number as relative, so that it increments as and when formula pulled down.
Thus first material reference is $A3

COUNTIF('PRODUCT & BOTTLE TYPE'!A$3:A$2000,$A3) - Asks how many instances of Material $A3 in the P&BT range A$3:A$200
If material $A3 is listed one or more times the COUNTIF will return the count as a positive integer. If not listed, the COUNTIF will return zero, 0.

=IF(COUNTIF('PRODUCT & BOTTLE TYPE'!A$3:A$2000,$A3)>0,"Yes","")
The IF statement simple says return 'Yes' if the COUNTIF is greater than zero, otherwise return an empty cell.

As the formula is dragged down, $A3 increments to compare the material of each row.
As the formula is dragged across, the Countif range A$3:A$2000 increments to become B$3:B$200.... etc.

Hope that helps.

OH WOW, thanks for great explanation,
This is exactly what I needed :)

Thanks so much for all the help! I really appreciate it.
 
Upvote 0
@dinkss Great that we were able to get you up and running.

Essentially, the solution is checking each Product & Bottle Type column to see if the Material listed in Master-Material A exists.
This could be done in various ways. I chose to use the COUNTIF function. @Peter_SSs chose to use the MATCH function.

The whole thing is made fairly simple because your Product headings in both sheets are in the same order. The only difference is that on Product & BT they run from column A: ... and on the Master-Material they run from column B: .... So to check the product in Master B, we check column A of P&BT

The material we are checking is always in Master A so make that column absolute, using $A Leave the row number as relative, so that it increments as and when formula pulled down.
Thus first material reference is $A3

COUNTIF('PRODUCT & BOTTLE TYPE'!A$3:A$2000,$A3) - Asks how many instances of Material $A3 in the P&BT range A$3:A$200
If material $A3 is listed one or more times the COUNTIF will return the count as a positive integer. If not listed, the COUNTIF will return zero, 0.

=IF(COUNTIF('PRODUCT & BOTTLE TYPE'!A$3:A$2000,$A3)>0,"Yes","")
The IF statement simple says return 'Yes' if the COUNTIF is greater than zero, otherwise return an empty cell.

As the formula is dragged down, $A3 increments to compare the material of each row.
As the formula is dragged across, the Countif range A$3:A$2000 increments to become B$3:B$200.... etc.

Hope that helps.
Just a question again - is VLOOKUP function better to use? If yes is it possible to use it in my case? How could I do that?
 
Upvote 0
I cannot see how you got that particular "Yes" and "No" in your images, but my best guess is for cell B2 in 'MASTER-MATERIAL', and copied across and down after adjusting ranges if required:

Excel Formula:
=IF(ISNUMBER(MATCH($A2,FILTER('PRODUCT & BOTTLE TYPE'!$C$3:$Z$100,'PRODUCT & BOTTLE TYPE'!$C$2:$Z$2=B$1,""),0)),"Yes","No")
Just a question again - is VLOOKUP function better to use? If yes is it possible to use it in my case? How could I do that?
 
Upvote 0
Just a question again - is VLOOKUP function better to use? If yes is it possible to use it in my case? How could I do that?
No. You are merely checking for the existence within a series if single column lists. Countif and Match are the goto functions.
 
Upvote 0

Forum statistics

Threads
1,215,045
Messages
6,122,836
Members
449,096
Latest member
Erald

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