+ Reply to Thread
Results 1 to 4 of 4

Data Validation with default option

  1. #1
    Registered User
    Join Date
    10-08-2010
    Location
    North Yorkshire, England
    MS-Off Ver
    Excel 2003
    Posts
    69

    Data Validation with default option

    I would like to have a cell show a default value when text is entered into another cell on the same row with the user having the option to overwrite the default text with a choice from a data validation drop down list.
    Currently I have the following code in C15:

    =IF(A15<>"","No particular customer","")

    In C15 I have the data validation option. The problem occurs when a value is selected from the list therefore erasing the formula. This means that if I want to use the file for another user or period then the formula has to be recreated.

    Thank you

  2. #2
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Data Validation with default option

    Cells can only contain a formula OR a static text/numeric value. Unfortunately you cannot have it both ways. Data Validation presents a static value from a selection list (or limits input some other way).

    You could use a bit of VBA that presents the user with the option of selecting from a drop down and, based on response, either inserts the formula or allows the selection. However, VBA is not a full-proof solution.
    Last edited by Palmetto; 07-08-2011 at 07:25 AM.
    Palmetto

    Do you know . . . ?

    You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.

  3. #3
    Registered User
    Join Date
    10-08-2010
    Location
    North Yorkshire, England
    MS-Off Ver
    Excel 2003
    Posts
    69

    Re: Data Validation with default option

    Thank you for your response. I'll go for a simple Data Validation list with "no particular customer" being the first choice.

  4. #4
    Registered User
    Join Date
    03-27-2014
    Location
    Glasgow, Scotland
    MS-Off Ver
    Excel 2011 (Mac)
    Posts
    1

    Re: Data Validation with default option

    Just figured out a workaround to this annoying limitation. You could create a very thin column just to the left of the column which houses the dropdown list, and in this thin column, enter your default message in the cell to the left of your dropdown cell.

    Due to the way Excel displays text that is larger than the cell that holds it, this text will still be readable 'over' the adjacent cell while the adjacent cell is empty. But as soon as you select one of the options in the dropdown, it will fill that cell with a value, causing the text in the left cell to disappear from view and giving the appearance of a default value functionality.

    If you can't create the thin column to start with, you should still be able to do this if the left or right cell is unused. If the left cell is unused, just add a couple of spaces to the beginning of your text (to shift it to the right). If you can't use the left cell but the cell to the right of the dropdown cell is empty, you can enter the text there, align the text to the right, and add some spaces to the end of the cell (followed ultimately by an actual character eg a dot or comma etc (which is best to change to white font colour (or other colour that matches the cell background) so that it blends into the background, and therefore also rendering it invisible to the eye and completing the illusion of functionality!)

+ 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