troubleshooting Question

Hide rows based on cell value and repeat macro for other cells/rows

Avatar of Unreal1998
Unreal1998 asked on
Microsoft Excel
15 Comments1 Solution1155 ViewsLast Modified:
I've used macros before to hide rows based on the value on a cell. However, for the life of me I cannot figure out how to duplicate the macro for other cells/rows. For example:

If C4="Y" or "N" or cell is BLANK, then hide rows 5-6. If C4="U" then show rows 5-6.

I also need

If C20="Y" or "N" or cell is BLANK, then hide rows 21-22. If C4="U" then show rows 21-22.

And I will add more conditions for cells and rows.

Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 15 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 15 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros