+ Reply to Thread
Results 1 to 7 of 7

Newbie - Resetting Cell Values (Drop Down List)

  1. #1
    Registered User
    Join Date
    05-10-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    31

    Newbie - Resetting Cell Values (Drop Down List)

    Hi,

    I'm new to Macros/VBA so I'm hoping I can get some specific instructions but if not, the solution will be enough and I'll figure the rest out. I'm using Excel 2010, I'll get to the point!

    I have developed a calculator (attached) to make life easier for my colleagues. It works perfectly fine. But one thing keeps bugging me which I want help with before presenting it to everyone.

    In Cell C3 - You have the option to choose "Daily" or "Weekly" (Drop Down). This selection effects your selection for Cell C6.

    If you choose Daily in Cell C3 then your options for Cell C6 are restricted to select/enter an amount between £0.00 and £6.00.

    If you choose Weekly in Cell C3 then your options for Cell C6 are restricted to select/enter either £0.00 or £12.00.

    This works perfect.

    However, if I select "Weekly" and then select "£12.00", all my results are perfect which is exactly what I want BUT if I then go back up to C3 and change "Weekly" to "Daily", the £12.00 in C6 remains (though the data validation for "Daily" is restricted to £0.00-£6.00) and all the results are consequently wrong until C6 is changed.

    The obvious thing is to delete the £12.00 from Cell C6 or introduce a "clear" button BUT I don't want my colleagues to do this as it leaves the possibility of error and since we are dealing with money, I can't have it.

    So what I would love and what would complete this calculator and deem it ready is if every time Cell C3 is selected (i.e. from the drop down list you choose Weekly or Daily) it as a result resets Cell C6 to £0.00. Does that make sense? I mean I've been working on this for a week so all I'm saying makes sense in my head but when I'm typing this it may not come cross clear.

    If you need me to clarify anything please ask and I would appreciate any help. I have attached my work so far so you can see it and it'll make it easier for you but I don't think I am ever going to solve this without some expert help. Thanks.

    Calculator 23-06-14.xlsx
    Last edited by thussain; 06-23-2014 at 10:59 AM.

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

    Re: Newbie - Resetting Cell Values (Drop Down List)

    Maybe at the top of your macro before you make the selection in C3, add Range("C6").value = 0

  3. #3
    Registered User
    Join Date
    05-10-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: Newbie - Resetting Cell Values (Drop Down List)

    Thanks for your reply John, How do I do that? I'm really sorry but I've never used Macro/VBA so wouldn't know where to start and how it would work

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

    Re: Newbie - Resetting Cell Values (Drop Down List)

    Can you post your code? Or what activates the actions you describe?

  5. #5
    Registered User
    Join Date
    05-10-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: Newbie - Resetting Cell Values (Drop Down List)

    I have attached the work sheet in the first post if that helps?

  6. #6
    Registered User
    Join Date
    05-10-2013
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: Newbie - Resetting Cell Values (Drop Down List)

    I've managed to do it. I entered the following code:

    Please Login or Register  to view this content.

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

    Re: Newbie - Resetting Cell Values (Drop Down List)

    Perfect. That's what I was getting at. Please comply with Forum Rule No. 9 and mark this thread as solved.

+ 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. Revert Cell Values based on drop down list
    By jshore1 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-06-2013, 01:44 AM
  2. Replies: 5
    Last Post: 11-28-2012, 09:58 AM
  3. Drop down list driving values in another cell
    By NinjaBear in forum Excel General
    Replies: 2
    Last Post: 11-16-2011, 12:24 PM
  4. Making cell values correspond with Drop down List values
    By jrcream in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-29-2008, 03:14 AM

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