ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Command Buttons and Auto-Filter (https://www.excelbanter.com/excel-programming/390478-command-buttons-auto-filter.html)

Katie

Command Buttons and Auto-Filter
 
Hey All-

I was trying to alter a command button to auto-filter based on input from
the user in cell C1. (Which is actually a merged cell of four other cells)

The data range is A4:BJ3500 and this is what I'm using but it returns no
results even if I put in a number that I'm certain is in column "A" - field
1.

Any ideas greatly appreciated!

Private Sub CommandButton1_Click()
Range("A4:BJ3500").Select
Selection.AutoFilter Field:=1, Criteria1:="=*" & Range("C1").Value _
& "*"
End Sub




All times are GMT +1. The time now is 02:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com