+ Reply to Thread
Results 1 to 3 of 3

Macro Hide "0" Rows/Columns

  1. #1
    Registered User
    Join Date
    04-10-2020
    Location
    Michigan
    MS-Off Ver
    Excel for Office 365 (16.0.11929.20618) 64-Bit
    Posts
    3

    Macro Hide "0" Rows/Columns

    Good Morning/Afternoon/Evening Everyone,

    I am working making a material list in workbook, and i want to hide all $0.00 in the sheet, based on Column "F"

    Here is what i have, right now.

    Sub HideZeroRows()
    Dim CheckNum As Long, LastRow As Long
    LastRow = Range("F65536").End(xlUp).Row
    For CheckNum = LastRow To 2 Step -1
    If Cells(CheckNum, 1).Value = 0 Then Cells(CheckNum, 1).EntireRow.Hidden = True
    Next CheckNum
    End Sub

    Running into the issues that it isnt hiding cells that are based off the criteria F column. It is only hiding "0" cells in the sheet and not $0.00 cells.

    Any help is greatly appreciated!

    Thanks

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,164

    Re: Macro Hide "0" Rows/Columns

    Hi ENI

    Zero the number and Zero Dollars and Cents are exactly the same number, just formatted differently. Both have the Value = 0. If you could supply a sample workbook it might help us with your problem. See the instructions in yellow at the top of any screen.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Valued Forum Contributor
    Join Date
    08-03-2012
    Location
    Newcastle
    MS-Off Ver
    Excel 2007, 2010, 2013, 2016, Office 365
    Posts
    467

    Re: Macro Hide "0" Rows/Columns

    Hi

    You need to specify the correct column for your test.
    1=column A

    Try this
    Please Login or Register  to view this content.
    zeddy
    PS everyone is important

+ 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: 1
    Last Post: 06-27-2017, 08:27 PM
  2. Replies: 1
    Last Post: 09-21-2013, 03:18 AM
  3. Hide rows based on value "0" in multiple columns
    By willieh in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-18-2012, 06:05 AM
  4. Excel 2002 "Protect Sheet", but allow "Hide Columns"?
    By VP Safe in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  5. Excel 2002 "Protect Sheet", but allow "Hide Columns"?
    By VP Safe in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 01:05 AM
  6. [SOLVED] Excel 2002 "Protect Sheet", but allow "Hide Columns"?
    By VP Safe in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10: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