+ Reply to Thread
Results 1 to 5 of 5

Automatically Show or Hide row based on cell value

  1. #1
    Registered User
    Join Date
    06-28-2022
    Location
    Belgium
    MS-Off Ver
    Office 365 Version 2208
    Posts
    12

    Automatically Show or Hide row based on cell value

    Hello

    So I made an example file with 2 tabs "InformationSheet" and "FinalTable".

    Based on the value "ok" in "InformationSheet", a row gets added in "FinalTable", the row gets implemented in the sheet "InformationSheet", if the "ok" gets deleted, the row also gets deleted.

    I also have a macro that hides or shows that row based on the cell value in J8, if this cell is empty, the row needs to be hided, if this cell is not empty, the row needs to be shown.

    The macro works fine, but I rather have this macro to run automatically, instead of running the macro manually everytime...

    I hope this is possible!

    King regards
    Attached Files Attached Files

  2. #2
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: Automatically Show or Hide row based on cell value

    Hello Tom...

    It's probably possible, but what would trigger the macro to run automatically?
    • When the workbook opens?
    • When a worksheet activates?
    • When a specific cell or a range of cells are selected or changed?
    • Etc...


    There are quite a few different triggers one can use in Excel.

  3. #3
    Registered User
    Join Date
    06-28-2022
    Location
    Belgium
    MS-Off Ver
    Office 365 Version 2208
    Posts
    12

    Re: Automatically Show or Hide row based on cell value

    Hello!

    Basicly whenever the value of cell J8 changes in "FinalTable"

    If this cell is empty --> Hide Row

    If this cell is not empty --> Show this Row.

    Hopefully I've made these things clear how I want to make it run automatically!

  4. #4
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: Automatically Show or Hide row based on cell value

    Try copying this to the "FinalTable " worksheet code module...
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    06-28-2022
    Location
    Belgium
    MS-Off Ver
    Office 365 Version 2208
    Posts
    12

    Re: Automatically Show or Hide row based on cell value

    Thank you! This was exactly what I was looking for!

+ 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. Hide/Show Cells Based on Another Cell Value
    By EDE630 in forum Excel General
    Replies: 2
    Last Post: 03-23-2022, 11:19 AM
  2. Show/Hide Rows based on cell value
    By DennisBorscheid in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-11-2021, 06:53 AM
  3. [SOLVED] Automatically Hide or not Hide columns, based on cell value (to the left)
    By sherylt13 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-04-2018, 07:47 PM
  4. Hide or Show rows based off value of cell in that row?
    By dancor31 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 05-17-2017, 01:38 PM
  5. [SOLVED] Hide or show an object based on a cell value
    By OpOrange in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 07-26-2016, 09:17 AM
  6. [SOLVED] Hide/show row based on cell value
    By zanguard80 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-11-2015, 03:06 PM
  7. Hide/Show Columns based on Cell Value
    By Woodjr in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-05-2013, 04:12 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