Yes, you can program the Autofilter.
Have a look in the newsgroups here, that kind of question has been answered
a lot of times of before.
You can reference the value of a cell using:
Sheets("nameofthesheet").Range("thecelladdress").Value

Signature
Wigi
http://www.wimgielis.be = Excel/VBA, soccer and music
> Hi to all,
> Is it possible to filtration according to a value that is typed in a certain
[quoted text clipped - 5 lines]
> After that to print the filtered range starting colomn C until colomn L
> after hiding colomns F,G,H,I . Colomn headings are in row 6
Khalil Handal - 28 Dec 2007 23:22 GMT
Can you specify a reference please??
> Yes, you can program the Autofilter.
>
[quoted text clipped - 16 lines]
>> After that to print the filtered range starting colomn C until colomn L
>> after hiding colomns F,G,H,I . Colomn headings are in row 6
Dave Peterson - 28 Dec 2007 23:47 GMT
Try recording a macro when you filter by any value--say ASDF.
Then change that ASDF to the cell that contains your string.
Selection.AutoFilter Field:=1, Criteria1:="=asdf", Operator:=xlAnd
becomes
Selection.AutoFilter Field:=1, _
Criteria1:=worksheets("Sheet9999").range("a1").value
I'd use:
activesheet.autofilter.range.AutoFilter Field:=1, _
Criteria1:=worksheets("Sheet9999").range("a1").value
> Can you specify a reference please??
>
[quoted text clipped - 22 lines]
> >> After that to print the filtered range starting colomn C until colomn L
> >> after hiding colomns F,G,H,I . Colomn headings are in row 6

Signature
Dave Peterson
Khalil Handal - 29 Dec 2007 15:52 GMT
Thanks Dave. It worked fine.
I also find something at Debra's website that also helped .
> Try recording a macro when you filter by any value--say ASDF.
>
[quoted text clipped - 38 lines]
>> >> L
>> >> after hiding colomns F,G,H,I . Colomn headings are in row 6