none
How to round the display of a value in a TextBox RRS feed

  • Question

  • Hello,

    I need to display, in a TextBox of a UserForm, the result of a formula which is 326.6666667. I want to display 367.

    I tried Cint(formula)

    I tried Format(formula,"##0")

    I tried Round(Formula,0)

    ... with no avail. All the .666666 are still there.

    Any idea ?

    Thanks for your help

    Thursday, November 3, 2016 4:22 PM

Answers

  • WLID1966,

    It's probably showing the whole value because it's a text string not a number. You could try something like:

    Mid(cstr[your formula], 1, InStr(1, cstr[your formula], ".")-1)

    Just a thought.

    John

    • Marked as answer by WLID1966 Thursday, November 3, 2016 8:32 PM
    Thursday, November 3, 2016 8:21 PM