Home > front end >  How to calculate Dimensions from a Text String in a single cell?
How to calculate Dimensions from a Text String in a single cell?

Time:10-09

I am need to calculate the dimensions from cell values that are entered as strings into a single cell vs. 3 separate cells and I do not want to break the dimensions into Length (L) x Width (W) x Height (H) Columns.. instead I am hoping there is a relatively simple function that would allow me to calculate the total cubic dimensions from that single cell.

I am aware of enter image description here

Looking for a simple way to do this calculation in a single column and being able to have to enter the data once or utilize the existing data. I don't mind doing a single bulk replace of "x" to "*" on the input column to standardize the source column but don't want to have to do a series of bulk replaces every time I want to run through the data.

Thoughts?

CodePudding user response:

Use SUBSTITUTE to get them all to the same, then use SPLIT and wrap in PRODUCT:

=PRODUCT(SPLIT(SUBSTITUTE(A2,"*","x"),"x"))

enter image description here

Or shorter Version shown by @JvdV:

=PRODUCT(SPLIT(A2,"*x"))
  • Related