Results 1 to 4 of 4

VBa to hide rows based on multiple criteria

Threaded View

Sintek VBa to hide rows based on... 09-22-2016, 07:54 AM
Mumps1 Re: VBa to hide rows based on... 09-22-2016, 09:44 AM
Sintek Re: VBa to hide rows based on... 09-22-2016, 10:06 AM
Mumps1 Re: VBa to hide rows based on... 09-22-2016, 10:07 AM
  1. #1
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    14,958

    VBa to hide rows based on multiple criteria

    Hi All

    I have attached my sample file. I am looking to have code hide rows before printing.
    The criteria to be met is as follows: If the time in Column A < Current time which is in D4 And the value in Column D is<= 0.00 then
    Hide those rows. I have this for now
    Sub RowHide()
    Application.ScreenUpdating = False
        Dim cell As Range
        Dim cell2 As Range
        Worksheets("HSales").Activate
        For Each cell In Sheets("HSales").Range("a8:A17")
            
                If cell.Value > Range("D4")  Then
                    cell.EntireRow.Hidden = True
                
            End If
        Next
       Application.ScreenUpdating = True
    End Sub
    Attached Files Attached Files

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 Cell Criteria
    By agroeneveld in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-19-2016, 12:02 PM
  2. VBA to hide rows based on different cells with different criteria
    By Natstin in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-30-2016, 07:07 AM
  3. [SOLVED] Macro to hide rows (Auto filter) based on multiple criteria
    By pauldaddyadams in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-03-2014, 07:36 AM
  4. [SOLVED] hide rows, based criteria table
    By elsg in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-03-2014, 05:35 PM
  5. Excel Macro/ VBA that can hide rows based on multiple criteria
    By hody in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-10-2012, 09:04 AM
  6. Hide/Unhide Rows based on Criteria
    By Phillycheese5 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-04-2010, 02:11 PM
  7. Hide Rows in Range based on criteria
    By Hot Soup in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-07-2009, 10:16 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