Solved

Filter black-out dates

Posted on 2011-03-22
6
186 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
  • 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
Viewers will learn the basics of slicers and timelines for both PivotTables and standard Excel tables in Excel 2013.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

932 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now