Forum Discussion
Help with a formula to sort dimensions?
Hello,
I am trying to determine which excel formula would be the best to create a spread sheet that will automatically input the dimensions for lumber into a given cell. The excerpt below shows the format I am attempting to achieve. In short, I need the first numerical figure in the "Grade/Description" column to automatically populate in the "Thick" column, the second numerical figure, followed by "X" to populate in the "Width" column, and finally, the last numerical figure, followed by "-" to populate in the "Length" column. Any tips or advice is greatly appreciated!
GSWP Item # | Thick | Width | Length | Grade/Description | Units | Unit Size | Total Pieces |
1630700 | 1X12-12 D GRADE WHITE | 3 | 128 | 384 | |||
1320700 | 1X 6-10 D&BTR WHITE | 1 | 256 | 256 | |||
1330700 | 1X 6-12 D&BTR WHITE | 1 | 256 | 256 | |||
1220000 | 1X 4-10 ROUGH WHITE | 4 | 200 | 800 | |||
1230000 | 1X 4-12 ROUGH WHITE | 8 | 200 | 1,600 |
Cheers,
John
Hi J-Griff,
In the attached file, the formula for Thick in B2 is:
=LEFT($E2,
FIND("x",$E2)-1)Moreover, the formula for Width in C2 is:
=MID($E2,
FIND("x",$E2)+1,
FIND("-",$E2)-FIND("x",$E2)-1)Finally, the formula for Length in D2 is:
=MID($E2,
FIND("-",$E2)+1,
FIND(" ",$E2)-FIND("-",$E2)-1)
9 Replies
- TwifooSilver Contributor
Hi J-Griff,
In the attached file, the formula for Thick in B2 is:
=LEFT($E2,
FIND("x",$E2)-1)Moreover, the formula for Width in C2 is:
=MID($E2,
FIND("x",$E2)+1,
FIND("-",$E2)-FIND("x",$E2)-1)Finally, the formula for Length in D2 is:
=MID($E2,
FIND("-",$E2)+1,
FIND(" ",$E2)-FIND("-",$E2)-1)- J-GriffCopper Contributor
Twifoo, Thank you so much for your help! I was able to get the first line to work with all three formulas you provided. And as you can see in the attached excel document, the first two columns, thick & width, work perfectly, but I can't figure out why the subsequent lines in the length column are not computing correctly?
Any advice?
Thanks,
John
- Smitty SmithIron Contributor
J-Griff I'd build a lookup table that you can reference.
Thick Width Length Grade/Description 1 12 12 1X12-12 D GRADE WHITE 1 6 10 1X 6-10 D&BTR WHITE 1 6 12 1X 6-12 D&BTR WHITE 1 4 10 1X 4-10 ROUGH WHITE 1 4 12 1X 4-12 ROUGH WHITE
You can set it up as an Excel table, and use a Data Validation drop-down list to select the Grade/Description. Then use INDEX/MATCH to populate the Thick | Length |Width fields.
HTH