+ Reply to Thread
Results 1 to 7 of 7

Hide/Unhide Column if Cell is Empty/Not Empty

  1. #1
    Valued Forum Contributor
    Join Date
    02-07-2013
    Location
    Philippines
    MS-Off Ver
    Excel Online; 365
    Posts
    610

    Hide/Unhide Column if Cell is Empty/Not Empty

    Hi Experts

    I need a code that would hide a column if a particular cell in that column is empty.

    Example:

    If B6 is empty hide B column
    If C6 is empty hide C column
    If D6 is empty hide D column



    Likewise if cell C6 is not empty then column B and C should not be hidden and if cell D6 is not empty then all 3 columns should not be hidden

    Thank you
    If I've helped U pls click on d *Add Reputation

  2. #2
    Valued Forum Contributor
    Join Date
    12-30-2020
    Location
    Odessa / Ukraine
    MS-Off Ver
    2021
    Posts
    324

    Re: Hide/Unhide Column if Cell is Empty/Not Empty

    Hello @bhenlee. Try.
    Please Login or Register  to view this content.

  3. #3
    Valued Forum Contributor
    Join Date
    02-07-2013
    Location
    Philippines
    MS-Off Ver
    Excel Online; 365
    Posts
    610

    Re: Hide/Unhide Column if Cell is Empty/Not Empty

    Thank you MikeVol.. the part where B6 is empty does not seem to work..

    If B6 is empty then all 3 columns (B,C,D) should be hidden
    Last edited by bhenlee; 06-23-2023 at 05:31 AM.

  4. #4
    Valued Forum Contributor
    Join Date
    12-30-2020
    Location
    Odessa / Ukraine
    MS-Off Ver
    2021
    Posts
    324

    Re: Hide/Unhide Column if Cell is Empty/Not Empty

    Quote Originally Posted by bhenlee View Post
    If B6 is empty then all 3 columns (B,C,D) should be hidden
    Where did you write about this in your original post? What you asked for and gave, decide for yourself. I think your question has been resolved. Good luck.
    Last edited by AliGW; 06-23-2023 at 05:54 AM. Reason: Unkind & unhelpful remark removed.

  5. #5
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: Hide/Unhide Column if Cell is Empty/Not Empty

    @bhenlee, please list the columns you want hidden for each case (white letters = empty):

    case 1 B C D
    case 2 B C D
    case 3 B C D
    case 4 B C D
    case 5 B C D
    case 6 B C D

    My diagram is a table; you can copy it and paste in your reply, then just remove letters as needed.
    Last edited by leelnich; 06-23-2023 at 06:00 AM.
    Clicking the Add Reputation star below helpful posts is a great way to show your appreciation.
    Please mark your threads as SOLVED upon conclusion (Thread Tools above Post # 1). - Lee

  6. #6
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,674

    Re: Hide/Unhide Column if Cell is Empty/Not Empty

    If B6:K6 are blank and L6 is not empty what are columns should be hidden. Is your condition For 3 columns B:D then E:G so on.
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  7. #7
    Valued Forum Contributor
    Join Date
    12-30-2020
    Location
    Odessa / Ukraine
    MS-Off Ver
    2021
    Posts
    324

    Re: Hide/Unhide Column if Cell is Empty/Not Empty

    Hello @kvsrinivasamurthy.
    Quote Originally Posted by kvsrinivasamurthy View Post
    If B6:K6 are blank and L6
    And where do you see that they have such a range?

+ 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. how to hide and unhide empty rows using slicer
    By tshepolt in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 01-24-2020, 12:29 PM
  2. [SOLVED] how to auto hide and unhide empty rows
    By tshepolt in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-12-2018, 10:21 AM
  3. [SOLVED] Auto hide/unhide rows that have empty cells ( Preferably VBA Code)
    By carlandtina02 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-09-2016, 07:06 PM
  4. [SOLVED] Hide / Unhide rows in a table that the first column cells are empty
    By How How in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-09-2014, 05:46 AM
  5. Auto Hide And Unhide Row Based On Empty Cell In Specific Range
    By jackgan in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-26-2013, 09:18 AM
  6. Hide rows if cell in Column E is empty
    By annemsauro in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-13-2013, 02:27 PM
  7. Hide/Unhide a range of rows when cell is empty
    By chuck edwards in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-10-2012, 04:25 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