Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Trouble with Advanced Filter

Hello-

I have a snippet of VBA code to perform an advanced filter that has
been working like a charm for several years on a defined set of data.

I have just started to use this code on a new set of data, and for some
reason the value "I.3.1" will not filter. I am able to filter it using
autofilter, I have confirmed that the values in the criteria range are
exact, etc. Also, similar values I.3.2 work fine, I.4.1 work fine,
but I.3.1 will not filter.

The code
Worksheets("Sheet1").Select
Let lastrow = Application.CountA(ActiveSheet.Range("j:j")) + 3
Range("H5").Select
Selection.CurrentRegion.Select
Range("A5:H" & lastrow).AdvancedFilter Action:=xlFilterInPlace,
CriteriaRange:= _
Range("other")

Does anyone have any ideas about why the code works for all other
values except I.3.1?

Thanks for your help in advance,

Rachael

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default Trouble with Advanced Filter

There is nothing special about "I.3.1" (I just tried it to be sure) so my
guess is that the data does not match the criterion in this case. Just to
positively test this I'd suggest that you enter "I.3.1" in the criterion
cell and then enter a temporary formula like =A10=F2 somewhere where A10 is
a cell in the data list that has the apparent value of I.3.1 and F2 is the
criterion cell. If it's False you know the data has junk like an extra
space, etc., in it.

--
Jim
wrote in message
oups.com...
| Hello-
|
| I have a snippet of VBA code to perform an advanced filter that has
| been working like a charm for several years on a defined set of data.
|
| I have just started to use this code on a new set of data, and for some
| reason the value "I.3.1" will not filter. I am able to filter it using
| autofilter, I have confirmed that the values in the criteria range are
| exact, etc. Also, similar values I.3.2 work fine, I.4.1 work fine,
| but I.3.1 will not filter.
|
| The code
| Worksheets("Sheet1").Select
| Let lastrow = Application.CountA(ActiveSheet.Range("j:j")) + 3
| Range("H5").Select
| Selection.CurrentRegion.Select
| Range("A5:H" & lastrow).AdvancedFilter Action:=xlFilterInPlace,
| CriteriaRange:= _
| Range("other")
|
| Does anyone have any ideas about why the code works for all other
| values except I.3.1?
|
| Thanks for your help in advance,
|
| Rachael
|


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
Trouble with Advanced Filter ken Excel Discussion (Misc queries) 10 January 16th 10 03:18 AM
trouble with advanced filter BorisS Excel Discussion (Misc queries) 9 May 31st 06 06:58 PM
How do I use advanced filter to filter for blank cells? Monique Excel Discussion (Misc queries) 2 March 21st 06 06:43 PM
"Criteria Range" in the "Data/Filter/Advanced Filter" to select Du TC Excel Worksheet Functions 1 May 12th 05 02:06 AM
advanced filter won't allow me to filter on bracketed text (-456.2 LucianoG Excel Discussion (Misc queries) 1 December 6th 04 08:38 PM


All times are GMT +1. The time now is 09:29 PM.

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

About Us

"It's about Microsoft Excel"