+ Reply to Thread
Results 1 to 5 of 5

Hide unspecified rows in another worksheet based on a cell value

  1. #1
    Registered User
    Join Date
    01-06-2016
    Location
    Zug, Switzerland
    MS-Off Ver
    2010
    Posts
    3

    Hide unspecified rows in another worksheet based on a cell value

    Hello

    I want to hide rows using VBA with this scenario:

    In Worksheet 1, Cell A1 = Apple & Cell B1 = No ---> Then in Worksheet 2, All rows containing Apple in Column A will be hidden
    In Worksheet 1, Cell A2 = Banana & Cell B2 = No ---> Then in Worksheet 2, All rows containing Banana in Column A will be hidden

    If the value of cells B1 and B2 are Yes in Worksheet 1, then the rows should not be hidden. The range of the rows is unspecified and can change from one day to another.

    I've searched everywhere in this forum but haven't seen yet a similar scenario. Many thanks in advance for any help!
    Last edited by Ego14; 01-06-2016 at 10:51 AM.

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Hide unspecified rows in another worksheet based on a cell value

    Please Login or Register  to view this content.
    If you are happy with my response please click the * in the lower left of my post.

  3. #3
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: Hide unspecified rows in another worksheet based on a cell value

    Another approach. Again, change the sheet names in the code to match your actual sheet names.

    Please Login or Register  to view this content.
    I'm interested in starting a career working with VBA, if anyone knows of any opportunities!

  4. #4
    Registered User
    Join Date
    01-06-2016
    Location
    Zug, Switzerland
    MS-Off Ver
    2010
    Posts
    3

    Re: Hide unspecified rows in another worksheet based on a cell value

    Hi stnkynts

    I tried using your code, but I'm afraid I'm not sure how to use the "Dim i As Long", so the code wasn't running properly. Thank you so much for the help though!

  5. #5
    Registered User
    Join Date
    01-06-2016
    Location
    Zug, Switzerland
    MS-Off Ver
    2010
    Posts
    3

    Re: Hide unspecified rows in another worksheet based on a cell value

    Quote Originally Posted by walruseggman View Post
    Another approach. Again, change the sheet names in the code to match your actual sheet names.

    Please Login or Register  to view this content.
    Hi walruseggman,

    Thank you so much for the code!

    Not only did it work perfectly, I was able to make several iterations and tweaks to be able to use it based on how I needed it (the apple and bananas were just the simplified version of my scenario)

+ 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. Auto-populate a worksheet from multiple worksheets, based on unspecified dates.
    By colinirving99 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-19-2014, 03:12 PM
  2. Delete & Hide Rows in a Worksheet based on the Value of a Cell in another Worksheet
    By lhickerson in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-12-2014, 09:53 AM
  3. Macro to hide rows on a worksheet, based on a cell's value on another worksheet.
    By buttercup116 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-29-2014, 10:47 AM
  4. Hide rows on another worksheet based on value in that row
    By ahtigers10 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-04-2014, 02:55 PM
  5. Replies: 4
    Last Post: 05-08-2012, 10:28 AM
  6. Hide/Unhide Rows in One Worksheet Based on Values in Cells in Another Worksheet
    By xponent_es in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-27-2011, 03:26 PM
  7. VBA to hide rows based on cell value in another worksheet
    By jamesstorx in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-30-2010, 05:07 PM

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