convert # x # dimensions to decimal for panel size

solidENM

Board Regular
Joined
Feb 23, 2017
Messages
93
Hello,
I am hoping someone has some experience taking dimensions and converting them into decimal format.
I have made some code to extract all panels from a list and create a new sheet called "Panels." I need to take this one step further, and convert the # x # format into a decimal number, preferably rounded to nearest .25 of a whole panel.
in column C, I have dimensions of a panel.

EX: 500x600mm. This would be converted to 0.25 panels.
EX: 900x1000 would be 0.5 panels.

Total panel size is 1220 x 2440. They always have the same format, with the space between the number on either side, and the x in the middle.


col a: item number
col b: qty
Col C: dimensions

I would like to convert column C to decimal into column "e" which is empty.
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Maybe you can do something like this? Note that this only works for dimensions in "#x#" format without the "mm" or spaces.


Excel 2010
ABCD
1Item #QtydimensionsPanels
21231500x6000.25
34561900x10000.5
Sheet1
Cell Formulas
RangeFormula
D2=LOOKUP(LEFT(C2,FIND("x",C2)-1)*MID(C2,FIND("x",C2)+1,LEN(C2)),{0,744201,1488401},{0.25,0.5,1})
 
Upvote 0
WOW, that worked great. thanks for the help! it seems to be working fine both with and without the spaces too. I tried both just to make sure.
 
Upvote 0
would we be able to throw a modifier in there? Column B has the quantity of each panel. I added ( ) *b3 at the end, but it will just multiply the end result. for instance, 3 panels at 411 x 271 is coming in at .75 when .25 would be barely under the actual number.

Could we have the lookup find which number is smaller in column C and multiply it by the qty in column B before finally multiplying that by the larger number in column c?

EX: 411 x 271 (at qty 3 in column B)
411 x 813


This would produce a much closer estimation for my purposes.
 
Last edited:
Upvote 0
would we be able to throw a modifier in there? Column B has the quantity of each panel. I added ( ) *b3 at the end, but it will just multiply the end result. for instance, 3 panels at 411 x 271 is coming in at .75 when .25 would be barely under the actual number.

Could we have the lookup find which number is smaller in column C and multiply it by the qty in column B before finally multiplying that by the larger number in column c?

EX: 411 x 271 (at qty 3 in column B)
411 x 813


This would produce a much closer estimation for my purposes.

It doesn't matter if you multiply the first or second # by 3.
3*L*W = L*3*W = L*W*3.

You can change the formula to something along the lines of

=LOOKUP(B2*LEFT(C2,FIND("x",C2)-1)*MID(C2,FIND("x",C2)+1,LEN(C2)),{0,744201,1488401,...},{0.25,0.5,1,...})

but it will need more numbers at the end to account for the larger value due to the qty multiple.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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