Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Filtering data based on formula
Hi, I want to filter a table of data to display rows with values between two
numbers but the numbers will change as it is used, so the criteria values have to be in the form of a formula. ie. A1 = Manually inputted data (eg 1) B1 = Manually inputted data (eg 7) A2 = A1 B2 = B1 F7 = "Day" F8-F12 = Data (eg 2, 5, 1, 4, etc) G7, H7 etc more data How do I filter F7:H12 with the criteria that values in column F are =A2 and =<B2? |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Filtering data based on formula
datafilterautofiltercustom
record a macro (and you may want to use "inputbox" instead of cell values Sub Macro6()'recorded ' ' Macro6 Macro ' Macro recorded 4/22/2008 by Donald B. Guillett ' ' Range("F2:H12").Select Selection.AutoFilter Selection.AutoFilter Field:=1, Criteria1:="=2", Operator:=xlAnd, _ Criteria2:="<=5" End Sub better Sub filterbyday() Range("F2:H12").AutoFilter Field:=1, _ Criteria1:="=2", Operator:=xlAnd, Criteria2:="<=5" End Sub best Sub filterbyday() c1 = InputBox("Enter 1st") c2 = InputBox("enter last") Range("F2:H12").AutoFilter Field:=1, _ Criteria1:="" & c1, Operator:=xlAnd, Criteria2:="<" & c2 End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "Krys" wrote in message ... Hi, I want to filter a table of data to display rows with values between two numbers but the numbers will change as it is used, so the criteria values have to be in the form of a formula. ie. A1 = Manually inputted data (eg 1) B1 = Manually inputted data (eg 7) A2 = A1 B2 = B1 F7 = "Day" F8-F12 = Data (eg 2, 5, 1, 4, etc) G7, H7 etc more data How do I filter F7:H12 with the criteria that values in column F are =A2 and =<B2? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
filtering based on a value in a cell | Excel Worksheet Functions | |||
filtering data based on a formula | Excel Discussion (Misc queries) | |||
data filtering based on last two digits of large number | Excel Worksheet Functions | |||
Filtering Data With Formula | Excel Worksheet Functions | |||
Filtering data from one worksheet based on another | Excel Discussion (Misc queries) |