+ Reply to Thread
Results 1 to 4 of 4

Decreasing decimal places for multiple columns.

  1. #1
    Registered User
    Join Date
    07-11-2012
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    69

    Decreasing decimal places for multiple columns.

    Hi there,

    Could someone help me with a macro that would decrease the number of decimal places from 5 to 1, for the range of column O10 (and down) to column U10 (and down)?

    Right now they have values of 2012.4340293 and would like to have it only 2012.4.


    THanks

  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: Decreasing decimal places for multiple columns.

    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    07-11-2012
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    69

    Re: Decreasing decimal places for multiple columns.

    Thanks,

    I've tried changing the code to:

    Range("O10:U & lastrow").NumberFormat = "0.0"

    so that it could change all the decimal places in those 2 columns to 0.0, but i'm getting an error "Method range of object worksheet failed"

    Any help?

  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: Decreasing decimal places for multiple columns.

    Please Login or Register  to view this content.
    or

    Please Login or Register  to view this content.

+ 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