+ Reply to Thread
Results 1 to 6 of 6

Filter but keep certain headings rows?

  1. #1
    Registered User
    Join Date
    03-25-2008
    Posts
    4

    Filter but keep certain headings rows?

    I have a problem in relation to filters in excel. I have a list of about 2000 rows, with the rows being divided into four sections. I want to filter all columns. When i use 'Autofilter' in excel it removes the rows which give the section name once a value has been selected.


    So in other words, when the data is filtered i want the 4 section headings to remain at all times. Is there any VB code that will achieve this. Thanks in advance.


    Regard,

    Eoin Walsh


    e.g.
    section 1 (row 1)
    row 2
    row 3
    row 4
    section 2 (row 5)
    row 6
    row 7
    row 8
    section 3 (row 9)
    row 10
    row 11
    row 12
    section 4 (row 13)
    row 14
    row 15
    row 16

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Sorry, AutoFilter doesn't work like that.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    03-25-2008
    Posts
    4

    How about VB

    Would it be possible to put some code into VB to say,
    "where row = 'section 1' do not filter/remove"

    or

    perhaps i could create a macro that would insert these dividing rows once some one selects from a drop down arrow on a filter.?


    excuse my ignorance!

    thanks in advance

    Eoin

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    It would be easier to design you worksheet to fit the AutoFilter requirements. can you attach a zipped workbook?

  5. #5
    Registered User
    Join Date
    03-25-2008
    Posts
    4

    Example zip file

    I have attached an example zip file. I had to remove some information for confidentiallity but you will get the idea. If i select 'Tom' from the Name column i want the header rows '91+ DPD' 61-90 DPD' etc to stay in place.

    Thanks look forward to hearing from you.
    Attached Files Attached Files

  6. #6
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    The best approach would be to add a column for the DPD, then create a PivotTable.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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