Results 1 to 2 of 2

VBA to filter the ActiveCell whether it is a Date, Text, Amount, etc

Threaded View

ND_Pard VBA to filter the ActiveCell... 04-13-2014, 06:46 PM
ihmha Re: VBA to filter the... 04-14-2014, 03:47 AM
  1. #1
    Registered User
    Join Date
    12-04-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    8

    VBA to filter the ActiveCell whether it is a Date, Text, Amount, etc

    My current VBA code is:

    Sub Filter_by_Active_Cell()
        Dim ColNum As Integer
        ColNum = ActiveCell.Column - (ActiveCell.CurrentRegion.Column - 1)
        Selection.AutoFilter Field:=ColNum, Criteria1:=ActiveCell
    End Sub
    It works fine unless the ActiveCell is a Date ... then NO results are returned.

    How can I modify this code so that whether the Activecell is an amount, text, date, etc, it will filter properly?

    Your help will be appreciated.

    Thank you.
    Last edited by Leith Ross; 04-13-2014 at 07:43 PM. Reason: Added Code Tags

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Filter Sheet2 from ActiveCell on Sheet1
    By ioniapcwizard in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 12-30-2013, 09:35 AM
  2. [SOLVED] Date When Certain Amount of Text Occurs
    By jhudson444 in forum Excel Formulas & Functions
    Replies: 20
    Last Post: 12-05-2013, 09:43 PM
  3. Replies: 2
    Last Post: 04-28-2013, 02:23 AM
  4. How to match Date and Amount from Sheet1 to Sheet2 with the same Date and Amount?
    By ims0phie in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 04-23-2013, 06:51 AM
  5. getting the amount from between text and a date
    By darkhangelsk in forum Excel General
    Replies: 32
    Last Post: 08-28-2009, 09:51 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1