Closed Thread
Results 1 to 5 of 5

Default cell value before user input

  1. #1
    Registered User
    Join Date
    06-03-2011
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2007
    Posts
    20

    Default cell value before user input

    Hello everyone. I have what I thought would be a simple task but I have not been able to find an answer anywhere. I need a cell to display a default value (something like "Input Here") which a user can overwrite with a value. When the value is erased, the cell should return to the default. Preferably, it'd be great if the cell reset to the default value whenever the workbook is opened as well (i.e. won't save the user's input value).

    Any help is appreciated.

    Thanks,
    AJ

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,810

    Re: Default cell value before user input

    This is a challenge because a cell can really only contain one piece of information. You are asking it to hold two.

    The way I would set something like this up is to use three cells (considering there are millions of cells available, using two more cells should not be a problem). For example:

    A1 contains "default" value
    B1 contains "manual override" value where the user can input a value.
    C1 contains a simple IF() function like =IF(ISBLANK(B1),A1,B1). Now, C1 will contain the default value from A1 until the user enters something in B1. Then the value in B1 carries over to C1. When the user clears B1, C1 reverts back to the default value in A1.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Valued Forum Contributor
    Join Date
    10-26-2008
    Location
    Birmingham, UK
    MS-Off Ver
    All versions up to 2010
    Posts
    1,025

    Re: Default cell value before user input

    Hi
    Please see solution attached.
    There is code behind the worksheet tab that inserts "Input here" as soon as a cell is cleared by the user. There is also a piece of code behind the "This Workbook" object that automatically clears previous values input by the previous user.
    Hope this helps.
    Good luck.
    Tony
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    01-16-2020
    Location
    Elizabethtown, KY
    MS-Off Ver
    2019
    Posts
    1

    Re: Default cell value before user input

    I downloaded the file and see that for any active cell the constant is Input Here. How do I create code for multiple cells with different constants?

  5. #5
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,444

    Re: Default cell value before user input

    Administrative Note:

    Welcome to the forum.

    We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.

    Please see Forum Rule #4 about hijacking and start a new thread for your query.

    If you are not familiar with how to start a new thread see the FAQ: How to start a new thread

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Set Default Value of a cell and allow user changes to be made
    By elliotencore in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-20-2013, 04:35 AM
  2. How to add the value of User Input to value of in A Cell???
    By nlsnrn in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-06-2012, 10:22 AM
  3. Cell input entry default
    By trigger_y2000 in forum Excel General
    Replies: 0
    Last Post: 01-28-2012, 11:24 AM
  4. is userform textbox input by user default TEXT?
    By JohnSeito in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-01-2009, 07:46 AM
  5. Have user input converted to uppercase in same cell as input?
    By Shannonn in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 06-19-2006, 10:25 PM

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