+ Reply to Thread
Results 1 to 16 of 16

Hide Blank rows

Hybrid View

Charity Hide Blank rows 11-20-2006, 05:00 PM
Bryan Hessey Hi, To hide rows, select... 11-20-2006, 06:17 PM
carsto if you're using WORD to... 11-20-2006, 06:24 PM
iturnrocks Heres how I do it, because I... 11-20-2006, 06:28 PM
Bryan Hessey iturnrocks, I hope that you... 11-20-2006, 06:34 PM
  1. #1
    Registered User
    Join Date
    11-20-2006
    Posts
    5

    Hide Blank rows

    I have to make a list of people who will be getting charity baskets from our organization

    I first list people who are nominated on sheet 1
    on sheet 2 I mark with an "X" in column A if they will not be getting a basket

    Sheet 3 picks up anyone who does not have an X in column A
    The rows with in "X" on sheet 2 will be blank on sheet 3 (actually have a formula putting "" into any cell with an "X" in column A of sheet 2

    On sheet 4 I want those blank rows to be hidden

    I know, I probably have unnecessary sheets on this spreadsheet, but I want each step to be documented as to what occured.

    Is there anyway to do this?

    I will be making mailing labels from the list---either I hide the blank rows, or get quite a few blank mailing labels after I merge

    thank you for your help

  2. #2
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by Charity
    I have to make a list of people who will be getting charity baskets from our organization

    I first list people who are nominated on sheet 1
    on sheet 2 I mark with an "X" in column A if they will not be getting a basket

    Sheet 3 picks up anyone who does not have an X in column A
    The rows with in "X" on sheet 2 will be blank on sheet 3 (actually have a formula putting "" into any cell with an "X" in column A of sheet 2

    On sheet 4 I want those blank rows to be hidden

    I know, I probably have unnecessary sheets on this spreadsheet, but I want each step to be documented as to what occured.

    Is there anyway to do this?

    I will be making mailing labels from the list---either I hide the blank rows, or get quite a few blank mailing labels after I merge

    thank you for your help
    Hi,

    To hide rows, select Tools, Macros, Record new macro, select any cell, then Stop Recording.
    Tools Macro, Macros, select the macro and Edit.

    Replace what is there with
    Sub Macro1()
    ' Hide Rows
    Dim iRow As Long
    Dim iLastRow As Integer
    With ActiveSheet
    iLastRow = ActiveSheet.Range("A65536").End(xlUp).Row
    For iRow = iLastRow To 1 Step -1
        If .Cells(iRow, 1) = "" Then
            .Rows(iRow).EntireRow.Hidden = True
        End If
        Next
        End With
    End Sub
    Save your work, then run the macro.

    hth
    ---
    Si fractum non sit, noli id reficere.

  3. #3
    Forum Contributor
    Join Date
    08-14-2006
    Location
    USA
    MS-Off Ver
    2019
    Posts
    686
    if you're using WORD to complete your mail merge you don't need to hide the blank rows.
    You must have a heading on the column containing the "X"
    in the Mail Merge Helper window Step 3, just click on the Query Options and select the Field Heading "X" equals to X

    this is helpful for example if you have large mailings and need to sort your mail by location. You can mail merge all where the zip code equals your own, print labels and then merge all where the zip code is not equal to your own and print.

  4. #4
    Forum Contributor
    Join Date
    08-08-2006
    Posts
    203
    Heres how I do it, because I dont know macros yet.
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by iturnrocks
    Heres how I do it, because I dont know macros yet.
    iturnrocks, I hope that you never get more than 255 consecutive zeros (or that the data isn't more than 1 column wide)


    ---

  6. #6
    Forum Contributor
    Join Date
    08-08-2006
    Posts
    203
    Quote Originally Posted by Bryan Hessey
    iturnrocks, I hope that you never get more than 255 consecutive zeros (or that the data isn't more than 1 column wide)


    ---
    I have- when that happens I drop down to row 1000 or start a new sheet. But now that I see the macro, I will attempt to learn somthing new. I imagine my 32mb spreadsheet will decrease in size once I figure it out.

+ 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