News:

BB code in posts seems to be working again!
I haven't turned on every single tag, so please let me know if there are any that are used/needed but not activated.

Main Menu

Field Formula and space in shape nam

Started by lindir, May 21, 2015, 07:34:02 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

lindir

Hello guys!

I have a text bloc and I insert a field to get a result from data of another shape:

=ROUND(EVALCELL(MyShape!Prop._VisDM_TempsPasse)/EVALCELL(MyShape!Prop._VisDM_TAI),3)*100&"%"


The Problem is that I have a shapeName with Space exemeple( My Shape name has space ) and Evalcell doesn't work when there is space.

Any solution ??

Surrogate

try use syntax Sheet.<ID of your shape> instead My Shape name

JohnGoldsmith

Hi,

Are you sure you're wanting to use EVALCELL in the first place?  Normally you would use this function in conjunction with arguments using the ARG  function.  If you just want the value of another cell wouldn't a direct reference work just as well, or have I missed something (quite possibly)?

The following works ok for me:

'In Sheet.1
User.Sum = EVALCELL(A Shape!User.fxAdd,"A",3,"B",4)

'In shape named 'A Shape'
User.fxAdd = ARG("A")+ARG("B")


I would be tempted to put some of your field formula into a User cell and then reference this in your field.  That way you can check which intermediate parts are working and it might be clearer what the logic is when you come back to it in six months time.

Hope that helps.

Best regards

John
John Goldsmith - Visio MVP
http://visualsignals.typepad.co.uk/

JohnGoldsmith

Actually, I've just realised you're talking about a shape with a preceeding and trailing space character - is that right?

In that case you'll need to surround the name in single quotes.  For example:

User.Sum = EVALCELL(' A Shape '!User.fxAdd,"A",3,"B",4)

I can also reproduce the error when changing the name of the shape and it looks like like EVALCELL is looking at the universal name of the shape rather than the local one.

Do your shape names match in your case or have they got out of sync?

If that's the case you can either:

       
  • change the universal name (Shape.NameU) to match the local one (Shape.Name)
  • just use the universal name in your formula syntax (not great as the Drawing Explorer only shows local names and so will likely lead to confusion later on)
  • use Sheet.ID syntax as per Surrogate's suggestion
Best regards

John
John Goldsmith - Visio MVP
http://visualsignals.typepad.co.uk/

lindir

Thanks you so much your help, I will try your solutions.
Best regards,

Lidnir

Browser ID: smf (possibly_robot)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 249 (show)
Files included: 34 - 1306KB. (show)
Memory used: 1091KB.
Tokens: post-login.
Cache hits: 13: 0.00144s for 26,763 bytes (show)
Cache misses: 2: (show)
Queries used: 16.

[Show Queries]