+ Reply to Thread
Results 1 to 2 of 2

Worksheet Change and Hidden/Unhidden rows

  1. #1
    Registered User
    Join Date
    07-18-2014
    Location
    Los Angeles
    MS-Off Ver
    2010
    Posts
    14

    Worksheet Change and Hidden/Unhidden rows

    Hello All,

    I am putting the finishing touches on a project and I want to hide unnecessary data based on the input of two cells.

    I want to search "F5" for the letters "LCL". If found, hide a certain set of rows. If not, move to the next statement. I also want to clear the contents of column M should there be any change initiated by the macro. The second set of code would also be looking at cell "F13" to make sure that it is blank. I am not sure if you can do that in a worksheet change macro.

    Currently when I change the value in "F5", the desired rows for that block of code are hidden/unhidden, but the contents of column M are not cleared. I also receive a runtime '1004' - cannot change a merged cell error. If I then try to select a value that does not contain the InStr term "LCL", no action occurs.

    Please take a look at the code and let me know what you think.

    Thank you!

    Please Login or Register  to view this content.

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Worksheet Change and Hidden/Unhidden rows

    Hi, Citanaf,

    I also receive a runtime '1004' - cannot change a merged cell error.
    Unmerge the cell(s) in question or rely on the basic cells in order to avoid the run-time error. MergedCells create more problems than benefits, itīs best practise to avoid using them.

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

+ 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] Lock rows unless they are hidden or unhidden by macros?
    By dgibney in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-15-2014, 04:06 PM
  2. Buttons disappear when rows are hidden/unhidden
    By mmreddy01 in forum Excel General
    Replies: 9
    Last Post: 09-17-2012, 10:53 AM
  3. How do I protect hidden rows from being unhidden?
    By Pam P in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-15-2005, 05:55 PM
  4. [SOLVED] Why are my hidden rows unhidden after I edit a graph?
    By JazaJoswick in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 08-12-2005, 05:05 PM
  5. Reverse Hidden and Unhidden Rows
    By Moe in forum Excel General
    Replies: 1
    Last Post: 01-14-2005, 01:39 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