• 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.

Searching text in category name axis

VVale

New Member
Hello,


I have a bar chart with 400 (and even more) categories. Is it possible to look for a specific category name? I'd like a sort of 'find' function that searches through the categories names of the vertical axis and finds the category name you have typed.


According to your knowledge, is this possible?


Thank you!
 
Hi ,


I think it should be possible. The following statement can be executed in the Immediate Window :


Let x = Activechart.Axes(xlcategory).CategoryNames


What this will do is populate an array x with all the category names.


You can loop through this array to find out any particular name.


Do you want the complete procedure ?


Narayan
 
Hi Narayan,


is it easy for you to write the complete procedure? Or just giving hints on how to structure it?


Thanks a lot!


Vale
 
Hi Narayan,


I think I haven't write my question clearly so I'll try to explain it better. I'd like to run a sort of 'find' to search for a specific category name when you look at a chart.


Imagine that you have a very long bar chart, with hundreds of category names, and you look for a specific category name. Category names cannot be put in alphabetical order.


How can you let an user to look for an entry and locate it in the chart?


Thanks


vale
 
Hi Vale ,


Can you check out this file ?


http://speedy.sh/Cvu4b/Vale-Category-Search.xlsm


Please note that the macro is meant for charts which are embedded in a worksheet ; if your chart is on a separate sheet which is not a worksheet , then a few changes will have to be made in the macro. Please let me know.


Narayan
 
Hello Narayan,


sorry for my late reply. Please accept my apologies. I was not in a position to respond to your post.


Thank you very much for your help! It is helping me a lot! I am trying to do add a sort of FindNext feature to the macro you built becauses an item you are looking for can be present more than once in the category axis.


Thanks again


Vale
 
Back
Top