+ Reply to Thread
Results 1 to 3 of 3

Reset Values Based on Dropdown

  1. #1
    Forum Contributor
    Join Date
    06-21-2010
    Location
    -
    MS-Off Ver
    Excel 2010
    Posts
    1,211

    Reset Values Based on Dropdown

    I have a sheet which shows values by month across several years (sample attached). There are two options in cell A2, 'Alive' and 'Dead'.

    I'm trying to find a way, either using a macro or not if it can be done without so that, should the user select 'Dead' from cell A2, that all the values in B2:M2 and O2:Z2 are set to zero. However, I need some way of remembering these values because there may be instances when the user then decides to change Cell A2 back to 'Alive' (and they still need to be able to change the value in any cell at any time) and if they do that, I need the numbers shown in B2:M2 and O2:Z2 to be restored to their last set of values. I assume they somehow need to be stored in an array, but I have no idea how to achieve this in reality.

    It should be noted that the same will apply to every row in the sheet of which there will be around 3,000, so this needs to work on a row by row basis and there will be 4 years worth of data, rather than the two on the attached sample.

    I'd be extremely grateful for any help as how to achieve this. My VBA is very basic, so if it can be achieved without even better, but if it requires VBA then that is not a problem.

    Many thanks
    Attached Files Attached Files
    Last edited by HangMan; 02-11-2014 at 01:19 PM.

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,616

    Re: Reset Values Based on Dropdown

    If there is a lot of data it is probably better idea to have it stored in another sheet (may be hidden one).

    See such procedure (working model - could be made faster, but is it needed?) in your sheet1 code:

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Best Regards,

    Kaper

  3. #3
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Reset Values Based on Dropdown

    Not sure if this helps. Uses Sheet3 as a helper.

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Reset Dependent Dropdown List if Change Occurs
    By zdg8188 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-09-2013, 08:55 AM
  2. Change values in cells based on dropdown selection
    By Gert Van Dessel in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-19-2013, 09:31 AM
  3. SUMing values based on dropdown list in another column
    By IrishGuy007 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-05-2012, 05:45 AM
  4. Macro to reset combo dropdown box
    By sun815613 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-09-2012, 03:51 PM
  5. Reset Dropdown Lists based on Other inputs / cells
    By jonreynolds in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 08-12-2009, 12:20 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