I have this excel problem where I am trying to filter data based on a command button in a userform. what is the vba code i would need to do this. i searched all over and couldn't find anything

so basically I have data in columns a to ad and want to filter based on column b.

so if i have different string entries x,y,z i would have a button for each and would filter for only the selected type

can anyone help me out