• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Data Validation and Charts

rubyeskimo

New Member
I have 4 areas of information to display across 3 different types of chart. Someone suggested using data validation and lookup to change the data displayed in the charts according to user preference. Is this possible and how do I do this?
 
Hi rubyeskimo,


Please consider uploading your workbook (with sample data). This would besically help us to provide you an exact solution to your problem.


http://chandoo.org/forums/topic/posting-a-sample-workbook


Meanwhile, please look at the following link. This might even have the exact solution of your problem:

http://chandoo.org/wp/tag/dynamic-charts/


Regards,

Kaushik
 
Hi Kaushik03!


Thanks so much, I am such a newbie at all this!


I've uploaded it to Skydrive, link is here: http://sdrv.ms/PgzcX4


I want the chart to be selective by Group.
 
Hi rubyeskimo,


I am not able to download the file from skydrive. Can you please upload it here?


http://www.hotfile.com/


Kaushik
 
Hi Kaushik,

Please find the attached file here..

https://dl.dropbox.com/u/78831150/Excel/Data%2520Validation1.xlsx


Best of luck..

Regards,

Deb
 
@Deb: Thank you for your help to get me the file (dhonnobad bondhu.....)


Hi rubyeskimo,


Sorry for getting back to you so late....yesterday I hardly got time to work on your problem.....but find this problem a very interesting one....


Can you plz download the file from here and check if I am able to solve your query?


https://hotfile.com/dl/167186491/21909c0/DatValidation_Chart_.xlsm.xlsm.html


Instruction:

1) After opening the file, enable the macro

2) Change the value(groups) from combobox to update the chart


Note:

1)I have arranged your data a bit(at table sheet)

2)In the code (see module 1) I have mentioned comments that will help you to understand the codes easily


Pleas post back in case of any issue..


Regards,

Kaushik
 
kaushik,


Very nicely done. In the VBA code I'd like to suggest you something. You can always get rid of .Select and .Selection. They are a byproduct of macro recorder and you can do without them in 99% cases.


Sample this:

[pre]
Code:
Range("BA2:BD" & (DataLstRow)).Select
Selection.ClearContents[/pre]
is 2 lines of code which can be reduced to 1 line like below:

Range("BA2:BD" & DataLstRow).ClearContents


Advantages are faster code and better readability.
 
Hi shrivallabha,


Thank you very much for such value add and help me learn the better way. Going forward, I will follow this whenever/wherever I will write such code. Thank you once again for sharing your knowledge.


Regards,

Kaushik
 
Back
Top