+ Reply to Thread
Results 1 to 4 of 4

filtering query

  1. #1
    Registered User
    Join Date
    11-26-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    12

    filtering query

    Hi there,

    I have a query about filtering merge cells.

    I have say 8 rows of information over a number of columns. 4 rows are for one project, let's say project-x, and the other 4 rows are for another project, let's say project-y.

    Rather than typing project-x or project-y in each row, I have merged the 4 cells in one column, which reads project-x, and merged the other 4 cells below, which reads project-y.

    When I filter by project-x, only row 1 information shows up. When I filter by project-y, only row 5 information shows up, no other rows.

    Any assistance would be greatly appreciated.

    Cheers

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: filtering query

    thats correct behaviour although cells are merged the data is only in a1 and a5, dont merge cells or auto filter will noy work as you may expect
    you will need to fill the other cells a1:a4 with project x and likewise a5:a8 with project y
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,733

    Re: filtering query

    Well, the short answer is not to use merged cells. It might look like the data is spread across those 4 cells, but in fact the data is only in the first cell of the block, as you have found.

    Hope this helps.

    Pete

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

    Re: filtering query

    Here's a tinker to workaround the problem of vertically merged cells
    Assume your merged cells are in A2 down, eg in A2:A5, A6:A9, etc
    Insert a new col A
    Put in A2: =B2
    Put in A3: =IF(B3="",A2,B3)
    Copy A3 all the way down to populate it all in one sweep
    Now you can apply filter on the new col A

    p/s: Instead of using merged cells, note that you can easily enter at one go the same input into multiple cells via CTRL+ENTER. Just select the 4 vertical cells eg A2:A5, type the input into the formula bar, press CTRL+ENTER
    ---------------------------------------------
    Any good? Wave it, hit the little star at the bottom left of my responses

+ 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. "text" query table filtering data
    By husein_786 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-12-2013, 06:09 AM
  2. Query/Filtering by Date
    By JasonBarnes in forum Excel General
    Replies: 2
    Last Post: 01-04-2012, 05:36 AM
  3. Automatically Filtering after Web Query
    By presarc in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-07-2010, 03:43 PM
  4. Filtering out fields with asterisks in MS Query
    By NBVC in forum Excel General
    Replies: 5
    Last Post: 10-14-2009, 11:29 AM
  5. ComboBox Form for CrossTab Query filtering
    By AFSSkier in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-20-2006, 03:20 PM

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