+ Reply to Thread
Results 1 to 7 of 7

Hide Rows if celld are empty

  1. #1
    Registered User
    Join Date
    11-03-2011
    Location
    zurich
    MS-Off Ver
    Excel 2003
    Posts
    4

    Hide Rows if celld are empty

    Hey Leith

    I am trying to implement your solution in one of my tools that I have to get done urgently for a project I am workin on. Would be great if you could help me solving this problem.

    I am struggeling with how you defined the end of the area of which you want to hide the rows with empty cells.

    From my point of view it's this part of the code.
    Please Login or Register  to view this content.
    Would be great if you could help me understand this definition in a way that I can apply it to my tool.

    Thank you very much in advance
    Philipp

  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: Hide row if cell is empty

    Hello Phillip,

    Welcome to the Forum!

    Since this post is solved and over 2 years old, would you start a new post. You can add a link back to this post if you like. It will help others follow the discussion.
    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-03-2011
    Location
    zurich
    MS-Off Ver
    Excel 2003
    Posts
    4

    Hide Rows if celld are empty

    Hi everyone

    I am new to the forum and glad that everyone here seems to be extremly quick helping me with my problems .

    I was searching for a solution to the question of hiding rows if a cell is empty. I need this functionality urgently for a tool i have to produce for work. Luckily I found the following thread:

    http://www.excelforum.com/excel-prog...-is-empty.html

    The solution is great but I am struggeling with how the end of the area of which you want to hide the rows with empty cells is defined.

    From my point of view it's this part of the code.

    Please Login or Register  to view this content.
    Would be great if you could help me understand this definition in a way that I can apply it to my tool.

    Thank you very much in advance
    Philipp

  4. #4
    Registered User
    Join Date
    11-03-2011
    Location
    zurich
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Hide row if cell is empty

    Thanks for the input!!!

    I republished the thread with a link to this discussion.

    Would be great to get your input so that I could implement the solution tomorrow.

    Thanks very much
    Philipp

  5. #5
    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: Hide row if cell is empty

    Hello Phillip,

    Please Login or Register  to view this content.

    The asterisk is a wild card character meaning any character found. The Find method of the Range object Rng, searches that range for any characters starting after the first character in the range.

    The argument xlPrevious starts the search backwards from the first cell in the range row by row until it finds a cell with one or characters. The search direction can be controlled to search by columns or by rows. This is controlled by the argument xlByRows.

    If the search is successful, the reference to the cell object is returned. The Row property of the range cell returns the worksheet row where the cell was found. If it fails then the special object value Nothing is returned.
    Last edited by Leith Ross; 11-03-2011 at 10:25 PM.

  6. #6
    Registered User
    Join Date
    11-03-2011
    Location
    zurich
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Hide Rows if celld are empty

    Hey Leith

    I implemented the macro and it s absolutely great. I found as well the right ways of maniuplating it to my needs. I just had a meeting today with my team today and the macro really made my tool that much easier to handle for the guys that are dealing with it.

    I just struggle with one little problem. When I want to hide the column in which I have the basics for the macro then it is not working anymore and I get the following error:

    Run-time error '91':
    Object variable or With block variable not set

    The problem seems to be in this part of the code:

    Please Login or Register  to view this content.
    Maybe Leith you can help me how to deal with this?

    As always I would be grateful for your help.

    Cheers
    Philipp

  7. #7
    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: Hide Rows if celld are empty

    Hello Phillip,

    It would easier and faster to sort this out if I had the workbook. Can you post a copy?

+ 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