+ Reply to Thread
Results 1 to 7 of 7

Autofilter by Date

  1. #1
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,946

    Autofilter by Date

    See attached. I'm trying to autofilter out dates prior to 30 days before today. The macro I'm using is below, but it's not working*, and I can't figure out what I'm doing wrong. Any help is greatly appreciated.

    *By "Not Working", I mean it's not filtering correctly.
    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Autofilter by Date

    Because your date are formatted as text. Try

    Please Login or Register  to view this content.

  3. #3
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,946

    Re: Autofilter by Date

    Now that's slick! I've never known that you could do TextToColumns and leave it in the same column. But I also don't understand how doing TextToColumns helps in this situation, though I can plainly see that it does!

  4. #4
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Autofilter by Date

    TextToColumns basically just convert the format from Text to General in this case. I don't believe you can autofilter date range if the field type is Text.

  5. #5
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,946

    Re: Autofilter by Date

    I understand what you're saying, but still don't understand. Doing the operation manually, I do the following:
    Select Column BA
    Go to Data Tab, Text-to-Columns dialogue, hit "Next" on the first two screens (leave default)
    Last screen default is set to "General", so I hit "Finish".
    Result: Column is still formatted as "Text".

    So, is the VBA code doing something different?

  6. #6
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Autofilter by Date

    Should be the same. If the VBA solution works go with that one.

  7. #7
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,946

    Re: Autofilter by Date

    it does. I will. Just don't understand.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 4
    Last Post: 03-16-2013, 08:33 AM
  2. Replies: 2
    Last Post: 07-06-2012, 11:42 AM
  3. [SOLVED] AutoFilter Date...
    By nemo66ro in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-11-2012, 05:31 AM
  4. Autofilter by Date
    By RagonichaFulva in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-30-2012, 07:57 AM
  5. Autofilter by date
    By jomili in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-03-2011, 10:48 AM

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