+ Reply to Thread
Results 1 to 4 of 4

Hiding/un-hiding non-specific rows and specific columns

  1. #1
    Registered User
    Join Date
    06-12-2008
    Posts
    5

    Hiding/un-hiding non-specific rows and specific columns

    I read from a previous thread on this site that you were all able to help a non-programmer accountant set up a spreadsheet macro, and I'm hoping that you can do the same for this non-programmer researcher.

    Essentially, I'm trying to write separate macros that would do the following:

    1) 1st macro: If a specific cell in a column is blank, then that entire row will be hidden
    2) 2nd macro: Automatically hide pre-specified columns regardless of whether the cells in them are blank
    3) 3rd macro: Automatically un-hide ALL rows and columns in a spreadsheet that were previously hidden from macros 1 & 2

    My progress with the above has been complicated by the fact that I do not know how to write Macros AT ALL!!! I've been trying to teach myself to write very basic macros as a building block in creating the above, but as you've probably already guessed, the result is that I've been banging my head against my desk trying to figure this all out.

    Any help anyone could offer would be greatly appreciated.

  2. #2
    Forum Contributor
    Join Date
    04-21-2007
    Location
    Lima, Peru
    MS-Off Ver
    2000, 2007, 2010
    Posts
    674

    Hiding Columns

    Hi

    The following is a simple example of what you want

    Please Login or Register  to view this content.
    A good way to progress further is to use Excel's Macro recorder, from the Visual Basic Toolbar work through your requuirements step by step and then look at the code it produces and adapt it to suit what you are doing.

    Regards

    Jeff

  3. #3
    Registered User
    Join Date
    06-12-2008
    Posts
    5
    Wow, you make this look so easy....

    Looking back at my original message, I realize that I worded poorly what I was looking for in the first macro. What I'm actually looking to do is for the entire spreadsheet to be scanned, and if any cell in, say, column L is blank, then that cell's corresponding row would be hidden. Every row in the spreadsheet would be checked in this manner. Any suggestions on how I could achieve this?

    The other two macros you wrote worked PERFECTLY for what I was looking to do, BTW.

  4. #4
    Registered User
    Join Date
    06-12-2008
    Posts
    5
    Anyone, if you know of how I can write a macro that will, for example, hide a row if the column L in that row is blank (or if column L has the text "No" in it), and leaves unhidden any row if its column L has "Yes" in it, a reply would be GREATLY appreciated. I've been trying to experiment with this on my own with colossal failures resulting.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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