+ Reply to Thread
Results 1 to 5 of 5

Set Default Value of a cell and allow user changes to be made

  1. #1
    Registered User
    Join Date
    01-01-2013
    Location
    Manchester, England
    MS-Off Ver
    Excel 2010 (work) & 2013 (home)
    Posts
    45

    Set Default Value of a cell and allow user changes to be made

    Hi guys,



    I'm trying to set-up a cell that will have a default value based on the contents of another cell, e.g.

    If Cell A1 = "Call 1" Then
    Celll A2 = "3.2"

    If Cell A1 = "Call 2" Then
    Cell A2 = "5.5"

    However I also want Cell A2 to be able to have user input so that the figure can be changed if necessary - and then when the user selects the relevant Option in Cell A1 again, Cell A2 resets back to the relevant default value.

    Hope somebody can help
    Elliot
    The geek shall inherit the earth

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Set Default Value of a cell and allow user changes to be made

    • Right-click on the sheet tab
    • Select View Code from the pop-up context menu
    • Paste the code below in the VBA edit window.

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    01-01-2013
    Location
    Manchester, England
    MS-Off Ver
    Excel 2010 (work) & 2013 (home)
    Posts
    45

    Re: Set Default Value of a cell and allow user changes to be made

    Doesn't work, This is what I've used:

    Please Login or Register  to view this content.

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Set Default Value of a cell and allow user changes to be made

    Quote Originally Posted by elliotencore View Post
    Doesn't work, This is what I've used:

    Please Login or Register  to view this content.
    Can't change the name of an event macro. The macro has to be called exactly this...
    Private Sub Worksheet_Change(ByVal Target As Range)
    ...and it has to be located in the worksheet's code module.

  5. #5
    Registered User
    Join Date
    01-01-2013
    Location
    Manchester, England
    MS-Off Ver
    Excel 2010 (work) & 2013 (home)
    Posts
    45

    Re: Set Default Value of a cell and allow user changes to be made

    Thanks so much working now!

+ 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