Jump to content
Martijn Wingelaar

Worksheet formula help needed

Recommended Posts

Hello Users.

I've got a worksheet formula translation problem.

I got this code from my excel file.

But that doesn't work with my worksheet.

Does anyone has a solution?

 

=ROUNDDOWN((E6-SUM($H$9:H9))/D10;0)

I added my xls file as well for reference how the code should work.

 

Greetings M Wingelaar.

Worksheet code question.xls

Share this post


Link to post

Truncate should work instead of rounddown. Truncate drops the decimal component, which has the same effect. (I can’t recall if the function is TRUNC or TRUNCATE). 
 

I also don’t think VW can use the “$” qualifier

Share this post


Link to post

Vectorworks worksheets do accept $A$1 format to provide an absolute cell reference rather than a relative cell reference.

 

Rounddown is a worksheet function in VW2021. Truncate or Trunc are not.

Share this post


Link to post

@Martijn Wingelaar ,

   The Rounddown() worksheet function exists from VW 2018 to the present.


   In your example code you are using a semi-colon between the first and second arguments, instead of a comma. This may be causing your error if you entered it into VW that way.

 

   Caveat: there appears to be a difference in the way Rounddown() works between Excel and VW.  In VW, Rounddown(NUM, 0) rounds numbers to the more negative integer if there is a non-zero fractional part. In Excel Rounddown() rounds toward zero. The difference in Excel between Rounddown() and Round() is that Rounddown() allows you to specify the number of decimal digits to keep where Round() does not.

 

   If you want the Excel functionality of Rounddown(NUM, 0) you can simply use the Round(NUM) function in VW. It always truncates the number to the closest integer toward ZERO. 


   However, if you want a true Rounddown() function in a version of VW older than VW 2018, then you can use a modification of this formula:

      =IF(NUM-INT(NUM)<0, INT(NUM)-1, INT(NUM))     # rounds numbers with fractions to the nearest integer that is more negative than the number.

 

   if you are wanting to specify decimal accuracy greater than "0" digits, the formula will become a bit more complicated. I'll leave it to minds more curious than mine to try their hand at it. 

 

HTH,

Raymond

 

PS - If you would kindly include your version of VW, and your platform / OS combination in your forum signature, it will help forum members answer your questions more accurately and often faster. Thank you.

  • Like 1

Share this post


Link to post

Martjin,

   You're welcome. Out of curiosity, what version of VW are you using?

 

Raymond

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×
×
  • Create New...