[SOLVED] formula "=SQRT(Width)" returns error #DIM!

Started by nashwaan, October 01, 2011, 01:48:41 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

nashwaan

Hello,

Why SQRT() ShapeSheet function with dimensioned value causes error?
For example, this formula "=SQRT(9)" is valid and returns 3
but this formula "=SQRT(9 in)" is not valid and returns error #DIM!   Why is this?

I need this in order to get square root of shape's width, i.e
User.Temp = "=SQRT(Width)"    << but it is not working

any idea how to solve this?
and one more thing, what does #DIM! mean?

Thanks,
Yousuf.
Give me six hours to chop down a tree and I will spend the first four sharpening the axe — Abraham Lincoln

JuneTheSecond

#1
"=SQRT(9 in/1 in)" or "=SQRT(9 in*1 in)"
I've also been wasting much time how to treat units in Visio.
Best Regards,

Junichi Yoda
http://june.minibird.jp/

nashwaan

Thanks JuneTheSecond,

This solved my issue and this is not easy to figure out. I thought that i would need to use ShapeSheet function like VALUE() or QUNATITY() but no such function exists.

Although dividing by 1 in resolves this issue, it does not look to me a generic method. For example what if the Width is expressed in cm or ft? What should be written in order to get just the value of width without its unit, so it can be used in functions like SQRT()?

Thanks,
Yousuf.
Give me six hours to chop down a tree and I will spend the first four sharpening the axe — Abraham Lincoln

JuneTheSecond

=SQRT(Width/ThePage!PageScale) ?
if your drawing is not scaled.
Best Regards,

Junichi Yoda
http://june.minibird.jp/

nashwaan

Yes, this solves it.
Thanks JuneTheSecond. You are star!  8)

Yousuf.
Give me six hours to chop down a tree and I will spend the first four sharpening the axe — Abraham Lincoln

Visio Guy

For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010