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

Show only surnames according letter of the commanbutton

Visor

Member
Greetings forum friends, I have tried to do, unsuccessfully, so that by clicking on a button with a certain letter, show me the list of last names that begin with that letter, if I click another button, show me the group of surnames with this new letter of another button

As I can accomplish this?
upload a file to test

I appreciate early collaborations
 

Attachments

  • Filtrar segun letra del alfabeto Segun boton.xlsm
    29.1 KB · Views: 2
Great, fantastic!!!..
You use a short code to achieve great things
Preguntabe me, and if I add a command button to display everything again?
I add the macro that you have sent me?
I am very grateful for your help

upload_2016-5-18_9-39-43.png
 
Listo !!!
I have doing this for commandbutton All
Code:
Sub ShowAll()
' Muestra todo, saved with macro
    ActiveSheet.Range("$A$7:$B$112").AutoFilter Field:=2
End Sub

The $B$112 I thing must be the last row
 
Since the autofilter is just on the sheet, you can make the ShowAll more generic by doing
Code:
Sub ShowAll()
ActiveSheet.AutoFilter.ShowAllData
End Sub

Glad you liked it! :cool:
 
Back
Top