+ Reply to Thread
Results 1 to 11 of 11

HELP: How to hide empty or blank columns/cells?

  1. #1
    Registered User
    Join Date
    04-04-2014
    Location
    singapore
    MS-Off Ver
    Excel 2010
    Posts
    78

    HELP: How to hide empty or blank columns/cells?

    How to hide empty or blank columns/cells?

    from this
    Untitled A.jpg

    to this

    Untitled B.jpg

  2. #2
    Forum Contributor
    Join Date
    08-04-2014
    Location
    Riga
    MS-Off Ver
    2010
    Posts
    579

    Re: HELP: How to hide empty or blank columns/cells?

    Select column, right-click, Hide. To unhide, select two adjacent columns on each side, right-click, Unhide.

  3. #3
    Registered User
    Join Date
    04-04-2014
    Location
    singapore
    MS-Off Ver
    Excel 2010
    Posts
    78

    Re: HELP: How to hide empty or blank columns/cells?

    Quote Originally Posted by bmouse View Post
    Select column, right-click, Hide. To unhide, select two adjacent columns on each side, right-click, Unhide.
    Hi.

    I forgot to mention that i have about 300 COLUMNS ( & 500 ROWS) & the blanks are scattered all around. So picking the column 1 by 1 is not an option.

    The photo attachment was just to illustrate what i mean only.
    Last edited by nez329; 11-06-2014 at 06:41 AM.

  4. #4
    Forum Contributor
    Join Date
    08-04-2014
    Location
    Riga
    MS-Off Ver
    2010
    Posts
    579

    Re: HELP: How to hide empty or blank columns/cells?

    Do you just need to hide the blanks or delete them? Depending on what kind of data is stored in the non-blank cells, you can get rid of blanks by sorting data.

  5. #5
    Registered User
    Join Date
    04-04-2014
    Location
    singapore
    MS-Off Ver
    Excel 2010
    Posts
    78

    Re: HELP: How to hide empty or blank columns/cells?

    Quote Originally Posted by bmouse View Post
    Do you just need to hide the blanks or delete them? Depending on what kind of data is stored in the non-blank cells, you can get rid of blanks by sorting data.
    Hide,delete or filter is fine.

    From the photo example, only D, G & I column's have blank cells across the whole rows, so i require only D, G & I to be hidden.
    The rest of the rows is to remain as there are data across some rows.

    With blank cells scattered across 300 COLUMNS by 500 ROWS, i need a quick method to 'filter' those that have blank cells in all the whole row & hide or delete them.

    Thanks
    Last edited by nez329; 11-06-2014 at 07:38 AM.

  6. #6
    Forum Contributor
    Join Date
    08-04-2014
    Location
    Riga
    MS-Off Ver
    2010
    Posts
    579

    Re: HELP: How to hide empty or blank columns/cells?

    I don't have much experience with VBA, but I managed to come up with this macro. I tried to write down a step by step explanation of what I did, maybe this will help you. Perhaps someone else can have a crack at this.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    04-04-2014
    Location
    singapore
    MS-Off Ver
    Excel 2010
    Posts
    78

    Re: HELP: How to hide empty or blank columns/cells?

    Quote Originally Posted by bmouse View Post
    I don't have much experience with VBA, but I managed to come up with this macro. I tried to write down a step by step explanation of what I did, maybe this will help you. Perhaps someone else can have a crack at this.
    Thanks bro for the effort you put in for the explanation.

    I will test it out if i can do it cause not entirely familiar with marco.

    Thanks again.

  8. #8
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: HELP: How to hide empty or blank columns/cells?

    Either insert a column on the left of your data or enter this formula in a free column after you data on the right.

    Assuming the right column: enter and copy down the column. All rows that are blank will return a blank and the others 1.
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    In the row under the data enter this formula and copy across the width of the data
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Now, select the data including the column and row with the formulae and sort on the column. This will put all the 0s together and the 1s together. Delete the rows with 0.

    Select the data including row under the data with the formula and sort the data (Left to right)
    Delete the columns with 0.

    This should eliminate all blank rows and columns.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  9. #9
    Registered User
    Join Date
    04-04-2014
    Location
    singapore
    MS-Off Ver
    Excel 2010
    Posts
    78

    Re: HELP: How to hide empty or blank columns/cells?

    Quote Originally Posted by newdoverman View Post
    Either insert a column on the left of your data or enter this formula in a free column after you data on the right.

    Assuming the right column: enter and copy down the column. All rows that are blank will return a blank and the others 1.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Hi bro, base on the 1st step, my Free column on the right is "IX" so i use

    Please Login or Register  to view this content.
    But i got a "circular reference error".

    Any advise on what is wrong?

  10. #10
    Forum Contributor
    Join Date
    08-04-2014
    Location
    Riga
    MS-Off Ver
    2010
    Posts
    579

    Re: HELP: How to hide empty or blank columns/cells?

    Depending on your version/region of Excel you might have a different separator so the formula might look like this

    =IF(COUNTA(A1:G1)>0;1;"")

    However I can confirm that the method presented by newdoverman works perfect, a brilliant solution indeed

  11. #11
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: HELP: How to hide empty or blank columns/cells?

    @ bmouse thank you for the separator translation and the comment.

    @ nez329 You will get a "circular reference" if the formula includes the cell that the formula is in.

+ 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. [SOLVED] Hide - Un Hide rows with empty columns
    By BDF in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 04-14-2014, 02:09 PM
  2. Hide Columns in which all cells are blank when table is sorted
    By dboyzd in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-28-2013, 05:50 PM
  3. VBA to delete empty columns that have Heading by other cells are Blank
    By dhiresh in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-22-2013, 07:14 AM
  4. Hide columns if all cells are blank or £0.00
    By Atticgirl in forum Excel General
    Replies: 9
    Last Post: 07-21-2011, 08:44 AM
  5. Macro to hide columns with empty cells.
    By bailey73 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-31-2011, 11:55 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