Match ranged figures in sheets

darcus

New Member
Joined
Jun 30, 2014
Messages
29
Hi

I hope you can help - I can't get my head around using INDEX and MATCH to do the following:

I have two tables set up as follows:

Table 1 - Material Chemical Composition.

For example: C_max and C_min - this is the range of C (Carbon).
Material_BS970-91Material_BS970-1955MaterialTypeCondC_minC_maxSi_minSi_maxMn_minMn_maxP_minP_maxS_minS_maxCr_minCr_maxMo_minMo_maxNi_minNi_maxSe_minSe_maxTi_minTi_maxNb_minNb_max
230M07EN1ASteel00.1500.050.91.300.090.250.350
100​
0​
100​
0​
100​
0​
100​
0​
100​
0​
100​
212A42EN8DMSteel0.40.4500.2511.300.060.120.20
100​
0​
100​
0​
100​
0​
100​
0​
100​
0​
100​
226M44EN8MSteelT0.40.4800.251.31.700.060.220.30
100​
0​
100​
0​
100​
0​
100​
0​
100​
0​
100​
080A15EN32BSteel0.130.180.10.40.70.900.0500.050
100​
0​
100​
0​
100​
0​
100​
0​
100​
0​
100​
080M15EN32CSteel0.120.180.10.40.6100.0500.050
100​
0​
100​
0​
100​
0​
100​
0​
100​
0​
100​
070M20EN3BSteel0.160.240.10.40.50.900.0500.050
100​
0​
100​
0​
100​
0​
100​
0​
100​
0​
100​
080A30EN5BSteel0.260.340.10.40.70.900.0500.050
100​
0​
100​
0​
100​
0​
100​
0​
100​
0​
100​
080A42EN8DSteel0.40.450.10.40.70.900.0500.050
100​
0​
100​
0​
100​
0​
100​
0​
100​
0​
100​
080A47EN43BSteel0.450.50.10.40.70.900.0500.050
100​
0​
100​
0​
100​
0​
100​
0​
100​
0​
100​
080M50EN43ASteelT0.450.550.10.40.6100.0500.050
100​
0​
100​
0​
100​
0​
100​
0​
100​
0​
100​

Table 2 - Grade Spec Chemical Limits
SpecificationThreadClassStyleC_minC_maxMn_minMn_maxP_minP_maxS_minS_maxPb_minPb_max
ISO 898-2Coarse04style 0 0.45d<m<0.8d
0.00​
0.58​
0.25​
0.00​
0.060​
0.00​
0.150​
ISO 898-2Coarse05style 0 0.45d<m<0.8d
0.00​
0.58​
0.30​
0.00​
0.048​
0.00​
0.058​
ISO 898-2Coarse5style 1 m>0.8d
0.00​
0.58​
0.00​
0.060​
0.00​
0.150​
ISO 898-2Coarse5style 1 m>0.8d
0.00​
0.58​
0.00​
0.110​
0.00​
0.340​
0.00​
0.35​
ISO 898-2Coarse6style 1 m>0.8d
0.00​
0.58​
0.00​
0.060​
0.00​
0.150​
ISO 898-2Coarse6style 1 m>0.8d
0.00​
0.58​
0.00​
0.110​
0.00​
0.340​
0.00​
0.35​
ISO 898-2Coarse8style 2 m>0.9d
0.00​
0.58​
0.25​
0.00​
0.060​
0.00​
0.150​
ISO 898-2Coarse8style 1 m>0.8d
0.00​
0.58​
0.30​
0.00​
0.048​
0.00​
0.058​
ISO 898-2Coarse9style 1 m>0.8d
0.00​
0.58​
0.25​
0.00​
0.060​
0.00​
0.150​
ISO 898-2Coarse10style 1 m>0.8d
0.00​
0.58​
0.30​
0.00​
0.048​
0.00​
0.058​
ISO 898-2Coarse10style 2 m>0.9d
0.00​
0.58​
0.30​
0.00​
0.048​
0.00​
0.058​
ISO 898-2Coarse12style 1 m>0.8d
0.00​
0.58​
0.45​
0.00​
0.048​
0.00​
0.058​
ISO 898-2Coarse12style 2 m>0.9d
0.00​
0.58​
0.45​
0.00​
0.048​
0.00​
0.058​

I want to be able to put the 'Class' from table 2 next to those figures in table one where all the Chemical figures match.
So for example against 230M07 in table one, I want it to put 04 in a new column at the end.

Is this possible?
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Hi Darcus,
I'm trying to compare your tables, but how do you know which row is the matching one? I mean: in table 2 I can't see "230M07", so how would you find the matching row, "all the Chemical figures match"? Could you specify that a bit more?
Thanks,
Koen
 
Upvote 0
Hi
Sorry, I've realised I was unclear.

Table 1 contains the material name in column one, columns 5 onward contain chemical composition limits.
In table 2, each class has it's own chemical composition limits.
In essence, i want to compare the two tables and see where there is overlap...
So for example:
ClassChemicalClass LimitMaterials that Match
04C0.00-0.58230M07
212A42
226M44
080A15
080M15
070M20
080A30
080A42
080A47
080M50
04Mn0.25-100.00 (has no maximum, but I will add 100 to the max column so that the formula remains the same for each of the elements in the list)230M07
212A42
226M44
080A15
080M15
070M20
080A30
080A42
080A47
080M50
04P0.00-0.06212A42
226M44
080A15
080M15
070M20
080A30
080A42
080A47
080M50
04S0.00-0.15080A15
080M15
070M20
080A30
080A42
080A47
080M50

So, after this matching process, we can see that the only ones that match C, Mn, P and S limits are:
080A15
080M15
070M20
080A30
080A42
080A47
080M50

I want to be able to do that for each class. I have a Table 1 materials list that contains nearly 300 materials, so comparing each one by hand is a pain!

Sorry for being unclear, if I can do anything else, please let me know.

D
 
Upvote 0
Hi D,
that's probably a tough cookie if you want to use formulas only, probably some VBA is needed (e.g. making a custom function). To clarify, are these cases okay, given e.g. just the C values:
Tbl1: 0,1-0,2 Tbl2: 0,3-0,4 -> no match, no overlap
Tbl1: 0,1-0,2 Tbl2: 0,2-0,3 -> match, one value overlapping
Tbl1: 0,1-0,2 Tbl2: 0,0-0,4 -> match, full overlap
Tbl1: 0,1-0,2 Tbl2: 0,05-0,15 -> match, partial overlap
Do you speak some VBA?
Koen
 
Upvote 0
Hi Koen,

Thanks for your response.
There must be full overlap within the ranges.

Yes, I was thinking about using VBA because I couldn't see how to accomplish it with formulae. I know a little VBA. I'll have a bash at writing something and post it here, as soon as I have some time.

Thank you
 
Upvote 0

Forum statistics

Threads
1,214,970
Messages
6,122,514
Members
449,088
Latest member
RandomExceller01

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