Visio Guy

Visio Discussions => ShapeSheet & Smart Shapes => Topic started by: SB.visguy on April 13, 2019, 10:09:18 AM

Title: Let the box height be 0 if it does not have any text
Post by: SB.visguy on April 13, 2019, 10:09:18 AM
Hello everyone,

I'm doing a table in Visio in such a way that if there is no text entered in the cell of a table, the box will disappear, so its height will be 0. But non of the if functions are working

I have tried entering the following functions in the shapesheet height, but none is working.
=if(len(thetext)=0,0,5mm). So that if there is no text, the height will be 0, else, its 5mm. But its not working

I have also tried
=if(thetext="",0,5mm) but it is not working too.

If anyone has a different approach or a fix for the functions that I have entered, thank you!
Title: Re: Let the box height be 0 if it does not have any text
Post by: Paul Herber on April 13, 2019, 10:32:02 AM
Try:
IF(TEXTWIDTH(TheText)<3mm, 0mm, 5mm)

The size of the text includes the size of the text box margins.
Title: Re: Let the box height be 0 if it does not have any text
Post by: SB.visguy on April 13, 2019, 11:25:13 AM
Thank you! it worked!
Title: Re: Let the box height be 0 if it does not have any text
Post by: Paul Herber on April 13, 2019, 11:28:04 AM
It might not be the best solution ...