Solved

Filter black-out dates

Posted on 2011-03-22
6
190 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.
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.

734 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