+ Reply to Thread
Results 1 to 7 of 7

Macro to Show/Hide Rows Based on Text in Cell

  1. #1
    Registered User
    Join Date
    05-01-2014
    Location
    Texas, US
    MS-Off Ver
    2010
    Posts
    3

    Macro to Show/Hide Rows Based on Text in Cell

    I have a table that has a data validation drop-down list in column G and I am trying to figure out to create a macro that will auto-hide a row when a specific item from that list is selected. Does anyone know if this is possible, and if so, how to set it up?

  2. #2
    Valued Forum Contributor
    Join Date
    07-04-2012
    Location
    Cape Town, RSA
    MS-Off Ver
    Office 365 ProPlus
    Posts
    1,050

    Re: Macro to Show/Hide Rows Based on Text in Cell

    Must it hide the same row or a different one?
    Regards,
    Rudi

  3. #3
    Registered User
    Join Date
    05-01-2014
    Location
    Texas, US
    MS-Off Ver
    2010
    Posts
    3

    Re: Macro to Show/Hide Rows Based on Text in Cell

    The same row, thanks!

  4. #4
    Valued Forum Contributor
    Join Date
    07-04-2012
    Location
    Cape Town, RSA
    MS-Off Ver
    Office 365 ProPlus
    Posts
    1,050

    Re: Macro to Show/Hide Rows Based on Text in Cell

    Have a look at this sample file.
    If you right click on the sheet tab and choose View Code, it will take you to the code. It is this code that you can paste into your workbook by also right clicking on your sheet tab and pasting it into the module it makes available...
    Attached Files Attached Files

  5. #5
    Valued Forum Contributor
    Join Date
    07-04-2012
    Location
    Cape Town, RSA
    MS-Off Ver
    Office 365 ProPlus
    Posts
    1,050

    Re: Macro to Show/Hide Rows Based on Text in Cell

    BTW: Welcome to the forum

  6. #6
    Registered User
    Join Date
    05-01-2014
    Location
    Texas, US
    MS-Off Ver
    2010
    Posts
    3

    Re: Macro to Show/Hide Rows Based on Text in Cell

    That worked! Thank you so much, you have totally made my day!

  7. #7
    Valued Forum Contributor
    Join Date
    07-04-2012
    Location
    Cape Town, RSA
    MS-Off Ver
    Office 365 ProPlus
    Posts
    1,050

    Re: Macro to Show/Hide Rows Based on Text in Cell

    Happy to help

+ 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] Show/hide rows based on drop down cell using named ranges
    By Stu091074 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-07-2014, 11:00 AM
  2. Hide Show rows based on cell value true or false using VBA
    By gopal904 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-12-2013, 07:31 AM
  3. Need help to show/hide rows based on values from a cell
    By concurmgr in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-19-2012, 02:56 PM
  4. [SOLVED] Hide/Show rows based on the value in a cell
    By PatRiot199 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-11-2012, 11:52 PM
  5. Show/Hide Specific set of Rows based on Criteria in one cell
    By mrgillus in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-11-2010, 01:26 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