Results 1 to 6 of 6

Function does not round!

Threaded View

  1. #1
    Registered User
    Join Date
    03-20-2014
    Location
    canada
    MS-Off Ver
    Excel 2013
    Posts
    8

    Function does not round!

    Hi everyone,

    I am running into an issue I can't solve right now. I've done a complex VBA add-in for my office which around 30 people uses. It always ran smooth until I made an update to one section of code.

    The code is calculating areas for metal steel deck with given values and needs to round distances according to the sheet's dimensions.

    It is working good on my computer and with a sample test I get a rounded value for the width (lets say 30), but on someone's pc, the round function is not applied and he gets like 27.143214.

    How is it possible?

    I tried the round.up and ceiling function.

    His computer and Excel settings are exactly like mine.

    I also tried it on his coworker's pc and it worked!

    I just don't understand how a line of code can't work on one particular computer -__-'

    Select Case Deck.sSpanD
            Case "HORIZONTAL"
                dOverlap = (Application.WorksheetFunction.RoundUp((dTotalWidth / Deck.dSheetLength), 0) - 1) * (Deck.iSideLap / 12)
                dTotalWidth = dTotalWidth + dOverlap
                dTotalHeight = Application.WorksheetFunction.RoundUp((dTotalHeight / ((Deck.dSheetWidth / 12) - iPrecision)), 0) * (Deck.dSheetWidth / 12)
            Case "VERTICAL"
                dOverlap = (Application.WorksheetFunction.RoundUp((dTotalHeight / Deck.dSheetLength), 0) - 1) * (Deck.iSideLap / 12)
                dTotalHeight = dTotalHeight + dOverlap
                dTotalWidth = Application.WorksheetFunction.RoundUp((dTotalWidth / ((Deck.dSheetWidth / 12) - iPrecision)), 0) * (Deck.dSheetWidth / 12)
        End Select
    Last edited by tnt59; 10-07-2015 at 03:46 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Help with ROUND function
    By onp in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-28-2014, 06:20 AM
  2. [SOLVED] If Statement with a Divisible-By function and Round Function
    By thanhie in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-06-2013, 01:00 AM
  3. [SOLVED] Conditional Round up or Round up Function
    By cdmterence in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 09-18-2013, 06:03 PM
  4. Problem Inserting Round function into an IF function
    By Ash87 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-11-2013, 05:37 PM
  5. [SOLVED] ROUND function help
    By jcmurtha in forum Excel General
    Replies: 3
    Last Post: 05-08-2011, 02:26 PM
  6. [SOLVED] VB Function Round vs Excel function Round not behaving the same Od
    By Bud in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-18-2006, 12:45 AM
  7. [SOLVED] The ROUND function
    By Louise in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1