+ Reply to Thread
Results 1 to 6 of 6

Data Validation - Custom Formula

  1. #1
    Registered User
    Join Date
    09-22-2008
    Location
    markham
    Posts
    52

    Data Validation - Custom Formula

    Hello,

    I would like to use this formula: =round(A1/0.05,0)*0.05 (to round a percentage up or down to the nearest 5%) and be able to use only 1 column - ie. the user will input the percentage into column A and the number will be rounded in column A.

    I think this requires using data validation, custom formula, but am not sure as I cannot get it to work.

    I know I can put the =round formula in column B and the user inputs the data in column A, but I'd like the input and calculation to occur in the same column.

    Any suggestions?

    Thank you.

    Brandy

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,375

    Re: Data Validation - Custom Formula

    Hi,

    by definition, Excel cells are either for data input, or for calculations. If you want the value of a cell to change within the same cell, you will need to use a VBA solution.

    Data validation does not do what you need, since it only checks if the user entered a value that meets a certain condition, but data validation does not manipulate the data.

    hth

  3. #3
    Registered User
    Join Date
    09-22-2008
    Location
    markham
    Posts
    52

    Re: Data Validation - Custom Formula

    Thank you.

    I don't know how to use visual basic.

    Is there an easy way to use VBA for that purpose?

    Brandy

  4. #4
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097

    Re: Data Validation - Custom Formula

    Hi,

    how about a custom format #0.05
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  5. #5
    Registered User
    Join Date
    09-22-2008
    Location
    markham
    Posts
    52

    Re: Data Validation - Custom Formula

    So, in the Formula field, type #0.05?

    When I do, I get an error message, 'The value entered is not valid'.

  6. #6
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097

    Re: Data Validation - Custom Formula

    Hi,

    No I was thinking that may be custom the cell A1, right click, Format cells > Custom, but having looked at it again thats probably what you don't want?

+ 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