+ Reply to Thread
Results 1 to 2 of 2

convert a number into two seperate numbers in two different cells.

  1. #1
    Registered User
    Join Date
    04-30-2007
    Posts
    2

    convert a number into two seperate numbers in two different cells.

    I'm trying to figure out how to program this.

    I have a cell with a number in it. Say 1.3 or 2.25 or 18, etc.

    What I need to do is convert with a macro this cell into two cells. One cell containing everything before the decimal (ie 1, 2, 18) and the other cell to contain the rest (ie .3, .25, 0)

    Is there a function that would help me do this? Thanks for the help!

  2. #2
    Forum Contributor
    Join Date
    01-21-2005
    Location
    Colorado
    MS-Off Ver
    2000,2003,2007
    Posts
    481
    You can simply use a worksheet function.

    If your values are in column A then in another column put

    =INT(A1)

    and

    =A1-INT(A1)

    this can also be done with code if desired but if a worksheet function will provide the functionality you are looking for.

    HTH

+ 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