+ Reply to Thread
Results 1 to 2 of 2

How to Hide Rows that are blank but still have formulas

Hybrid View

DaBestEva How to Hide Rows that are... 10-20-2020, 01:17 PM
Aardigspook Re: How to Hide Rows that are... 10-20-2020, 03:11 PM
  1. #1
    Registered User
    Join Date
    09-09-2020
    Location
    Ohio, USA
    MS-Off Ver
    Version 1908
    Posts
    35

    How to Hide Rows that are blank but still have formulas

    Is there any way to select all rows that are blank, but contain formulas in a given range. For example, rows 5-10 don't have any displayed values, but all the cells have formulas, is there any way to select them all. I am trying to record a macro to hide all the cells with that characteristic

  2. #2
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: How to Hide Rows that are blank but still have formulas

    Instead of hiding them, would you be happy to just filter them out?

    Apply a filter to your heading row (I assume you have a heading row - if not, then you'll need to create one) by clicking the 'Filter' button in the 'Sort & Filter' section on the 'Data' tab of the ribbon.
    You'll see drop-down arrows appear in each cell of the header row.
    Click one of them and de-select 'Blanks' then click OK.


    Alternatively, if you don't want to use the filter, try this macro:
    Sub Hide_me()
    Dim LastRow As Long, x As Long
    LastRow = Cells(Cells.Rows.Count, "A").End(xlUp).Row
    For x = LastRow To 1 Step -1
        If Cells(x, 1).Value = "" Then
            Rows(x).Hidden = True
        End If
    Next
    End Sub
    It's from this Microsoft Community page:
    https://answers.microsoft.com/en-us/...9-a25ecc908737

    Note that it uses Column A as the check column - if your data doesn't use col A, then change the "A" to another appropriate column letter.
    Last edited by Aardigspook; 10-20-2020 at 03:14 PM.
    Regards,
    Aardigspook

    I recently started a new job so am a bit busy and may not reply quickly. Sorry - it's not personal - I will reply eventually.
    If your problem is solved, please go to 'Thread Tools' above your first post and 'Mark this Thread as Solved'.
    If you use commas as your decimal separator (1,23 instead of 1.23) then please replace commas with semi-colons in your formulae.
    You don't need to give me rep if I helped, but a thank-you is nice.

+ 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. Macro to loop through column, if blank blank cells then hide rows
    By stein7 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-25-2019, 01:24 PM
  2. Hide empty formulas with blank cells
    By shawn.h1988 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-05-2018, 02:20 PM
  3. [SOLVED] Macro for Hide blank rows and Unhide the rows with cells
    By Neilesh Kumar in forum Excel General
    Replies: 4
    Last Post: 04-12-2017, 06:06 AM
  4. Hide rows for blank Cells when there is another blank cell below
    By bilich in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-16-2016, 08:29 PM
  5. Hide Blank Rows
    By divamarsh in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 10-06-2014, 06:20 PM
  6. [SOLVED] Remove blank rows that aren't really blank (contain unused formulas)
    By painterartist in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-02-2014, 02:01 PM
  7. Hide Blank rows
    By Charity in forum Excel General
    Replies: 15
    Last Post: 11-23-2006, 08:20 AM

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