Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Text Object - adding text and calculations in the same box

Hi, I'm trying to see if anyone has an example of adding a combination of Text and a Calculation in a Text object.

I want to recreate the following:

Calc Text Box.png

So, the calculated elements are:

437h is a calculation from total of hours represented in the chart

28% is the percentage it represents

1,578 pulled from a table and calculated

2,320 pulled from a table and calculated

58 pulled from a table

These are spread within the standard lines of text.

Hope someone likes a challenge!

Any help would be appreciated.

Thanks

Rob

1 Solution

Accepted Solutions
Gysbert_Wassenaar

You can create variables and use them in a textbox. With var1 having a value of 437 and var2 a value of 28 the line

=var1 & 'h or '  & var2 & '%'

will show the text  437h or 28%

What you can't do is use different font sizes in one textbox. But you can use several textboxes one above the other so the line up nicely. You can put you calculations in variables. You can use chr(10) to insert line breaks.

=var1 & 'h or ' & chr(10) & var2 & '%'

will show:

437h or

28%


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar

You can create variables and use them in a textbox. With var1 having a value of 437 and var2 a value of 28 the line

=var1 & 'h or '  & var2 & '%'

will show the text  437h or 28%

What you can't do is use different font sizes in one textbox. But you can use several textboxes one above the other so the line up nicely. You can put you calculations in variables. You can use chr(10) to insert line breaks.

=var1 & 'h or ' & chr(10) & var2 & '%'

will show:

437h or

28%


talk is cheap, supply exceeds demand
Not applicable
Author

Thank you for the very prompt answer - this is a really good community.

Cheers Rob