Put the following function in a standard module...
Public Function SquareArea#(RangeRef As Range)
Dim vAreaSize
If InStr(LCase$(RangeRef.Value), "x") 0 Then
vAreaSize = Split(LCase$(RangeRef.Value), "x")
SquareArea = vAreaSize(0) * vAreaSize(1)
End If
End Function
...and use it as follows from any cell...
A1: 8x8x7
B1: =squarearea(a1)
Result: 64
...where you determine the scale (inches/feet, mm/cm/meters) by way of
header labels. That way your naming does not need to be customized
further unless you want it that way.
--
Garry
Free usenet access at
http://www.eternal-september.org
Classic
VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.
vb.general.discussion