Share via

VBA - Unhide multiple rows

Anonymous
2016-06-03T06:52:04+00:00

Hi everyone,

I'm having a massive issue here. Don't know why it's doing it. I want to hide/unhide multiple rows in one hit but it doesn't seem to work (the easy way), however the longer winded way does work (specify one row, unhide, then the next row, unhide). It's really getting on my nerves!

Here's the code:

        If Range("H37") = "1" Then

            Range("225,226,227,557,558").EntireRow.Hidden = False

        End If

Why doesn't it work? I'm fairly sure I've used this exact code before and it's worked.

Thanks,

Dan

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

OssieMac 48,001 Reputation points Volunteer Moderator
2016-06-03T07:39:14+00:00

Either of the following 2 lines works.

Range("225:225, 226:226, 227:227, 557:557, 558:558").EntireRow.Hidden = False

Range("A225, A226, A227, A557, A558").EntireRow.Hidden = False

Was this answer helpful?

0 comments No comments

0 additional answers

Sort by: Most helpful