Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Filter black-out dates

Posted on 2011-03-22
6
Medium Priority
?
194 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 2000 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
Independent Software Vendors: 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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.
How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

604 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