Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Advanced Filter Ignore Blanks and Question Marks 1

Status
Not open for further replies.

Chance1234

IS-IT--Management
Jul 25, 2001
7,871
US
I have the following lines of code

Code:
with ThisWorkbook.Sheets("list")
  .Range("L1", .Range("L65536").End(xlUp)).AdvancedFilter _
        Action:=xlFilterCopy, CriteriaRange:="ctl_blank", CopyToRange:=Sheet2.Range("i1"), Unique:=True
        Sheet2.Range("i1").CurrentRegion.Offset(1, 0).Name = "be_meeting"
        ThisWorkbook.Sheets("Lookup").Range("be_meeting").Sort Key1:=ThisWorkbook.Sheets("lookup").Range("be_meeting").Cells(1, 1), Order1:=xlAscending, Header:=xlYes
        'owner

...
end with



All works fine unless I have blank rows or a question mark in my data (which i will have)

splitting this down;

does anyone know how to adapt the above to ignore blanks
and secondly does anyone know or have an idea how to approach the question mark



Chance,

F, G + Its official, its even on a organisation chart et all
 
Ignore first part,

Blanks are solved where i have the line ctl_blanks

this points to a table along the lines of the following

meeting
<>

the question mark is throwing us

Chance,

F, G + Its official, its even on a organisation chart et all
 
You need two criteria columns for AND logic

Meeting Meeting
<> <>~?

ctl_blank should be defined as A1:B2 for example - change dependant on the particular cells you are referencing in the name

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top