+ Reply to Thread
Results 1 to 19 of 19

Unhiding / Hiding rows based on a different cell value

  1. #1
    Registered User
    Join Date
    07-29-2013
    Location
    India
    MS-Off Ver
    Excel 2002
    Posts
    53

    Unhiding / Hiding rows based on a different cell value

    Hi,

    Thank you very much for your support in advance. I am using excel 2002. I am developing a checklist with in which, if the cell "H11" is TRUE, the the rows 13 to 15 should appear, and if the cell "H11" is "FALSE", the rows 13 to 15 should hide. Can you please provide me the macro code?

    gm2612

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,651

    Re: Unhiding / Hiding rows based on a different cell value

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Unhiding / Hiding rows based on a different cell value

    You may also try:

    Please Login or Register  to view this content.
    or:

    Please Login or Register  to view this content.
    Also see the "Please consider" note at the bottom of this post.
    Last edited by Winon; 07-29-2013 at 04:42 AM. Reason: Corrected second option
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  4. #4
    Registered User
    Join Date
    07-29-2013
    Location
    India
    MS-Off Ver
    Excel 2002
    Posts
    53

    Re: Unhiding / Hiding rows based on a different cell value

    Winon, AlphaFrog,

    I thnk you both. I prefer the second set of code given by Winon, and it works perfectly

    Thanks and regards,
    gm2612

  5. #5
    Registered User
    Join Date
    07-29-2013
    Location
    India
    MS-Off Ver
    Excel 2002
    Posts
    53

    Re: Unhiding / Hiding rows based on a different cell value

    Winon, AlphaFrog,

    Sorry, Now, I have another problem. I am generating the "TRUE" and "FALSE" from the check box condition. If the check box is checked, then the cell "H11" will read TRUE automatically, otherwise "FALSE". The formula is working if only I type TRUE or FALSE. When the TRUE or FALSE is changing based on the check box condition, then the formula is not working. How to overcome this problem?

    Thanks,
    gm2612

  6. #6
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Unhiding / Hiding rows based on a different cell value

    Are you using Form Control Check Boxes or Activex Check Boxes?
    Last edited by Winon; 07-29-2013 at 05:57 AM. Reason: Spelling

  7. #7
    Registered User
    Join Date
    07-29-2013
    Location
    India
    MS-Off Ver
    Excel 2002
    Posts
    53

    Re: Unhiding / Hiding rows based on a different cell value

    Dear Winon, I am using the check box from "Forms" menu. Which one you recommend to use?

  8. #8
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Unhiding / Hiding rows based on a different cell value

    Hello gm2612,

    I suggest you use the Activex Control CheckBox. Much easier to work with.

    Please Login or Register  to view this content.

    Sample WorkBook is attached for easy reference.

    Also see the "Please consider" note at the bottom of this post.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    07-29-2013
    Location
    India
    MS-Off Ver
    Excel 2002
    Posts
    53

    Re: Unhiding / Hiding rows based on a different cell value

    Dear Winon, I thank you sooo much. I am sorry that, in the flow of asking questions, I missed to "Implement" the notes. However, (to be frank), I am polite (no offence ) I also wonder and am amazed about the speed at which you provide the solutions.

    Thank you again Winon

  10. #10
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Unhiding / Hiding rows based on a different cell value

    Hello gm2612,


    You are welcome.

    Glad I could help. If you are satisfied with the solution I had given you, then please mark your Thread as Solved.

  11. #11
    Registered User
    Join Date
    07-29-2013
    Location
    India
    MS-Off Ver
    Excel 2002
    Posts
    53

    Re: Unhiding / Hiding rows based on a different cell value

    Dear Winon,

    Your excel attachment is wonderful. This is what exactly I have to create in my excel sheet.

    But, I have learned only how to create TRUE or FALSE using FORMS check box. Can you please teach me little bit on how to use Activex control check box? 2ndly, I am not sure if activex control check box is available in my computer, as it is controlled by my network administrator (it is my office computer).

    Thanks Winon

    Regards,
    gm2612

  12. #12
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Unhiding / Hiding rows based on a different cell value

    Hello gm2612,

    On the Ribbon, select Developer>Insert. From the DropDown Select, under Activex Controls, a CheckBox>move your mouse down to where you want to place it on the Sheet and drag a square. That is it. First see if you are able to do that.

  13. #13
    Registered User
    Join Date
    07-29-2013
    Location
    India
    MS-Off Ver
    Excel 2002
    Posts
    53

    Re: Unhiding / Hiding rows based on a different cell value

    Dear Winon,

    I dont find words to describe the sort of help you are providing. But, I am so sorry that I could not get it. Can you send me some screen shots of how to reach to this menu item please? Sorry to bother you.

    Thanks again.
    gm2612

  14. #14
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Unhiding / Hiding rows based on a different cell value

    Hello gm2612,

    Are ChekBoxes an absolute must, because there are other ways of getting around setting up your WorkSheet?

    See the revised attached WorkBook as an example.

    To simplify matters, why don't you upload a sample WorkBook of your present setup, for us to have a look at, and maybe come up with better ideas, or Code.
    Attached Files Attached Files

  15. #15
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,651

    Re: Unhiding / Hiding rows based on a different cell value

    Quote Originally Posted by gm2612 View Post
    Dear Winon, I am using the check box from "Forms" menu. Which one you recommend to use?
    I find Form-type checkboxes easy to work with. Easier than ActiveX in some cases. Especially if you have several checkboxes that do nearly the same thing. It may be possible to have one procedure for all the Form-type checkboxes. ActiveX checkboxes require each have an event procedure.

    Maybe assign this this to your Form-type checkbox.
    Please Login or Register  to view this content.

  16. #16
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Unhiding / Hiding rows based on a different cell value

    @ AlphaFrog,

    Yip, that works well!

  17. #17
    Registered User
    Join Date
    07-29-2013
    Location
    India
    MS-Off Ver
    Excel 2002
    Posts
    53

    Re: Unhiding / Hiding rows based on a different cell value

    Dear Winon, AlphaFrog,

    My sincere thanks to both of you. First, I tried the code by AlphaFrog, unfortunately it did not work. Then, I tried the activex code given by Winon yesterday, to a simple contrl tool box check box, and it works perfectly. My sincere thanks again to you Winon, AlphaFrog.

    Thanks a lot.

  18. #18
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Unhiding / Hiding rows based on a different cell value

    Hello gm2612,

    You are welcome.

    I have attached an updated WorkBook for you with at least three examples of how to go about using different approaches.

    The first one is with a Forms Control Check Box, as provided by AlfaFrog, the second one is with an ActiveX Control CheckBox, and the third is with a simple Dropdown Selection.

    I hope that this will make you understand things a little better.

    Happy Coding!
    Attached Files Attached Files

  19. #19
    Registered User
    Join Date
    07-29-2013
    Location
    India
    MS-Off Ver
    Excel 2002
    Posts
    53

    Re: Unhiding / Hiding rows based on a different cell value

    Thank you Winon. For a beginner in macros like me, your support is very much motivating.

    With kind regards,
    gm2612

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Help with hiding or unhiding multiple ranges of rows based on cell value on another sheet
    By Jake Bierly in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-22-2013, 12:14 PM
  2. Hiding and unhiding worksheets based on a cell value from another worksheet
    By J_barber in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-05-2013, 01:02 PM
  3. [SOLVED] Hiding/Unhiding Rows Based on Dropdown Box
    By SubParLlama in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-14-2012, 12:29 PM
  4. [SOLVED] Hiding / unhiding pictures based on cell value
    By supern0va in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-14-2012, 12:00 PM
  5. Hiding Unhiding Rows based on Text condition
    By Winner_texas in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 10-11-2010, 11:54 AM

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