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

how to do the same in another workbook? file attached

nicholes

New Member
It actually filter using a text box appearing after clicking on the button instead of dropdown box (inbuilt filter) and check box for filtering the data,

I have two files one is working and another one is in which i want to do the same.

i filter the data using some vba code(someone did it for me)


now i want to do the same in another workbook but i am not able to do that,please tell me how do i do the same in other files?

PLEASE NOTE > IN WORKING BOOK THE BUTTON IS IN "CR" WORKSHEET
 

Attachments

  • not working.xlsm
    20.1 KB · Views: 0
  • working book.xlsm
    242.4 KB · Views: 0
Last edited:
Right-click on the button in the "not working" file, assign macro, and select the CustomFilter macro. This would be the regular one, not the one stored in the sheet module. You can delete the code that is in the Sheet1 code module.
 
Right-click on the button in the "not working" file, assign macro, and select the CustomFilter macro. This would be the regular one, not the one stored in the sheet module. You can delete the code that is in the Sheet1 code module.
WOOOOOOOOOOOWWWWWWW thats working now Thanks a million
 
That works now
Thankyou very much

can you tell me how do i make one button to check all boxes in filter (for A colomn )
 
Like, clear the filter?

Add this macro to a code module (not a sheet module)
Code:
Sub ShowAllRecords()
  If ActiveSheet.FilterMode Then
    ActiveSheet.ShowAllData
  End If
End Sub

Then, insert a new button or shape, right-click, assign the macro.
 
Like, clear the filter?

Add this macro to a code module (not a sheet module)
Code:
Sub ShowAllRecords()
  If ActiveSheet.FilterMode Then
    ActiveSheet.ShowAllData
  End If
End Sub

Then, insert a new button or shape, right-click, assign the macro.

Thanks. that works like i want...

you really deserve "like" for each of post or comments and help

Thanks again.
CHEERS......
 
Like, clear the filter?

Add this macro to a code module (not a sheet module)
Code:
Sub ShowAllRecords()
  If ActiveSheet.FilterMode Then
    ActiveSheet.ShowAllData
  End If
End Sub

Then, insert a new button or shape, right-click, assign the macro.

I know i am asking tooo much ...


please tell me how do i filter specific name with one click ?

for example i want to filter "Mr.x" with one click

Or how d i make a button to filter a specific name?
 
Several ways you could do it. Fastest is to just let the user use the native AutoFilter. But, if we go a macro, could use something like this:
Code:
Sub SingleClick()
Dim myWord As String

'What word are we filtering for?
'Method 1: hardcode the value
myWord = "Mr. X"

'Method 2:
'Or, we can ask the user
myWord = InputBox("What do you want to filter for?", "Filter word")

'Apply filter
ActiveSheet.AutoFilter.Range.AutoFilter Field:=1, Criteria1:=myWord

End Sub

Note that you would choose one of the 2 methods. Delete whichever one you don't want. Once you have the macro in place, create a button of some kind, and assign the macro to it.
 
Back
Top