Solved

Filter black-out dates

Posted on 2011-03-22
6
191 Views
Last Modified: 2012-05-11
This is a follow-up question from http://www.experts-exchange.com/Software/Office_Productivity/Office_Suites/MS_Office/Excel/Q_26903378.html#a35192034

I was trying to filter expiration policies, but as I noticed, some fields are empty & does not contain any data for any acctopid number. It would be good to see these fields as well and I attached a sample here.

Thanks again :)
currentdb
userform-sample-v7b-4.xlsm
0
Comment
Question by:currentdb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 30

Accepted Solution

by:
SiddharthRout earned 500 total points
ID: 35192100
Try this Sample File. I have added a new command button.

Sid

Code Used

Private Sub CommandButton2_Click()
    Dim lastRow As Long
    Dim Dt As Date
    
    On Error GoTo Whoa
    
    lastRow = Sheets("QUERY_FOR_GSL2").Range("A" & Rows.Count).End(xlUp).Row
    
    If Len(Trim(TextBox1.Text)) = 0 Then
        MsgBox "The textbox cannot be empty"
        Exit Sub
    End If
    
    With Sheets("QUERY_FOR_GSL2").Range("$A$1:$BC$" & lastRow)
        .AutoFilter Field:=15, Criteria1:=TextBox1.Text
        .AutoFilter Field:=51, Criteria1:=""
        Unload Me
    End With
    Sheets("QUERY_FOR_GSL2").Activate
    Exit Sub
Whoa:
    MsgBox Err.Description
End Sub

Open in new window

userform-sample-v7b-1.xlsm
0
 
LVL 1

Author Comment

by:currentdb
ID: 35192142
Ok I'm on it.
0
 
LVL 1

Author Comment

by:currentdb
ID: 35192188
I'm back and it works perfectly! Thanks! :)

I have another question very similar, but I'll try to solve it myself. If I fail, I'll post it in a new question of course :)
0
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
LVL 30

Expert Comment

by:SiddharthRout
ID: 35192238
Gr8 :)

Sid
0
 
LVL 1

Author Closing Comment

by:currentdb
ID: 35192419
Thanks you again for your fast reply and patience in solving this question. Big thank thank you! :)
0
 
LVL 1

Author Comment

by:currentdb
ID: 35192860
0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question