Jump to content

Worksheet formula help needed

Recommended Posts

@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. 





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
Link to comment

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.

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.

  • Create New...