Thanks for trying but still the solution is not useful to me. Let me explain correctly; Auto filter based on condition.
Data is available in range (say A6:I6) and i need filter based on condition .Number of condition may vary from time to time but conditions need to be entered manually as required in condition row provided (A1:. For example, 1 If user enters in condition , 5000 (I2), data range shoud get automatically filter by amount >=5000. 2. If user put party Name "ada", data range should automatically filter by party name "*ada*" 3. If user puts two condition in condition row say name = ada & amount = 5000,, data range needs to be filtered for party with name consisting ada and amount >=5000 (both condition (from Left to right)). I am doing it manually now and believe that there must be some way to automate it through macro. Thanks in advance. On Thu, Apr 11, 2013 at 10:37 AM, Mukul Garg <mukul.garg2...@gmail.com>wrote: > Hi Mr. Kumar, > > Please find below code , hope it will be help to resolve your issue. > > Sub Auto_filter() > Dim sh As Worksheet > Dim customer As String > Dim invd As Date > Dim po As String > Dim amt As Long > Dim gmt As String > Set sh = ThisWorkbook.Sheets("Sheet1") > Application.ScreenUpdating = False > > customer = sh.Range("B2").Value > invd = sh.Range("C2").Value > po = sh.Range("F2").Value > amt = sh.Range("J2").Value > gmt = sh.Range("I2").Value > sh.Range("A5").AutoFilter Field:=Array(2, 3, 6, 9), Criteria1:=Array("*" & > customer & "*", invd, po, gmt & amt) > sh.Rows("6:6").Select > Selection.Copy > sh.Range("A14").PasteSpecial xlPasteAll > sh.Range("A5").AutoFilter > sh.Range("A1").Select > End Sub > > > On Wednesday, April 10, 2013 1:58:11 PM UTC+5:30, kumar wrote: >> >> Hi, >> >> >> I need to filter a long list in excel based on criteria (Cell Values). I >> can do it manually by selecting filter and then selecting manually each >> criteria like Name = Adag, Amount > 5000 and so on . >> >> >> Is there any way where the list get auto filtered based on criteria >> mentioned at the top of the list or something alike. >> >> >> Attached sample workbook with Sample Data, output expected. >> >> >> Thanks for understanding. >> >> C.G.Kumar >> > -- > Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s > =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ > https://www.facebook.com/discussexcel > > FORUM RULES > > 1) Use concise, accurate thread titles. Poor thread titles, like Please > Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice > will not get quick attention or may not be answered. > 2) Don't post a question in the thread of another member. > 3) Don't post questions regarding breaking or bypassing any security > measure. > 4) Acknowledge the responses you receive, good or bad. > 5) Jobs posting is not allowed. > 6) Sharing copyrighted material and their links is not allowed. > > NOTE : Don't ever post confidential data in a workbook. Forum owners and > members are not responsible for any loss. > --- > You received this message because you are subscribed to the Google Groups > "MS EXCEL AND VBA MACROS" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to excel-macros+unsubscr...@googlegroups.com. > To post to this group, send email to excel-macros@googlegroups.com. > Visit this group at http://groups.google.com/group/excel-macros?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Jobs posting is not allowed. 6) Sharing copyrighted material and their links is not allowed. NOTE : Don't ever post confidential data in a workbook. Forum owners and members are not responsible for any loss. --- You received this message because you are subscribed to the Google Groups "MS EXCEL AND VBA MACROS" group. To unsubscribe from this group and stop receiving emails from it, send an email to excel-macros+unsubscr...@googlegroups.com. To post to this group, send email to excel-macros@googlegroups.com. Visit this group at http://groups.google.com/group/excel-macros?hl=en. For more options, visit https://groups.google.com/groups/opt_out.