View Single Post
  #4   Report Post  
Dave Peterson
 
Posts: n/a
Default

First, is the only portion of the description that has parentheses () the
dimensions?

If yes, then I'd use some helper columns to extract the beginning (open
parenthesis), the middle (the X) and the end (close parenthesis).

Say your data is starts in A2.
In B1, put (
In C1, put X
In D1, put )
In E1, put Length
In F1, Put Width
In G1, Put Area

Then in B2: =SEARCH($B$1,A2,1)
In C2, put: =SEARCH($C$1,A2,B2)
In D2, put: =SEARCH($D$1,A2,C2)
In E2, put: =IF(COUNT(B2:D2)<3,"Error",--MID(A2,B2+1,C2-B2-1))
In F2, put: =IF(COUNT(B2:D2)<3,"Error",--MID(A2,C2+1,D2-C2-1))
In G2, put: =IF(COUNT(E2:F2)<2,"Error",E2*F2)

All this will break if you have multiple ()'s in your string. Like:
LightJet Mural (Blue) - from Provided File (8.5X11) Normal

And will get worse if you have:
LightJet Mural (Blue) - from Provided File (8.5X11) Normal (ASCII)

====
You can hide those helper columns if you want.

andy from maine wrote:

is there anyway to get a computed value for the square inches in the
following cell:

LightJet Mural - from Provided File (8.5X11) Normal

I am trying to compute usage from parts that are named with the dimension
embedded in the description - and the dimensions varies with each
description. the dimension is always embedded as shown (widthxheight). the
text string surrounding the numerical data vaires in length

thanks for your collective wisdom, excel gurus...


--

Dave Peterson