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:
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.
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: