+ Reply to Thread
Results 1 to 7 of 7

Automatically Add a Number to Cell Entry

Hybrid View

  1. #1
    Registered User
    Join Date
    06-29-2008
    Location
    Perth, Australia
    MS-Off Ver
    MS Office 2003
    Posts
    87

    Automatically Add a Number to Cell Entry

    What do I do to add 0.00001 automatically to whatever I enter into a cell. So, if I enter the number 5 into a cell, it should automatically come up as 5.00001.

    Is it dependant on cell formatting, or do I use a macro? I would like to avoid macro if possible.

    Thanks in advance for any help.

  2. #2
    Forum Contributor gilbert's Avatar
    Join Date
    01-08-2004
    Location
    Asia
    MS-Off Ver
    2007
    Posts
    117

    Re: Automatically Add a Number to Cell Entry

    The easiest way to do this is maintain 2 cells, the first being key in cell and the second one being the results

    eg. In Cell A1 - key in cell (here u will punch in 5); whereas in Cell B1, you preset the formula to =A1+0.00001

    Maybe there is a better way of doing it.... but this is the simplest way to do it.
    Thank you in advance,
    Gilbert

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Automatically Add a Number to Cell Entry

    This all rather depends on whether or not

    a) the underlying value needs to be adjusted for arithmetic or aesthetic purposes

    b) whether the value(s) being entered are always whole numbers

    If the adjustment is not purely for sake of aesthetics then you will need to use VBA if you wish to alter the underlying value of the entry cell itself.

  4. #4
    Registered User
    Join Date
    06-29-2008
    Location
    Perth, Australia
    MS-Off Ver
    MS Office 2003
    Posts
    87

    Re: Automatically Add a Number to Cell Entry

    Thanks Guys,

    But this is not waht I had in mind.

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Automatically Add a Number to Cell Entry

    Quote Originally Posted by Bazzaboy
    this is not waht I had in mind
    I don't recall actually suggesting anything ...

    I was asking you detail your requirements more fully - the why's etc... as is it is all a little vague I'm afraid.

    As previously stated - if your intention is to affect the physical value in the entry cell then you must use VBA.

  6. #6
    Registered User
    Join Date
    06-29-2008
    Location
    Perth, Australia
    MS-Off Ver
    MS Office 2003
    Posts
    87

    Re: Automatically Add a Number to Cell Entry

    Yes, I do wish to affect the physical value in the cell. So, if I enter 0 in the cell it must behave as if I have entered 0.00001 in the cell. All this, because I am having problems with dividing some cell values by 0.

    If VBA is the only way to go, could you please suggest a code? The thing is I have too much going on by the way of VBA in that sheet and don't want to keep increasing the number of code modules.

    Would you, like me to start a fresh topic in the VBA section of this forum?

    Thanks.

  7. #7
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Automatically Add a Number to Cell Entry

    Quote Originally Posted by BazzaBoy View Post
    Yes, I do wish to affect the physical value in the cell. So, if I enter 0 in the cell it must behave as if I have entered 0.00001 in the cell. All this, because I am having problems with dividing some cell values by 0.
    Before getting into the VBA perhaps best to elaborate regards the above ?

    If you're looking to avoid #DIV/0! issues elsewhere (ie these are divisor precedents) then validate the value prior to conducting the division, eg:

    =IF(SUM(A1),B1/A1,0)

    where A1 is the entry cell and B1 stores some other numeric value ... if A1 is 0 the result will be 0 rather than #DIV/0!
    (you can adjust the logic as desired)

+ 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