try this macro: Sub NewFilter() On Error Resume Next ActiveSheet.ShowAllData Selection.AutoFilter field:=14, Criteria1:=ActiveCell.Value On Error GoTo 0 End Sub
however, if you want the COLUMN of the selected cell filtered, then you can use: Sub NewFilterRecord() On Error Resume Next ActiveSheet.ShowAllData Selection.AutoFilter Field:=ActiveCell.Column, _ Criteria1:=ActiveCell.Value On Error GoTo 0 End Sub ________________________________ From: big smile <bigsmile...@gmail.com> To: EXCEL MACRO GROUP <excel-macros@googlegroups.com> Sent: Thu, June 10, 2010 7:30:38 AM Subject: $$Excel-Macros$$ MACRO WHICH CAN FILTER THE CURRENT CELL Hellow Gorup Masters, I want the help to write the macro as follows. Sub Macro2() ' ' Macro2 Macro ' FILTER LIKE THIS ' ' Keyboard Shortcut: Ctrl+Shift+F ' ActiveSheet.Range("$A$3:$IX$681").AutoFilter Field:=1, Criteria1:= _ "CURRENT CELL CONTENT " End Sub when ever i select the particular cell & then press CT+ SFt+ F then what is the data in the current cell from that data the it filters . the longest way is --- 1] select the cell 2] Use window key or mouse right key - then filter -- select filter by select cell value. I want that to be in the macro I have try - but it does not run properly. one more thing is that i have seen many times in our excel tips that they show the the screen photo -- if i have click right mouse - then again filter option -- what is there on the screen - i want to send the same photo on the email to understand better -- how this can be done ? Thanks Savla Have a nice time. -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> HELP US GROW !! We reach over 7000 subscribers worldwide and receive many nice notes about the learning and support from the group.Let friends and co-workers know they can subscribe to group at http://groups.google.com/group/excel-macros/subscribe -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> HELP US GROW !! We reach over 7000 subscribers worldwide and receive many nice notes about the learning and support from the group.Let friends and co-workers know they can subscribe to group at http://groups.google.com/group/excel-macros/subscribe