+ Reply to Thread
Results 1 to 4 of 4

Automatically hide row if cell equals the same as cell above

  1. #1
    Registered User
    Join Date
    06-12-2015
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    91

    Automatically hide row if cell equals the same as cell above

    Hiya,

    I'm trying to find a macro to automatically hide a row if the cell A equals the same as the cell above, and unhide if this changes.

    For example, if A4 equals A3 then hide row 3. The cells in row A are automatically populated so if this the cell changed then it would need to unhide but this is fine to only refresh when opening the tab. There is no particular range though it isn't going to go any higher than row 100.

    I hope that makes sense.

    Thank you in advance.

    Tim

  2. #2
    Forum Contributor
    Join Date
    12-02-2010
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2013, 2016
    Posts
    100

    Re: Automatically hide row if cell equals the same as cell above

    Hello Tim,

    Give this a shot, in my brief trial on a test worksheet it seemed to do what you are looking for. This only triggers when the tab is activated though, and it is only comparing values in column A. Hope it helps:
    Please Login or Register  to view this content.
    Mark as "Solved" and add Reputation if applicable.

  3. #3
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,481

    Re: Automatically hide row if cell equals the same as cell above

    Probably a loop will be simplest

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    06-12-2015
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    91

    Re: Automatically hide row if cell equals the same as cell above

    They both seem to do the job. Not quite sure what the differentiates the two methods to be honest but they both seem to work. Cheers both of 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. Automatically replacing a value in a cell when another cell equals a "Yes"
    By dmutimer in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-17-2016, 09:54 AM
  2. Hide column if any cell in range equals certain value
    By Groovicles in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-21-2015, 01:07 PM
  3. Automatically hide row based on a #NA Value in a particular cell
    By tlaxxx in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-10-2015, 08:12 AM
  4. Replies: 2
    Last Post: 07-27-2014, 11:48 PM
  5. [SOLVED] Faster way to hide rows when cell equals zero
    By thecubsfan15 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 06-13-2013, 04:43 PM
  6. On update, if cell equals, hide/show rows
    By Gerdagan in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-05-2013, 07:26 PM
  7. How do you hide a row if a certain cell equals zero?
    By msqueenjessica in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-05-2005, 10:06 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