+ Reply to Thread
Results 1 to 4 of 4

Need to create a custom filter that displays only rows with text in certain cells

  1. #1
    Registered User
    Join Date
    10-19-2013
    Location
    Seattle
    MS-Off Ver
    Excel 2010
    Posts
    2

    Need to create a custom filter that displays only rows with text in certain cells

    Greetings! This my first post; please let me know if I'm coloring within the lines.

    Using Excel 2010 on Windows 7

    I have created a table to document and track employee attendance: range B5:Z149 (including headers). Minus the header, each row is an employee with various pieces of relevant data for each employee in columns B thru L. The cells in columns M thru Z are blank, and provide a cell for each day of a two week work period. Each employee absence in documented with a 1-4 character text code in the applicable day-cell indicating the kind of absence - sick, vacation, excused, etc. At the end of the work period, the range M6:Z149 will be a checkerboard of blank cells and cells containing an absence text-code. I want to apply a filter that will display only rows that contain text in any of the cells in columns M thru Z for the row, thereby creating a report of all employee absences for all reasons for the work period. I have watched and read a number of tutorials on filtering, but am falling far short of figuring out how to do this. This is step one. Step two is to create a toggle macro for the filter and assign it to a form control so I can run it on command. I will leave that to post to the VBA forum should I have success here.

    Any help is much appreciated.

    dsb

  2. #2
    Valued Forum Contributor
    Join Date
    09-07-2006
    Posts
    520

    Re: Need to create a custom filter that displays only rows with text in certain cells

    Ref your spec in this line
    > .. want to apply a filter that will display only rows that contain text in any of the cells in columns M thru Z for the row

    You could use an adjacent empty col to the right of the range M - Z, eg col AA to test for it and flag
    In AA6: =IF(COUNTA(M6:Z6)>0,"x","")
    Copy down, then filter on col AA for x
    ---------------------------
    Any worth? Wave it, hit the little star at the bottom left of my responses

  3. #3
    Registered User
    Join Date
    10-19-2013
    Location
    Seattle
    MS-Off Ver
    Excel 2010
    Posts
    2

    Thumbs up Re: Need to create a custom filter that displays only rows with text in certain cells

    Brilliant! Works like a charm. Not sure where I indicate "SOLVED"

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Need to create a custom filter that displays only rows with text in certain cells

    Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED". I will do it for you this time.

    In future, to mark your thread as Solved, you can do the following -
    Select Thread Tools-> Mark thread as Solved.

    Incase your issue is not solved, you can undo it as follows -
    Select Thread Tools-> Mark thread as Unsolved.

    Also, since you are relatively new to the forum, i would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post which helped you. This adds to the reputation of the person who has taken the time to help you.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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. Pass cells from Custom Filter to a Text Box (w concatenation) using VBA Code
    By Cirenav in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-11-2013, 04:46 PM
  2. [SOLVED] Create a dynamic custom filter
    By niko79542 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-24-2012, 04:02 PM
  3. Cell which displays the filter in use as text
    By pauldaddyadams in forum Excel General
    Replies: 9
    Last Post: 01-21-2012, 11:01 AM
  4. How to create user form that displays values from cells
    By TomT in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-24-2008, 02:57 AM
  5. Replies: 3
    Last Post: 09-14-2005, 03:05 PM

Tags for this Thread

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