Main Menu

Auto calculate

Started by Crazy Squirrel, December 21, 2021, 06:25:57 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Crazy Squirrel

This might be simple but it's baffling me.

I have 3 shapes.  I input a number in shape.1 and another number in shape.2.  I would like shape.3 to add them together.

I would like a formula in Shape.3 that basically says "Shape.1+Shape.2".

It can't be that hard can it?

Surrogate

Quote from: Crazy Squirrel on December 21, 2021, 06:25:57 PM
This might be simple but it's baffling me.

I have 3 shapes.  I input a number in shape.1 and another number in shape.2.  I would like shape.3 to add them together.

I would like a formula in Shape.3 that basically says "Shape.1+Shape.2".

It can't be that hard can it?
what you mean as "number in shape": shape text?

Paul Herber

If the number is in the shapes' shapedata then it's easy. If it's just the shape text, not so.

Example attached.
the 3rd shape has a formula summing the data in the two upper shapes.
Electronic and Electrical engineering, business and software stencils for Visio -

https://www.paulherber.co.uk/

Crazy Squirrel

Quote from: Surrogate on December 21, 2021, 06:43:22 PM
Quote from: Crazy Squirrel on December 21, 2021, 06:25:57 PM
This might be simple but it's baffling me.

I have 3 shapes.  I input a number in shape.1 and another number in shape.2.  I would like shape.3 to add them together.

I would like a formula in Shape.3 that basically says "Shape.1+Shape.2".

It can't be that hard can it?
what you mean as "number in shape": shape text?
Yes.  I'd like to add a simple number as shape text.

e.g. Red cars - [2]   Blue cars - [3]   Total cars - [5]

Crazy Squirrel

Quote from: Paul Herber on December 21, 2021, 09:42:52 PM
If the number is in the shapes' shapedata then it's easy. If it's just the shape text, not so.

Example attached.
the 3rd shape has a formula summing the data in the two upper shapes.

Thank you Paul.  Is there a way of doing it without ShapeData?

Surrogate

#5
Quote from: Crazy Squirrel on December 22, 2021, 07:43:15 AM
I'd like to add a simple number as shape text.
You can use SHAPETEXT function with syntax like
SHAPETEXT(Sheet.1!TheText)+SHAPETEXT(Sheet.2!TheText)
PS You need use field in Sheet.3 with this formula !

Crazy Squirrel

Thanks Surrogate.  Any reason why sheet.3 keeps the previous total when the shape text is deleted from Sheet.1 & sheet.2?

Surrogate

Quote from: Crazy Squirrel on December 22, 2021, 11:47:54 AM
Any reason why sheet.3 keeps the previous total when the shape text is deleted from Sheet.1 & sheet.2?
When you deleted Sheet.1 & sheet.2, Visio Application Engine replace formula which i provided to last saved value !