less than greater than for large amount of data

excelnoob123456

New Member
Joined
Mar 7, 2015
Messages
39
Hi Guys

I am OK with Excel and I know a way that I can do this, using If and AND formulae, but I feel there must be a neater way to do this given the large amount of data I'm working with would make my formula a bit unwieldy.

See example data below:

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[TD]I[/TD]
[TD]J[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Type[/TD]
[TD]SizeA[/TD]
[TD]SizeB[/TD]
[TD][/TD]
[TD]222 (sizeA)[/TD]
[TD]222 (sizeB)[/TD]
[TD][/TD]
[TD][TABLE="width: 64"]
<tbody>[TR="class: grid"]
[TD="width: 64, align: right"]555 (size a)[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]555 (size b)[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD][TABLE="width: 64"]
<tbody>[TR="class: grid"]
[TD="width: 64, align: right"]222[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 70"]
<tbody>[TR="class: grid"]
[TD="width: 70"]1436[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]2725[/TD]
[TD][/TD]
[TD][TABLE="width: 70"]
<tbody>[TR="class: grid"]
[TD="width: 70"]2000[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]1500[/TD]
[TD][/TD]
[TD][TABLE="width: 64"]
<tbody>[TR="class: grid"]
[TD="width: 64"]1200[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]1500[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD][TABLE="width: 64"]
<tbody>[TR="class: grid"]
[TD="width: 64, align: right"]234[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 70"]
<tbody>[TR="class: grid"]
[TD="width: 70"]1303[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]1984[/TD]
[TD][/TD]
[TD][TABLE="width: 70"]
<tbody>[TR="class: grid"]
[TD="width: 70"]2000[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]2100[/TD]
[TD][/TD]
[TD][TABLE="width: 64"]
<tbody>[TR="class: grid"]
[TD="width: 64"]1300[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]1700[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD][TABLE="width: 64"]
<tbody>[TR="class: grid"]
[TD="width: 64, align: right"]607[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 70"]
<tbody>[TR="class: grid"]
[TD="width: 70"]1237[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]1953[/TD]
[TD][/TD]
[TD][TABLE="width: 70"]
<tbody>[TR="class: grid"]
[TD="width: 70"]2000[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]2550[/TD]
[TD][/TD]
[TD][TABLE="width: 64"]
<tbody>[TR="class: grid"]
[TD="width: 64"]1500[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]1900[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD][TABLE="width: 64"]
<tbody>[TR="class: grid"]
[TD="width: 64, align: right"]555[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 70"]
<tbody>[TR="class: grid"]
[TD="width: 70"]1224[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]2075[/TD]
[TD][/TD]
[TD][TABLE="width: 70"]
<tbody>[TR="class: grid"]
[TD="width: 70"]2550[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]1500[/TD]
[TD][/TD]
[TD]1500[/TD]
[TD]1200[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][TABLE="width: 70"]
<tbody>[TR="class: grid"]
[TD="width: 70"]2550[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]2100[/TD]
[TD][/TD]
[TD]1600[/TD]
[TD]1300[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

Now, in my data all of the types (eg. 222,234,607,etc) have their own sizes as shown, but I want to return the 'allowable size' from the tables to the right, all of the types have their own different allowable sizes and sometimes the values they have can be outside of the allowable range, in which case I would like to display "width too large" for example. Now, in reality the SizeA and B are both in the same cell eg. 1224x2075 for both sets of data, and I think I will add columns where I seperate this out to make the formula easier. So currently my thinking would be to do something like:

Code:
=IF(and(A2=F1,b2<=f2,c2<=g2),concatenate(f2&"x"&g2),if(and(a2=f1,b2<=f2,c2>g2,c2<=g3),concatenate(f2&"x"&g3),etc.(

Going through the who line of options this would be quite a cumbersome formula, I think there must be an easier way to do this but I'm not sure how?

Any help greatly appreciated.
 
Last edited:

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Can you provide some more examples to illustrate, and also show the results you're expecting?

I'm guessing that if you had a 222 with dimensions 1800 x 1400, you'd return "2000x1500"?

What about a 222 with dimensions 1400 x 1400 where the allowable sizes include 1500x2000 and 1800x1600? Do you first choose the smallest A that will fit and return 1500x2000, or first choose the smallest B that will fit and return 1800X1600?

etc etc ...

For the 222 and 555 examples posted, both B sizes exceed the ranges available, so presumably you'll want to say "Size B too large"?
 
Upvote 0
Hi Stephen

Thanks for the reply. I will try to clarify what I'm trying to do a bit better...

I need to return the allowed values which are either bigger of the same size as the actual values, in the case where there is more than one acceptable size I would like the option with the smallest total area (sizea multiplied by sizeb). I only want the error displayed if there are no allowable sizes which will fit the actual size.

I should clarify as well that the Size A and Size B are linked, e.g. for a piece of wood, so if the actual size they want is a 1500x1234 (sizea x sizeb) I need to find the nearest size that would be bigger or as big as that overall. So for my example, I am comparing the sizes in b2 and c2, which is type 222 (cell a2) to the allowable sizes for a type 222 in f2:g6, so I would check first if b2 is less than or equal to f2 AND c2 is less than or equal to g2, say b2 is but c2 isn't, then I would check c2 against g3, g4 etc. and same with c2 if it didn't match.

I know that this will work but there are more tables than this so there are quite a large number of possible variations which would make the formula quite big, so if there was another option that would be excellent.

Hope this makes sense, it's hard to explain when writing.
 
Last edited:
Upvote 0
Perhaps something like this ...

I have used a helper column, so that the formula isn't twice as long.

Not checked in great detail yet, so see if you can break it!

D3 (array-entered): =MATCH(MIN(IF((INDEX(Sizes,,MATCH(A3,Headers,))>=B3)*(INDEX(Sizes,,1+MATCH(A3,Headers,))>=C3)+(INDEX(Sizes,,MATCH(A3,Headers,))>=C3)*(INDEX(Sizes,,1+MATCH(A3,Headers,))>=B3),INDEX(Sizes,,MATCH(A3,Headers,))*INDEX(Sizes,,1+MATCH(A3,Headers,)))),IF((INDEX(Sizes,,MATCH(A3,Headers,))>=B3)*(INDEX(Sizes,,1+MATCH(A3,Headers,))>=C3)+(INDEX(Sizes,,MATCH(A3,Headers,))>=C3)*(INDEX(Sizes,,1+MATCH(A3,Headers,))>=B3),INDEX(Sizes,,MATCH(A3,Headers,))*INDEX(Sizes,,1+MATCH(A3,Headers,))),)

E3: =INDEX(Sizes,D3,MATCH(A3,Headers,))&"x"&INDEX(Sizes,D3,1+MATCH(A3,Headers,))


Book1
ABCDEFGHIJKLMN
1222222234234555555607607
2TypeSizeASizeBMatchResult?SizeASizeBSizeASizeBSizeASizeBSizeASizeB
32221436205042550x150020001500120015001200150012001500
42341303170031500x190020002100130017001300170013001700
56071237145051600x130020002550150019001500190015001900
65551224150051600x130025501500150012001500120015001200
76071450123751600x130025502100160013001600130016001300
86071237145051600x1300
960712371950#N/ANo can do!
Sheet1
 
Last edited:
Upvote 0
Perhaps something like this ...

I have used a helper column, so that the formula isn't twice as long.

Not checked in great detail yet, so see if you can break it!

D3 (array-entered): =MATCH(MIN(IF((INDEX(Sizes,,MATCH(A3,Headers,))>=B3)*(INDEX(Sizes,,1+MATCH(A3,Headers,))>=C3)+(INDEX(Sizes,,MATCH(A3,Headers,))>=C3)*(INDEX(Sizes,,1+MATCH(A3,Headers,))>=B3),INDEX(Sizes,,MATCH(A3,Headers,))*INDEX(Sizes,,1+MATCH(A3,Headers,)))),IF((INDEX(Sizes,,MATCH(A3,Headers,))>=B3)*(INDEX(Sizes,,1+MATCH(A3,Headers,))>=C3)+(INDEX(Sizes,,MATCH(A3,Headers,))>=C3)*(INDEX(Sizes,,1+MATCH(A3,Headers,))>=B3),INDEX(Sizes,,MATCH(A3,Headers,))*INDEX(Sizes,,1+MATCH(A3,Headers,))),)

E3: =INDEX(Sizes,D3,MATCH(A3,Headers,))&"x"&INDEX(Sizes,D3,1+MATCH(A3,Headers,))

ABCDEFGHIJKLMN

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"]222[/TD]
[TD="align: right"]222[/TD]
[TD="align: right"]234[/TD]
[TD="align: right"]234[/TD]
[TD="align: right"]555[/TD]
[TD="align: right"]555[/TD]
[TD="align: right"]607[/TD]
[TD="align: right"]607[/TD]

[TD="align: center"]2[/TD]
[TD="align: right"]Type[/TD]
[TD="align: right"]SizeA[/TD]
[TD="align: right"]SizeB[/TD]
[TD="align: center"]Match[/TD]
[TD="align: center"]Result?[/TD]
[TD="align: right"][/TD]
[TD="align: right"]SizeA[/TD]
[TD="align: right"]SizeB[/TD]
[TD="align: right"]SizeA[/TD]
[TD="align: right"]SizeB[/TD]
[TD="align: right"]SizeA[/TD]
[TD="align: right"]SizeB[/TD]
[TD="align: right"]SizeA[/TD]
[TD="align: right"]SizeB[/TD]

[TD="align: center"]3[/TD]
[TD="align: right"]222[/TD]
[TD="align: right"]1436[/TD]
[TD="align: right"]2050[/TD]
[TD="align: center"]4[/TD]
[TD="align: center"]2550x1500[/TD]
[TD="align: right"][/TD]
[TD="align: right"]2000[/TD]
[TD="align: right"]1500[/TD]
[TD="align: right"]1200[/TD]
[TD="align: right"]1500[/TD]
[TD="align: right"]1200[/TD]
[TD="align: right"]1500[/TD]
[TD="align: right"]1200[/TD]
[TD="align: right"]1500[/TD]

[TD="align: center"]4[/TD]
[TD="align: right"]234[/TD]
[TD="align: right"]1303[/TD]
[TD="align: right"]1700[/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]1500x1900[/TD]
[TD="align: right"][/TD]
[TD="align: right"]2000[/TD]
[TD="align: right"]2100[/TD]
[TD="align: right"]1300[/TD]
[TD="align: right"]1700[/TD]
[TD="align: right"]1300[/TD]
[TD="align: right"]1700[/TD]
[TD="align: right"]1300[/TD]
[TD="align: right"]1700[/TD]

[TD="align: center"]5[/TD]
[TD="align: right"]607[/TD]
[TD="align: right"]1237[/TD]
[TD="align: right"]1450[/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]1600x1300[/TD]
[TD="align: right"][/TD]
[TD="align: right"]2000[/TD]
[TD="align: right"]2550[/TD]
[TD="align: right"]1500[/TD]
[TD="align: right"]1900[/TD]
[TD="align: right"]1500[/TD]
[TD="align: right"]1900[/TD]
[TD="align: right"]1500[/TD]
[TD="align: right"]1900[/TD]

[TD="align: center"]6[/TD]
[TD="align: right"]555[/TD]
[TD="align: right"]1224[/TD]
[TD="align: right"]1500[/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]1600x1300[/TD]
[TD="align: right"][/TD]
[TD="align: right"]2550[/TD]
[TD="align: right"]1500[/TD]
[TD="align: right"]1500[/TD]
[TD="align: right"]1200[/TD]
[TD="align: right"]1500[/TD]
[TD="align: right"]1200[/TD]
[TD="align: right"]1500[/TD]
[TD="align: right"]1200[/TD]

[TD="align: center"]7[/TD]
[TD="align: right"]607[/TD]
[TD="align: right"]1450[/TD]
[TD="align: right"]1237[/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]1600x1300[/TD]
[TD="align: right"][/TD]
[TD="align: right"]2550[/TD]
[TD="align: right"]2100[/TD]
[TD="align: right"]1600[/TD]
[TD="align: right"]1300[/TD]
[TD="align: right"]1600[/TD]
[TD="align: right"]1300[/TD]
[TD="align: right"]1600[/TD]
[TD="align: right"]1300[/TD]

[TD="align: center"]8[/TD]
[TD="align: right"]607[/TD]
[TD="align: right"]1237[/TD]
[TD="align: right"]1450[/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]1600x1300[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]9[/TD]
[TD="align: right"]607[/TD]
[TD="align: right"]1237[/TD]
[TD="align: right"]1950[/TD]
[TD="align: center"]#N/A[/TD]
[TD="align: center"]No can do![/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

</tbody>

Thanks very much Stephen I'll try this tomorrow! This is the sort of thing I was thinking of, using arrays to make it shorter but I couldn't think how to do it. I'll let you know the results :)
 
Upvote 0
... where

Headers: G1:N1
Sizes: G3:N7

Can't quite work out how this is supposed to work, I tried it as you have typed it always n/a's out and I evaluated the formula and the numbers being multiplied means it eventually ends up with something like match(2500000,250000) which of course returns n/a, looking into how to get it to work at the minute but I don't quite get how it's supposed to work at the moment tbh.
 
Upvote 0
Last edited:
Upvote 0
Hi!

Maybe the suggestions below can help you (with StephenCrump's layout)

Lets go:

1) Created the names below in Sheet1:

HTable - Refers to: =Sheet1!$G$1:$N$1

DTable - Refers to: =Sheet1!$G$3:$N$7

2) Created the names below (with cell D3 selected) in Sheet1:

ColSA - Refers to: =MATCH(Sheet1!$A3,HTable,0)

RowRes - Refers to:

=MIN(IF(INDEX(IF(Sheet1!$A3=HTable,IF((Sheet1!$B3<=INDEX(DTable,,ColSA))*
(Sheet1!$C3<=INDEX(DTable,,ColSA+1)),DTable,0),0),,ColSA)>0,ROW(DTable)-ROW(INDEX(DTable,1,1))+1))


3) Finally, put the formula below in cell D2 and copy down:

=IFERROR(INDEX(DTable,RowRes,ColSA)&"x"&INDEX(DTable,RowRes,ColSA+1),"width too large")

Sheet1
[TABLE="class: grid, width: 729"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[TD]I[/TD]
[TD]J[/TD]
[TD]K[/TD]
[TD]L[/TD]
[TD]M[/TD]
[TD]N[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]222[/TD]
[TD="align: right"]222[/TD]
[TD="align: right"]234[/TD]
[TD="align: right"]234[/TD]
[TD="align: right"]555[/TD]
[TD="align: right"]555[/TD]
[TD="align: right"]607[/TD]
[TD="align: right"]607[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Type[/TD]
[TD]SizeA[/TD]
[TD]SizeB[/TD]
[TD]Result[/TD]
[TD][/TD]
[TD][/TD]
[TD]SizeA[/TD]
[TD]SizeB[/TD]
[TD]SizeA[/TD]
[TD]SizeB[/TD]
[TD]SizeA[/TD]
[TD]SizeB[/TD]
[TD]SizeA[/TD]
[TD]SizeB[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD="align: right"]222[/TD]
[TD="align: right"]1436[/TD]
[TD="align: right"]2050[/TD]
[TD]2000x2100[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]2000[/TD]
[TD="align: right"]1500[/TD]
[TD="align: right"]1200[/TD]
[TD="align: right"]1500[/TD]
[TD="align: right"]1200[/TD]
[TD="align: right"]1500[/TD]
[TD="align: right"]1200[/TD]
[TD="align: right"]1500[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD="align: right"]234[/TD]
[TD="align: right"]1303[/TD]
[TD="align: right"]1700[/TD]
[TD]1500x1900[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]2000[/TD]
[TD="align: right"]2100[/TD]
[TD="align: right"]1300[/TD]
[TD="align: right"]1700[/TD]
[TD="align: right"]1300[/TD]
[TD="align: right"]1700[/TD]
[TD="align: right"]1300[/TD]
[TD="align: right"]1700[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD="align: right"]607[/TD]
[TD="align: right"]1237[/TD]
[TD="align: right"]1450[/TD]
[TD]1300x1700[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]2000[/TD]
[TD="align: right"]2550[/TD]
[TD="align: right"]1500[/TD]
[TD="align: right"]1900[/TD]
[TD="align: right"]1500[/TD]
[TD="align: right"]1900[/TD]
[TD="align: right"]1500[/TD]
[TD="align: right"]1900[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD="align: right"]555[/TD]
[TD="align: right"]1224[/TD]
[TD="align: right"]1500[/TD]
[TD]1300x1700[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]2550[/TD]
[TD="align: right"]1500[/TD]
[TD="align: right"]1500[/TD]
[TD="align: right"]1200[/TD]
[TD="align: right"]1500[/TD]
[TD="align: right"]1200[/TD]
[TD="align: right"]1500[/TD]
[TD="align: right"]1200[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD="align: right"]607[/TD]
[TD="align: right"]1450[/TD]
[TD="align: right"]1237[/TD]
[TD]1500x1900[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]2550[/TD]
[TD="align: right"]2100[/TD]
[TD="align: right"]1600[/TD]
[TD="align: right"]1300[/TD]
[TD="align: right"]1600[/TD]
[TD="align: right"]1300[/TD]
[TD="align: right"]1600[/TD]
[TD="align: right"]1300[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD="align: right"]607[/TD]
[TD="align: right"]1237[/TD]
[TD="align: right"]1450[/TD]
[TD]1300x1700[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD="align: right"]607[/TD]
[TD="align: right"]1237[/TD]
[TD="align: right"]1950[/TD]
[TD]width too large[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]***[/TD]
[TD]******[/TD]
[TD]******[/TD]
[TD]******[/TD]
[TD]**************[/TD]
[TD]***[/TD]
[TD]***[/TD]
[TD]******[/TD]
[TD]******[/TD]
[TD]******[/TD]
[TD]******[/TD]
[TD]******[/TD]
[TD]******[/TD]
[TD]******[/TD]
[TD]******[/TD]
[/TR]
</tbody>[/TABLE]


I hope that the suggestions above helps.

Markmzz
 
Upvote 0
Hi!

Another suggestion (more robust)

Lets go:

1) Created the names below in Sheet1:

HTable - Refers to: =Sheet1!$G$1:$N$1

DTable - Refers to: =Sheet1!$G$3:$N$7

Type - Refers to: =Sheet1!$A$3:$A$18

SizeA - Refers to: =Sheet1!$B$3:$B$18

SizeB - Refers to: =Sheet1!$C$3:$C$18

ColSA - Refers to: =MATCH(INDEX(Type,ROW()-ROW(INDEX(Type,1))+1),HTable,0)

DColSA - Refers to: =INDEX(DTable,,ColSA)

DColSB - Refers to: =INDEX(DTable,,ColSA+1)

ColAxColB - Refers to: =IF((INDEX(SizeA,ROW()-ROW(INDEX(SizeA,1))+1)<=DColSA)*(INDEX(SizeB,ROW()-ROW(INDEX(SizeB,1))+1)<=DColSB),DColSA*DColSB)

RowRes - Refers to: =MATCH(MIN(ColAxColB),ColAxColB,0)

2) Finally, put the formula below in cell D2 and copy down:

=IFERROR(INDEX(DColSA,RowRes)&"x"&INDEX(DColSB,RowRes),"width too large")

Sheet1
[TABLE="class: grid, width: 729"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[TD]I[/TD]
[TD]J[/TD]
[TD]K[/TD]
[TD]L[/TD]
[TD]M[/TD]
[TD]N[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]222[/TD]
[TD="align: right"]222[/TD]
[TD="align: right"]234[/TD]
[TD="align: right"]234[/TD]
[TD="align: right"]555[/TD]
[TD="align: right"]555[/TD]
[TD="align: right"]607[/TD]
[TD="align: right"]607[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Type[/TD]
[TD]SizeA[/TD]
[TD]SizeB[/TD]
[TD]Result[/TD]
[TD][/TD]
[TD][/TD]
[TD]SizeA[/TD]
[TD]SizeB[/TD]
[TD]SizeA[/TD]
[TD]SizeB[/TD]
[TD]SizeA[/TD]
[TD]SizeB[/TD]
[TD]SizeA[/TD]
[TD]SizeB[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD="align: right"]222[/TD]
[TD="align: right"]1436[/TD]
[TD="align: right"]2050[/TD]
[TD]2000x2100[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]2000[/TD]
[TD="align: right"]1500[/TD]
[TD="align: right"]1200[/TD]
[TD="align: right"]1500[/TD]
[TD="align: right"]1200[/TD]
[TD="align: right"]1500[/TD]
[TD="align: right"]1200[/TD]
[TD="align: right"]1500[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD="align: right"]234[/TD]
[TD="align: right"]1303[/TD]
[TD="align: right"]1700[/TD]
[TD]1500x1900[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]2000[/TD]
[TD="align: right"]2100[/TD]
[TD="align: right"]1300[/TD]
[TD="align: right"]1700[/TD]
[TD="align: right"]1300[/TD]
[TD="align: right"]1700[/TD]
[TD="align: right"]1300[/TD]
[TD="align: right"]1700[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD="align: right"]607[/TD]
[TD="align: right"]1237[/TD]
[TD="align: right"]1450[/TD]
[TD]1300x1700[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]2000[/TD]
[TD="align: right"]2550[/TD]
[TD="align: right"]1500[/TD]
[TD="align: right"]1900[/TD]
[TD="align: right"]1500[/TD]
[TD="align: right"]1900[/TD]
[TD="align: right"]1500[/TD]
[TD="align: right"]1900[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD="align: right"]555[/TD]
[TD="align: right"]1224[/TD]
[TD="align: right"]1500[/TD]
[TD]1300x1700[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]2550[/TD]
[TD="align: right"]1500[/TD]
[TD="align: right"]1500[/TD]
[TD="align: right"]1200[/TD]
[TD="align: right"]1500[/TD]
[TD="align: right"]1200[/TD]
[TD="align: right"]1500[/TD]
[TD="align: right"]1200[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD="align: right"]607[/TD]
[TD="align: right"]1450[/TD]
[TD="align: right"]1237[/TD]
[TD]1600x1300[/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]2550[/TD]
[TD="align: right"]2100[/TD]
[TD="align: right"]1600[/TD]
[TD="align: right"]1300[/TD]
[TD="align: right"]1600[/TD]
[TD="align: right"]1300[/TD]
[TD="align: right"]1600[/TD]
[TD="align: right"]1300[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD="align: right"]607[/TD]
[TD="align: right"]1237[/TD]
[TD="align: right"]1450[/TD]
[TD]1300x1700[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD="align: right"]607[/TD]
[TD="align: right"]1237[/TD]
[TD="align: right"]1950[/TD]
[TD]width too large[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD="align: right"]222[/TD]
[TD="align: right"]1436[/TD]
[TD="align: right"]2735[/TD]
[TD]width too large[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]11[/TD]
[TD="align: right"]234[/TD]
[TD="align: right"]1303[/TD]
[TD="align: right"]1984[/TD]
[TD]width too large[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]12[/TD]
[TD="align: right"]607[/TD]
[TD="align: right"]1237[/TD]
[TD="align: right"]1953[/TD]
[TD]width too large[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]13[/TD]
[TD="align: right"]555[/TD]
[TD="align: right"]1224[/TD]
[TD="align: right"]2075[/TD]
[TD]width too large[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]14[/TD]
[TD="align: right"]222[/TD]
[TD="align: right"]2550[/TD]
[TD="align: right"]2100[/TD]
[TD]2550x2100[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]15[/TD]
[TD="align: right"]234[/TD]
[TD="align: right"]1600[/TD]
[TD="align: right"]1300[/TD]
[TD]1600x1300[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]16[/TD]
[TD="align: right"]222[/TD]
[TD="align: right"]2000[/TD]
[TD="align: right"]1500[/TD]
[TD]2000x1500[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]17[/TD]
[TD="align: right"]234[/TD]
[TD="align: right"]1200[/TD]
[TD="align: right"]1900[/TD]
[TD]1500x1900[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]18[/TD]
[TD="align: right"]234[/TD]
[TD="align: right"]1500[/TD]
[TD="align: right"]1200[/TD]
[TD]1500x1200[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]***[/TD]
[TD]******[/TD]
[TD]******[/TD]
[TD]******[/TD]
[TD]**************[/TD]
[TD]***[/TD]
[TD]***[/TD]
[TD]******[/TD]
[TD]******[/TD]
[TD]******[/TD]
[TD]******[/TD]
[TD]******[/TD]
[TD]******[/TD]
[TD]******[/TD]
[TD]******[/TD]
[/TR]
</tbody>[/TABLE]


I hope that the new suggestions above helps.

Markmzz
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,175
Members
453,021
Latest member
Justyna P

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