+ Reply to Thread
Results 1 to 6 of 6

Auto hide/unhide based on input

  1. #1
    Registered User
    Join Date
    11-02-2011
    Location
    New Jersey
    MS-Off Ver
    Excel 2003
    Posts
    8

    Auto hide/unhide based on input

    Hello everyone,

    I need help with a vba for a spreadsheet I am working on.

    My dilemma is I want to put a value say in cell A10 and as soon I press tab, I want to unhide Row 11. In turn when I write a value in cell A11 press tab I want row 12 to unhide.

    For now I want to hide rows 39:139 and start unhiding them one by one as soon as I start there is a value in cell A38.

    I've search online and I get very close results, but nothing that does what I need.

    Any help in the right direction would be greatly appreciated.

    Regards,

    UnSpoknOne

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Auto hide/unhide based on input

    Hello UnSpoknOne,

    Welcome to the Forum!

    Add this macro to the worksheet with the hidden rows.
    Please Login or Register  to view this content.


    How to Save a Worksheet Event Macro
    1. Copy the macro using CTRL+C keys.
    2. Open your Workbook and Right Click on the Worksheet's Name Tab for the Worksheet the macro will run on.
    3. Left Click on View Code in the pop up menu.
    4. Paste the macro code using CTRL+V
    5. Save the macro in your Workbook using CTRL+S
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    11-02-2011
    Location
    New Jersey
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Auto hide/unhide based on input

    Quote Originally Posted by Leith Ross View Post
    Hello UnSpoknOne,

    Welcome to the Forum!

    Add this macro to the worksheet with the hidden rows.
    Please Login or Register  to view this content.


    How to Save a Worksheet Event Macro
    1. Copy the macro using CTRL+C keys.
    2. Open your Workbook and Right Click on the Worksheet's Name Tab for the Worksheet the macro will run on.
    3. Left Click on View Code in the pop up menu.
    4. Paste the macro code using CTRL+V
    5. Save the macro in your Workbook using CTRL+S
    Thank you Leith Ross, so very much!!! It worked exactly how I wanted it!!!
    If you can help me with one more thing, how can I get it to autohide when I delete the value in cell A38.
    Say I delete what's in that cell. I want row 39 to hide again.

    In the mean time I will play with the code to get it to hide again.


    Thank you so very much.
    Regards.

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Auto hide/unhide based on input

    Hello UnSpoknOne,

    This version of the macro will hide or unhide the next row based on the content of the previous cell.
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    11-02-2011
    Location
    New Jersey
    MS-Off Ver
    Excel 2003
    Posts
    8

    Talking Re: Auto hide/unhide based on input

    Thank you once again, especially for the quick response. Now I can do the other complicated things I wanted to do. lol.

    I can do most everything in excel except for vba macros. So thanks once again.

    Best Regards,

    UnSpoknOne

  6. #6
    Registered User
    Join Date
    11-02-2011
    Location
    New Jersey
    MS-Off Ver
    Excel 2003
    Posts
    8

    [solved]

    [SOLVED]

    I hope this is how you post this.

+ 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