Results 1 to 9 of 9

Auto Filter by Row Number

Threaded View

  1. #2
    Valued Forum Contributor
    Join Date
    01-16-2012
    Location
    England
    MS-Off Ver
    MS 365 Version 2501 64-bit
    Posts
    1,465

    Re: Auto Filter by Row Number

    Just hide the rows? This hides all the Used rows, and makes just row 5 visible.

    If you want to count or sum or work with the data in the Visible row(s), extend the Macro to work on Visible Rows only.

    [Code]
    Option Explicit
    Dim f As Long

    Sub hiderows()

    'Find last row in sheet

    With Sheet1
    f = .Cells(.Rows.Count, "A").End(xlUp).Row
    If f < 2 Then f = 2

    .Rows("2:" & f).EntireRow.Hidden = True
    .Rows("5:5").EntireRow.Hidden = False

    End With

    End Sub
    Attached Files Attached Files
    Last edited by Ochimus; 12-14-2020 at 02:50 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 4
    Last Post: 06-08-2018, 01:54 PM
  2. [SOLVED] count number and blanks and auto filter
    By gondal in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 08-05-2016, 06:52 AM
  3. Auto Filter and copy the specified number of rows into another sheet.
    By kittu55 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-09-2015, 11:01 AM
  4. Auto Filter - Number of records
    By Walldorc in forum Excel General
    Replies: 2
    Last Post: 12-17-2008, 09:06 AM
  5. Sort, Filter and then auto number sequentially
    By tony0710 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-25-2008, 02:20 PM
  6. [SOLVED] Applying auto-filter with large number of rows
    By Hari in forum Excel General
    Replies: 3
    Last Post: 01-29-2006, 11:10 PM
  7. [SOLVED] Auto filter not displaying number of results in status bar.
    By Alex Lush in forum Excel General
    Replies: 3
    Last Post: 08-30-2005, 02:05 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