+ Reply to Thread
Results 1 to 4 of 4

Vba to format number of decimal places dependant on number in another cell

  1. #1
    Forum Contributor
    Join Date
    02-08-2006
    Location
    UK
    MS-Off Ver
    2013
    Posts
    204

    Vba to format number of decimal places dependant on number in another cell

    Hello,
    I need VBA code to make the number of decimal places in cell A1 to be one more than that in cell A2 when it has been divided by 1000.

    For example, in cell A2, then number will be 2.4 (0.0024 after being divided)

    Cell A1 would normally 5682.33 but given the above would be 5682.325654.

    Any help much appreciated.

  2. #2
    Registered User
    Join Date
    04-19-2010
    Location
    Ohio, USA
    MS-Off Ver
    Excel 2007
    Posts
    93

    Re: Vba to format number of decimal places dependant on number in another cell

    Will something like this work?
    Please Login or Register  to view this content.
    Last edited by Bmoe; 12-21-2011 at 07:53 AM. Reason: Declare variables

  3. #3
    Forum Contributor
    Join Date
    02-08-2006
    Location
    UK
    MS-Off Ver
    2013
    Posts
    204

    Re: Vba to format number of decimal places dependant on number in another cell

    That's worked a treat, thanks. Sorry for the late reply.

  4. #4
    Registered User
    Join Date
    04-19-2010
    Location
    Ohio, USA
    MS-Off Ver
    Excel 2007
    Posts
    93

    Re: Vba to format number of decimal places dependant on number in another cell

    Good deal!

+ 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