Office & Productivity Software forum

General discussion

macro help

by JSteinmetz / October 26, 2004 12:59 AM PDT

I want to create a macro in excel which when assigned to a button, will unhide a row. The row which needs to be unhidden will change depending if the row above it has a value in the first cell of that row. If that is the case, I need the macro to unhide the next row. Does anyone know how to do that?

Discussion is locked
You are posting a reply to: macro help
The posting of advertisements, profanity, or personal attacks is prohibited. Please refer to our CNET Forums policies for details. All submitted content is subject to our Terms of Use.
Track this discussion and email me when there are updates

If you're asking for technical help, please be sure to include all your system info, including operating system, model number, and any other specifics related to the problem. Also please exercise your best judgment when posting in the forums--revealing personal information such as your e-mail address, telephone number, and address is not recommended.

You are reporting the following post: macro help
This post has been flagged and will be reviewed by our staff. Thank you for helping us maintain CNET's great community.
Sorry, there was a problem flagging this post. Please try again now or at a later time.
If you believe this post is offensive or violates the CNET Forums' Usage policies, you can report it below (this will not automatically remove the post). Once reported, our moderators will be notified and the post will be reviewed.
Collapse -
Re: macro help
by Kees Bakker / October 26, 2004 2:07 AM PDT
In reply to: macro help


It's rather simple. Loop from A1 downwards until you find a cell with that particular value. Then go down one more line and unhide it (or possibly: select line and line below it and unhide).

I won't provide code, but it's not especially difficult.

The best thing to do: buy an introductory book on VBA programming in Excel.
Or: Find VBA code and examples on the net (easy to find with google, search for Excel VBA unhide row for example) and study the VBA Help that comes with Excel.
I always advice the first to start with and only turn to the Internet once you've mastered the basics of VBA programming, but you might prefer the other way.


Collapse -
Re: macro help
by JSteinmetz / October 26, 2004 6:32 AM PDT
In reply to: Re: macro help

Thanks for your help. I figured it out.

Collapse -
(NT) (NT) Good work.
by Kees Bakker / October 26, 2004 6:55 AM PDT
In reply to: Re: macro help
Popular Forums
Computer Newbies 10,686 discussions
Computer Help 54,365 discussions
Laptops 21,181 discussions
Networking & Wireless 16,313 discussions
Phones 17,137 discussions
Security 31,287 discussions
TVs & Home Theaters 22,101 discussions
Windows 7 8,164 discussions
Windows 10 2,657 discussions


Help, my PC with Windows 10 won't shut down properly

Since upgrading to Windows 10 my computer won't shut down properly. I use the menu button shutdown and the screen goes blank, but the system does not fully shut down. The only way to get it to shut down is to hold the physical power button down till it shuts down. Any suggestions?