+ Reply to Thread
Results 1 to 5 of 5

VBA to filter multiple sheets

  1. #1
    Forum Contributor
    Join Date
    02-01-2008
    Location
    Perth, Australia
    MS-Off Ver
    Excel 365
    Posts
    135

    VBA to filter multiple sheets

    Hi All,

    I have a macro that filters all the sheets in a workbook based on a cell entry on sheet 1. The filter runs through Columns 1.

    This works quite well(other than flicker issues).

    The problem is I also need the filter to run through column K and show rows that have an empty cell.(i.e UnInvoiced) I have tried the below code, but it shows the empty formula rows below all data not the uninvoiced rows.
    Please Login or Register  to view this content.
    Please Help

    Cheers

    Adam
    Last edited by VBA Noob; 09-24-2008 at 01:24 AM. Reason: Poor title

  2. #2
    Valued Forum Contributor
    Join Date
    09-19-2008
    Location
    It varies ...
    MS-Off Ver
    Office365 - 64bit
    Posts
    862
    Hi Zimbo .. others may have a different view, but for me, it's difficult to help without seeing the full code and trying to work out what's happening with 3 lines of code, those being only part of a conditional statement ... well, it could be anything really and may not even be in these lines. If you'd like to post it or prefaerably attach your workbook, I'll take a look for you. Are you applying these filters on A and then K? Depending on your data, they may be incompatible ..

    On the flicker issues when filtering sheets - have you used:
    Please Login or Register  to view this content.
    Just don't forget to turn it back on again ..

    Cheers, MM.

  3. #3
    Forum Contributor
    Join Date
    02-01-2008
    Location
    Perth, Australia
    MS-Off Ver
    Excel 365
    Posts
    135

    Red face Please see new post

    Hi All,

    Accidently posting newer post is correct.
    Last edited by Zimbo; 09-25-2008 at 09:20 AM. Reason: Incorrect Posting

  4. #4
    Forum Contributor
    Join Date
    02-01-2008
    Location
    Perth, Australia
    MS-Off Ver
    Excel 365
    Posts
    135

    My Code

    Hi MM,

    I have managed to fix the flicker issues ( I was calling macros in the wrong places). Please find my code for the sheet sort below.
    I am either sorting by Column A or Column K, but should not sort Column K unless Column A has a value. I have tried the sort criteria as both ="" and ="=".

    Please Login or Register  to view this content.
    The section "Uninvoiced" is the one I am having issues with.

    All help is appreciated.

    Cheers

    Adam
    Last edited by Zimbo; 09-25-2008 at 09:42 AM.

  5. #5
    Valued Forum Contributor
    Join Date
    09-19-2008
    Location
    It varies ...
    MS-Off Ver
    Office365 - 64bit
    Posts
    862
    If I understand correctly that you're trying to filter first on col A for non-blanks and then any blanks in col K, try this:

    Please Login or Register  to view this content.
    I'm not sure why you've got specialcells etc in there; if the autofilter is on the range for the filter is implied and you don't need to specify it.

    Hope that helps. MM.
    MatrixMan.
    --------------------------------------
    If this - or any - reply helps you, remember to say thanks by clicking on *Add Reputation.
    If your issue is now resolved, remember to mark as solved - click Thread Tools at top right of thread.

+ 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: 7
    Last Post: 05-28-2008, 03:12 AM
  2. Massive Sorting question.
    By Rgaherty in forum Excel Programming / VBA / Macros
    Replies: 35
    Last Post: 11-07-2007, 02:15 PM
  3. Separating CSV text from one column into sorted column
    By Terrance in forum Excel General
    Replies: 2
    Last Post: 11-02-2007, 10:39 AM
  4. looping issues
    By Marcus Gee in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-09-2007, 11:42 PM
  5. Replies: 5
    Last Post: 06-06-2007, 07:27 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