Loading
Ozgrid Excel Help & Best Practices Forums

Excel Video Tutorials / Excel Dashboards Reports



Page 2 of 2 FirstFirst 1 2
Results 11 to 13 of 13

Thread: Autofilter Macro according to TRUE / FALSE criteria

  1. #11
    Join Date
    12th August 2011
    Posts
    64

    Re: Autofilter Macro according to TRUE / FALSE criteria

    Quote Originally Posted by Smallman View Post
    Hi Rosco

    I don't know how you managed to get the code I provided not to work and to make two if statements where one is adequate. Here is the code unaltered on your file.

    Take care

    Smallman
    Hi Smallman,

    I have downloaded your attachment, but still cannot get this to work. If I put TRUE in sheet12, cell C6, it should filter out column 1, the "Y". Then with that filter still on, will search sheet12, cell C7, see it says FALSE, then go back and filter out the blanks in column 11.

    For example, if you type in "Y" in column 11 - rows 2 - 9, and type TRUE in Sheet12, cell C6, when you run the macro, it should first filter column 1 "Y" then go filter column 11, Blanks...you should be left with1 visible row.

    Hope that makes sense

    Rossce

    Excel Video Tutorials / Excel Dashboards Reports


  2. #12
    Join Date
    18th August 2011
    Location
    Brisbane, Austalia
    Posts
    2,941

    Re: Autofilter Macro according to TRUE / FALSE criteria

    Hi Rosco

    I thought your problem was an either or. If it was true in C6 then apply one filter otherwise apply another. You are talking about adding an AND condition and this will include both conditions. The following will cater for both conditions. Paste over the top of prior workbook code.

    Take care

    Smallman

    VB:
    Sub FilterCriteriasm() 
        Sheet2.AutoFilterMode = False 'Clear filter
         
        If Sheet12.Range("C6").Value = "TRUE" And Sheet12.Range("C7").Value = "FALSE" Then 
            Sheet2.Range("A1:AI1").AutoFilter 1, "Y" 
            Sheet2.Range("A1:AI1").AutoFilter 11, "=" 
        End If 
    End Sub 
    
    

    Excel Video Tutorials / Excel Dashboards Reports


  3. #13
    Join Date
    12th August 2011
    Posts
    64

    Re: Autofilter Macro according to TRUE / FALSE criteria

    Thanks Smallman,

    Yep, that has worked treat - thank you for your time and help :-)

    Rossce

    Excel Video Tutorials / Excel Dashboards Reports


Thread Information

Users Browsing this Thread

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

Possible Answers

  1. Replies: 3
    Last Post: October 5th, 2011, 10:22
  2. Replies: 3
    Last Post: April 14th, 2011, 13:56
  3. Hide Checkbox TRUE/FALSE & Sum Values Adjacent To TRUE
    By jimmyshaft in forum EXCEL HELP
    Replies: 8
    Last Post: August 5th, 2009, 22:01
  4. Calculations Via True And False
    By thegoon in forum EXCEL HELP
    Replies: 6
    Last Post: February 1st, 2008, 17:19
  5. 'IF' Function - True/False to Yes/No
    By paula01 in forum EXCEL HELP
    Replies: 10
    Last Post: May 30th, 2006, 22:47

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
  •  
porno