+ Reply to Thread
Results 1 to 5 of 5

VBA function to STOP rounding numbers

  1. #1
    Registered User
    Join Date
    04-20-2008
    Location
    New York City
    MS-Off Ver
    2003
    Posts
    38

    VBA function to STOP rounding numbers

    I have this function in my worksheet to change cell colors and fonts depending on the input. Its works great however, the workbook rounds up a fraction. For example if the user inputs 1.5 then the workbook will change it to 2. I would like NOT to round up.

    I do not want to go to Format Cells because I already have a custom formula in there. Can I do this within this function code? Thanks in advance

    Please Login or Register  to view this content.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: VBA function to STOP rounding numbers

    Just change the cell formatting to General; it won't affect the formula.

    That's a lot of processing to do each time the selection changes.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    04-20-2008
    Location
    New York City
    MS-Off Ver
    2003
    Posts
    38

    Re: VBA function to STOP rounding numbers

    I want to avoid that because I alread have

    [Red][>=8]#;[Blue][>0]#;General
    Last edited by shg; 04-12-2010 at 02:00 PM. Reason: deleted spurious quote

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: VBA function to STOP rounding numbers

    Try [Red][>=8]General;[Blue][>0]General;General

  5. #5
    Registered User
    Join Date
    04-20-2008
    Location
    New York City
    MS-Off Ver
    2003
    Posts
    38

    Re: VBA function to STOP rounding numbers

    That worked. Thanks a lot.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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