Contact US

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Hiding rows based on cell contents from another sheet.

Hiding rows based on cell contents from another sheet.

Hiding rows based on cell contents from another sheet.

I'm trying to find a way to hide a row on sheet 1 if a corresponding cell on sheet 2 is empty. The requirements are as follows:

1. If Sheet2, A1 is empty then hide Sheet1 Row 1.
2. If not then display the contents of Sheet2 A1. (That's the easy part)
3. Updates to Sheet2 have to be reflected on Sheet1 as they occur.
4. I need at least 50 rows on Sheet1 to contain this function based on their corresponding rows in Sheet2.

None of the research I've done has any reference to doing this over multiple sheets. This is the second time in 6 months I've
tried to tackle this problem and I decided it was time to ask for help! Anyone care to share some insight on this?


RE: Hiding rows based on cell contents from another sheet.

A VBS macro tied to cells in sheet 2 column A changing value or losing the focus?

RE: Hiding rows based on cell contents from another sheet.

In Sheet2!A1 enter =IF(Sheet1!$A1<>0,Sheet1!A1,0).
Copy and paste to appropriate range in Sheet2.
Tools > Options : View, then uncheck Zero values.

Keith A. Lewis
High performance Excel add-ins http://xll.codeplex.com

RE: Hiding rows based on cell contents from another sheet.

Thanks for the replies. I found a script that I think I could doctor up to work with 2 sheets. Then after rethinking my spreadsheet I changed it in such a way that
doesn't require me to hide the rows. I've had to put this on hold for a few days so I haven't really had time to look at your file Doug. I do appreciate the offering
though. Hopefully within the next few days I will be able to get back at it.

Thanks again,

RE: Hiding rows based on cell contents from another sheet.

I hope it's of some use to you in the future Doug. It was only a ten minute job, so we'll waive the fees this time :)

It does illustrate how a fairly simple bit of VBA code, in the form of a User Defined Function, can provide functionality in a flexible way, that would either be difficult with on-sheet methods (and also probably non-robust), or inflexible using VBA code operating on specified ranges.

Doug Jenkins
Interactive Design Services

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Low-Volume Rapid Injection Molding With 3D Printed Molds
Learn methods and guidelines for using stereolithography (SLA) 3D printed molds in the injection molding process to lower costs and lead time. Discover how this hybrid manufacturing process enables on-demand mold fabrication to quickly produce small batches of thermoplastic parts. Download Now
Design for Additive Manufacturing (DfAM)
Examine how the principles of DfAM upend many of the long-standing rules around manufacturability - allowing engineers and designers to place a part’s function at the center of their design considerations. Download Now
Taking Control of Engineering Documents
This ebook covers tips for creating and managing workflows, security best practices and protection of intellectual property, Cloud vs. on-premise software solutions, CAD file management, compliance, and more. Download Now

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close