+ Reply to Thread
Results 1 to 2 of 2

How to Macro: if...then unhide row?

  1. #1
    Registered User
    Join Date
    08-10-2010
    Location
    Seattle
    MS-Off Ver
    Excel 2003
    Posts
    3

    How to Macro: if...then unhide row?

    Hi I'm very new to this forum and I wish I knew more about macros as they are awesome but alas I am not.
    I wish to create an IF a certain cell is > 0, then unhide row function.
    Unfortunately I understand that innate excel functions can't accomplish this, so is there anyone who would know how to create a macro to do this?

    The specifics are:
    If cell Q85 OR R85 within "worksheet_1" is > 0, then unhide row 60 within worksheet "worksheet_x".
    I will be using many more cells for more columns - i.e. Q85/R85 within
    "worksheet_2" to unhide row 61 within worksheet "worksheet_x".
    I also want to go Q86/R86 within "worksheet_1" > 0, then unhide row 70 in "worksheet_x".

    If it makes a difference, I will drawing information from 9 different worksheets and directing their inputs to one worksheet (worksheet_x).

    Please let me know if this confuses you, I tried to be somewhat clear despite my lack of comp-sci savvy. Thank you in advance for your help!

  2. #2
    Forum Expert davegugg's Avatar
    Join Date
    12-18-2008
    Location
    WI, US
    MS-Off Ver
    2010
    Posts
    1,884

    Re: How to Macro: if...then unhide row?

    Here is a custom procedure that will do what you want:

    Please Login or Register  to view this content.

    This way you can run it by entering the arguments you want and change them up easily as needed. For your first example, you'd call it like this:

    Please Login or Register  to view this content.

    Your next example would be called like this:

    Please Login or Register  to view this content.

    Then:

    Please Login or Register  to view this content.
    Is your code running too slowly?
    Does your workbook or database have a bunch of duplicate pieces of data?
    Have a look at this article to learn the best ways to set up your projects.
    It will save both time and effort in the long run!


    Dave

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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