Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Cam Cam is offline
external usenet poster
 
Posts: 165
Default Filter With VB Code

Hi,

I am attempting to filter a set of data based upon the values in other cells
within the worksheet. I have no VB knowledge so I have recorded a macro and
ammended its VB code :

Columns("A:H").Select
Selection.AutoFilter
Selection.AutoFilter Field:=4, Criteria1:=Range("L8"), Operator:=xlAnd
Selection.AutoFilter Field:=6, Criteria1:=Range("M8"), Operator:=xlAnd

How do I make the 3rd line look for a value above cell the value within cell
"L8" it works fine when looking for values that equal it, but wherever I put
the greater than sign an error message is generated.

Thanks,
Cam.




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Filter With VB Code

Selection.AutoFilter Field:=4, Criteria1:="" & Range("L8").Value,
Operator:=xlAnd

--
Regards,
Tom Ogilvy


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
filter with vb code wtpcomplab Excel Programming 16 March 15th 05 10:15 PM
vba code to filter rbekka33[_3_] Excel Programming 5 September 14th 04 09:22 AM
filter code help scrabtree[_2_] Excel Programming 2 August 1st 04 10:09 PM
Filter Code Ray Kanner[_2_] Excel Programming 4 April 29th 04 02:53 PM
vba filter code Gabriel[_3_] Excel Programming 3 February 22nd 04 06:24 PM


All times are GMT +1. The time now is 11:17 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"