+ Reply to Thread
Results 1 to 8 of 8

Filter only columns with data and ignore the others

  1. #1
    Registered User
    Join Date
    07-14-2015
    Location
    lisbon
    MS-Off Ver
    2016
    Posts
    68

    Filter only columns with data and ignore the others

    Hi everyone,

    Can someone help with this please?

    I have a sheet with many prices (horizontal) and clients (vertical), i know, using excel online and office 365, i can use filter function, but the problem is that i have more than 2 collumns and i would like a way, after choosing the client, only appears the columns with data and ignore the others.

    I have an example file so you can see better what i am trying to explain.

    Can someone help please?
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Filter only columns with data and ignore the others

    Maybe try using a Pivot Table?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    10-22-2019
    Location
    Qatar
    MS-Off Ver
    2013
    Posts
    58

    Post Re: Filter only columns with data and ignore the others

    Hi,
    I have Created a Excel sheet for you to show the basic idea,
    It's based on macro.

    1. In Sheet2, Cell "B2" - Type the City Name
    2. Then press Ctrl + Shift + E
    (It's for using your macro code)
    3. You'll have your data.
    4. If you want to check again Delete All Columns from C and to above procedure.

    Hope this one will help you.


    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by AhsanQatar; 01-23-2020 at 04:38 AM. Reason: VBA CODE

  4. #4
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: Filter only columns with data and ignore the others

    @AhsanQatar

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

  5. #5
    Registered User
    Join Date
    10-22-2019
    Location
    Qatar
    MS-Off Ver
    2013
    Posts
    58

    Re: Filter only columns with data and ignore the others

    Thank you for your Kind Advice.

  6. #6
    Registered User
    Join Date
    07-14-2015
    Location
    lisbon
    MS-Off Ver
    2016
    Posts
    68

    Re: Filter only columns with data and ignore the others

    Quote Originally Posted by AhsanQatar View Post
    Hi,
    I have Created a Excel sheet for you to show the basic idea,
    It's based on macro.

    1. In Sheet2, Cell "B2" - Type the City Name
    2. Then press Ctrl + Shift + E
    (It's for using your macro code)
    3. You'll have your data.
    4. If you want to check again Delete All Columns from C and to above procedure.

    Hope this one will help you.


    Please Login or Register  to view this content.
    Thanks but i prefer a solution without VBA. mostly because i would use the file in online version of Excel

  7. #7
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    2,824

    Re: Filter only columns with data and ignore the others

    I don't have a full solution for you (because I don't have time to work on it right now), but in your example, to get the header row, in cell C13 you can enter:

    =FILTER(C1:AA1,C6:AA6<>"") (You'll have to delete all the headers that are there to get rid of the #spill error

    and in cell C14, you can enter:
    =FILTER(C6:AA6,C6:AA6<>"")

    Maybe this is a start?

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Filter only columns with data and ignore the others

    Quote Originally Posted by Gregb11 View Post
    I don't have a full solution for you (because I don't have time to work on it right now), but in your example, to get the header row, in cell C13 you can enter:

    =FILTER(C1:AA1,C6:AA6<>"") (You'll have to delete all the headers that are there to get rid of the #spill error

    and in cell C14, you can enter:
    =FILTER(C6:AA6,C6:AA6<>"")

    Maybe this is a start?
    Greg, I dont think =FILTER() is native to 2016 (I know I dont have it)?

+ 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. use a custom filter to find a match and ignore it
    By 1912dummy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-01-2019, 10:58 AM
  2. [SOLVED] VBA to Copy Columns Using Headers but Ignore Columns without Data
    By phelbin in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-20-2018, 04:41 PM
  3. [SOLVED] Find / Filter Min / Max Dates & Ignore #N/A
    By mycon73 in forum Excel General
    Replies: 3
    Last Post: 09-19-2018, 04:53 PM
  4. [SOLVED] Filter data by Columns (a,b,c etc) and mark the top 3 items for each filter.
    By margetc in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 04-15-2018, 04:18 AM
  5. Macro for Filter ignore specific cell value
    By dgibney in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-13-2015, 03:11 PM
  6. Make filter ignore some rows
    By douglascaixeta in forum Excel General
    Replies: 1
    Last Post: 02-22-2012, 10:07 AM
  7. How to ignore lines in filter?
    By karl-heinz-1950 in forum Excel General
    Replies: 0
    Last Post: 04-23-2008, 12:43 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