+ Reply to Thread
Results 1 to 8 of 8

Conditionally hide rows in Excel

  1. #1
    Registered User
    Join Date
    03-23-2008
    Posts
    8

    Conditionally hide rows in Excel

    Hello. I am working on a workbook where I would like to conditionally hide rows. I know this needs to be done with VBA, however, I have never used VB period. I have rather fluent in C++, Java, PHP, Perl, etc, however, I have never messed with VB or VBA.

    Basically I want to make a conditional statement like
    Please Login or Register  to view this content.
    Does someone know of a VBA script that will accomplish this? I appreciate any help you can give me.
    Last edited by dvlchd3; 10-14-2008 at 05:36 PM.

  2. #2
    Forum Contributor
    Join Date
    12-19-2006
    Posts
    113
    Hi dvlchd3,

    Try something like

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    03-23-2008
    Posts
    8
    Remember, I have no idea what I'm doing in VBA. I have done a few quick tutorials, however, I really still have no idea how to use it.

    Here is what I want to do. I have created a template that dependently shows or hides content based on the date that is inputed in the first worksheet. Every other sheet in the workbook is dependent on this date. After the template is turned into an excel file, I want the macro to go through EVERY worksheet, and check to see if any Rows in the A column have blank data, if they do, I need to hide that row. The catch is, the range to search through varies from worksheet to worksheet.

    Is this even possible?
    Last edited by dvlchd3; 10-09-2008 at 10:31 PM.

  4. #4
    Registered User
    Join Date
    03-23-2008
    Posts
    8
    Quote Originally Posted by dvlchd3 View Post
    Remember, I have no idea what I'm doing in VBA. I have done a few quick tutorials, however, I really still have no idea how to use it.

    Here is what I want to do. I have created a template that dependently shows or hides content based on the date that is inputed in the first worksheet. Every other sheet in the workbook is dependent on this date. After the template is turned into an excel file, I want the macro to go through EVERY worksheet, and check to see if any Rows in the A column have blank data, if they do, I need to hide that row. The catch is, the range to search through varies from worksheet to worksheet.

    Is this even possible?
    Does anyone have a possible solution?

  5. #5
    Forum Contributor
    Join Date
    12-19-2006
    Posts
    113
    Hi dvlchd3,

    Check the attached file and see if it is what you want...
    My english is poor and sometimes I don.t understand what people want
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    03-23-2008
    Posts
    8
    This is not really what I want. Let me just start over my explanation, because I believe it has changed slightly since I started this thread. I have become alittle more familiar with VBA, so you don't have to treat me like a baby first learning the language, lol.

    Anyway, I have written a macro (below) to run when the template file is opened. After the information is entered, and the workbook has updated based on the entries from the user. I need to search the ENTIRE workbook (all 26 sheets) for any cells in the A column that contain the word "hide" [without the quotes], and hide that row.

    Here is what I have started as the macro to do this task. I will explain the problem after the code:

    Please Login or Register  to view this content.
    The problem I am encountering, is it seems to sit and do ALOT of stuff after the information has been entered. The screen flickers for a good 1-2 minutes, however, it only hides the rows that are on sheet 1.

    I also assume there is a much easier way to search everysheet in a workbook besides selecting each worksheet individually. This makes the code extremely long. Does anyone have a solution!?!?

    I'm really starting to get frusturated, and think Microsoft needs to switch to a much newer, more widely used lanuage like C or C++, or something, just not Basic which has been around for how long?? and is how inefficient as compared to a lanuage like C?!?!? I apologize for the wild tangent I just went through, however, this is the pain I feel when trying to push my way through this annoying lanugage that is a form of a lanuage that has been around since 1964!

    Thanks for any help anyone can give me! I really appreciate the community here, and there seems to be a lot of people that have a lot of experience with this stuff, and they don't mind taking the time out of their busy schedules to help us newbies...Thank you!

    DAN

  7. #7
    Forum Contributor
    Join Date
    12-19-2006
    Posts
    113
    Hi dvlchd3,

    Check the attached file and see if we are near of what you want...
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    03-23-2008
    Posts
    8
    Quote Originally Posted by Jokacave View Post
    Hi dvlchd3,

    Check the attached file and see if we are near of what you want...
    Yes, thank you very much for your help!

+ 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. Hide Rows based on dropdown selection...
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-27-2008, 04:09 PM
  2. Linking from Excel to Word - adding more rows in Excel
    By friday13th in forum Excel General
    Replies: 0
    Last Post: 04-18-2008, 05:54 AM
  3. Sort excel rows by data within url information
    By jfeitlinger in forum Excel General
    Replies: 1
    Last Post: 02-11-2008, 02:24 PM
  4. Excel 2007 opening new worksheet with over 400,000 rows
    By EBrant in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 07-20-2007, 08:47 AM
  5. Hide and Unhide Rows
    By windme in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-04-2006, 03:42 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