+ Reply to Thread
Results 1 to 2 of 2

Hiding Cells dependent on value being =""

Hybrid View

  1. #1
    Registered User
    Join Date
    03-25-2013
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    21

    Question Hiding Cells dependent on value being =""

    Hi all,

    I have a report that generates onto a spreadsheet using various functions. All the functions return ("") when the cells are empty. Because the report can vary from 10-20 rows of information, up to thousands of rows - I cannot figure out how I can print (or save as PDF) the report so it just select the Cells that don't return ("").

    The good news is that the report collates all the information to the top of the list, so that the ("") only show after the information I want. So I feel that the best way to approach this is for some VBA that hides and unhides the information needed to print.

    It needs to be quick though, so I will hide cells at first. Then the VBA will look for cells that contain information and unhide them. Then it will look for any unhidden cells that contain ("") and hide them, thus bypassing the need to hide the entire spreadhseet rows.

    I only need to use column range (W20:W) to look for the ("").

    I really hope I have explained myself well enough. Hope to hear a solution soon.

    Thanks,

    Jim

  2. #2
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Hiding Cells dependent on value being =""

    Maybe this? I didn't follow your reasoning for needing to hide them all first.
    Sub HideThese()
    Dim rng As Range
    
    For Each rng In Range("W20:W" & Range("W" & Rows.Count).End(xlUp).Row)
        If rng.Value = """""" Then
            rng.EntireRow.Hidden = True
        End If
    Next rng
        
    End Sub
    Thanks,
    Solus


    Please remember the following:

    1. Use [code] code tags [/code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    Highlight the code in your post and press the # button in the toolbar.
    2. Show appreciation to those who have helped you by clicking below their posts.
    3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

    "Slow is smooth, smooth is fast."

+ 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. Replies: 5
    Last Post: 01-23-2014, 11:02 AM
  2. Replies: 4
    Last Post: 11-17-2013, 12:05 PM
  3. [SOLVED] How to USE """"" cells count """"" change font color
    By austin123456 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-09-2013, 06:14 AM
  4. [SOLVED] Data validation: allow entry into a cell if other three cells have "X", "Y" and "Z"?
    By RogerRangeRover in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-05-2013, 04:49 AM
  5. hiding/unhiding rows & columns with "+" and "-" buttons
    By shellshock in forum Excel General
    Replies: 2
    Last Post: 08-03-2005, 01:05 AM

Tags for this Thread

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