Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default Advanced filter criteria for <

have you tried recording a macro while you're doing the filter manually? then
you can look at the code and see what the criteria is.

--


Gary


"Dianne Butterworth" wrote in message
...
I have coded a form for users to do filtering with on data that I pull from an
SQL Server database. I have a field "Invoice Number" which is a varchar(255)
column in SQL Server.

I have a criteria range with the column headings in the first row and the
cells below to fill with the criteria.

Invoice Number often contains numbers with leading zeros, for example 0005962.
If I set my criteria for Invoice Number to 0005962 and apply my advanced
filter, I get the row with invoice number 0005962 as expected.

However, if I set my criteria to <0005962 and apply my advanced filter,
instead of all the rows except that invoice number, I get all rows.

I have tried <'0005962, <"0005962", <"'0005962" - no success.

What has worked is <0005962*

I have checked the original data and there are no trailing spaces in the data.

Why does the * work when nothing else does? I'm not keen on using a wildcard
if it is not necessary; is there a way to set my criteria in this instance
without using the wildcard?

Thanks,
Dianne



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
Advanced filter criteria Andy Faulkner Excel Discussion (Misc queries) 2 February 4th 10 09:09 AM
Criteria for Advanced Filter HELP knowshowrosegrows New Users to Excel 5 February 21st 09 12:32 PM
Advanced filter criteria Marvin Buzz Excel Discussion (Misc queries) 2 May 23rd 08 02:37 PM
Advanced filter criteria Phil C Excel Discussion (Misc queries) 4 April 10th 07 07:48 AM
"Criteria Range" in the "Data/Filter/Advanced Filter" to select Du TC Excel Worksheet Functions 1 May 12th 05 02:06 AM


All times are GMT +1. The time now is 05:13 PM.

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"