+ Reply to Thread
Results 1 to 5 of 5

Need VBA to hide rows beased on text and blank together

  1. #1
    Forum Contributor
    Join Date
    06-02-2014
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    235

    Need VBA to hide rows beased on text and blank together

    i need a VBA code to hide rows based on text in a column. And also if the text is blank to hide as well.

    This is what i have so far I am missing the OR part of this formula to make it work to hide the blank text rows as well.

    Any help is greatly appreciated!

    Please Login or Register  to view this content.

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: Need VBA to hide rows beased on text and blank together

    change
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    Last edited by jindon; 01-23-2018 at 02:52 AM.

  3. #3
    Forum Contributor
    Join Date
    06-02-2014
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    235

    Re: Need VBA to hide rows beased on text and blank together

    Thank you!!

  4. #4
    Registered User
    Join Date
    11-20-2017
    Location
    Pennsylvania
    MS-Off Ver
    2016
    Posts
    3

    Re: Need VBA to hide rows beased on text and blank together

    I am completely new to VBA and forums, with that said here is my question.
    I want to accomplish something very similar to the original questions but with columns. I want to have a button on worksheet "Selections" that when unchecked it hides a column on worksheet "Data Table".
    I accomplished this with the simple code of:

    Private Sub CheckBox12_Click()
    ['Data Table'!N:N].EntireColumn.Hidden = Not CheckBox12
    End Sub

    I attached this code to all 50 or so selection buttons that correspond to different columns in worksheet "Data Table".
    I also added a Select All button and Clear All button that work well.
    My problem is that if I add a column (new data series) to worksheet "Data Table" all of my checkboxes now point to the wrong column.
    So I was trying to figure out what VBA I should use so that it looks in worksheet "Data Table" in row 2 for specific text and then hides the column or columns that match that text.

    Any thoughts?

  5. #5
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,526

    Re: Need VBA to hide rows beased on text and blank together

    @jdp949
    At the top there is a "Forum Rules". Click on it and read #2 and 3 before commencing please.

+ 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] Macro for Hide blank rows and Unhide the rows with cells
    By Neilesh Kumar in forum Excel General
    Replies: 4
    Last Post: 04-12-2017, 06:06 AM
  2. Hide rows for blank Cells when there is another blank cell below
    By bilich in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-16-2016, 08:29 PM
  3. [SOLVED] hide blank rows
    By Littlesimon in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 11-16-2016, 04:33 PM
  4. VBA : Hide Blank Rows
    By Vinod Krishna.C in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-27-2015, 05:40 PM
  5. [SOLVED] macro to hide rows if cell is blank, unhide if it contains text
    By Russ Fuquay in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-19-2013, 10:02 PM
  6. Hide blank Rows - non text/color
    By jeff.p in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 12-29-2009, 03:25 PM
  7. Hide Blank rows
    By Charity in forum Excel General
    Replies: 15
    Last Post: 11-23-2006, 08:20 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