+ Reply to Thread
Results 1 to 3 of 3

Looking for an easy way to change data on a sheet based on drop-down selection

  1. #1
    Registered User
    Join Date
    02-21-2013
    Location
    Ontario, Canada
    MS-Off Ver
    Office 2010
    Posts
    96

    Looking for an easy way to change data on a sheet based on drop-down selection

    Hi.

    I have a sheet that has some data for charts. I have a validation list to choose the month so that when the user selects a certain month it will change the values for the data in cells R2:Y5. I have the following code as a selectionchange event and it works perfectly if i am changing the data on that sheet and just clicking another cell

    Here is the code:

    Please Login or Register  to view this content.
    Obviously this code is not ideal and i tried to use a combobox in a userform on the sheet the chart is present on to change the month so that they can see the change in data on the chart without having to go to the actual "Data" sheet. The issue is this code will not work because i am using a selectionchange event for the data sheet and if i am not no the data sheet, even though the month changes, the data does not. I tried changing the selectionchange to just a worksheet_change event however it takes too long to calculate the above code and thus my excel freezes every time. The data from the table in my "Data" sheet that is plotting to the chart is also pulling monthly data from a separate "Project Reporting Summary" sheet as seen above. These individual cells are months. Anyone know how to make this code simpler?

    btw, I have only added in April and May (started with this April) so as June, July, August, etc go by, the code is going to get larger and larger because i have to keep adding values for each month.

    Any help is appreciated. :D

  2. #2
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Looking for an easy way to change data on a sheet based on drop-down selection

    it would be nice to have attached your workbooks on your thread. We would need both workbooks to work on them.
    Pierre Leclerc
    _______________________________________________________

    If you like the help you got,
    Click on the STAR "Add reputation" icon at the bottom.

  3. #3
    Registered User
    Join Date
    02-21-2013
    Location
    Ontario, Canada
    MS-Off Ver
    Office 2010
    Posts
    96

    Re: Looking for an easy way to change data on a sheet based on drop-down selection

    I wish i could but this Workbook is extremely private in my company. I ended up shortening the length of the worksheet_selectionchange code and use the following:

    Please Login or Register  to view this content.
    and put this on a userform with an accept button and a combobox

    Please Login or Register  to view this content.
    This works for me. Took out the July, August and September code on the selectionchange cause there were too many characters.

+ 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