+ Reply to Thread
Results 1 to 7 of 7

Hide cells where a formula returns a zero value

  1. #1
    Registered User
    Join Date
    06-24-2013
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    13

    Hide cells where a formula returns a zero value

    Hi i would like my sheet to hide cells where a formula returns a zero value.. But i also need it to unhide should the formula later return an actual value

    it would need to apply from a10-i10, then continue downwards to the end of the sheet

    thanks

  2. #2
    Valued Forum Contributor
    Join Date
    07-27-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    826

    Re: Hide cells where a formula returns a zero value

    DUPLICATE POST. Original is here: http://www.excelforum.com/excel-form...ero-value.html

    Shan1monkey, please do not duplicate posts - not only is it against the forum rules, it can result in volunteers wasting their time answering a question that has already been answered.
    Brendan.


    __________________________________________________________________________________________________
    Things to consider:

    1) You can thank any poster by clicking the * at the left of a helpful post.
    2) You can help to keep the forum tidy by marking your thread as "Solved", if it has been answered to your satisfaction.
    3) Help us to help you, by uploading a sample workbook, showing the type of data you're dealing with, and clearly indicating what the results should be.

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Hide cells where a formula returns a zero value

    You can use a custom number format to do that.

    Select the range of cells in question
    Right click>Format Cells>Number tab>Custom

    Enter this code in that little box under "Type:"...

    [=0]"";General

    OK out
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Registered User
    Join Date
    06-24-2013
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Hide cells where a formula returns a zero value

    I dont think i explained myself very well...

    I would like the whole row to be hidden if formula in column a returns nothing

    it is an if formula so if the formula criteria is not met it brings me nothing, so if nothing is brought forward i want to be able to have the row hidden automatically

    so for example something in cell a6, nothing in a7, something in a8, i want the whole of row 7 to be hidden so row numbers would read 1,2,3,4,5,6,8

    thanks

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Hide cells where a formula returns a zero value

    You'll need a VBA procedure to do what you want.

    If, after a reasonble amount time has passed (whatever that is?) and you still have not recieved a solution, try starting a new thread in the VBA Programming forum.

    Good luck!

  6. #6
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Hide cells where a formula returns a zero value

    Can't hide a cell can hide a row or a column - do you want to hide rows??

    Try this in the sheet module:

    Please Login or Register  to view this content.
    It works with the run but not by single stepping!

    Directions for running the routine(s) just supplied

    Copy the code to the clipboard

    Press ALT + F11 to open the Visual Basic Editor.

    Open a macro-enabled Workbook or save your Workbook As Macro-Enabled

    Click on the appropriate sheet

    Type "Option Explicit" then paste the code under it

    And, you should be ready to go
    Last edited by xladept; 06-25-2013 at 04:29 PM. Reason: Improvement in code
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  7. #7
    Registered User
    Join Date
    06-24-2013
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Hide cells where a formula returns a zero value

    Still can't get this to do as i want.

    Correct i do want the row to hide if the first cell of that row = 0

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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