+ Reply to Thread
Results 1 to 2 of 2

Macro to Hide Columns Where Sum is Zero

  1. #1
    Registered User
    Join Date
    02-21-2013
    Location
    seattle
    MS-Off Ver
    Excel 2010
    Posts
    1

    Macro to Hide Columns Where Sum is Zero

    I have a spreadsheet where I want to be able to create a macro button to hide a column when the sum of a row is zero.

    I tried following the code to a similar question posted at (http://www.excelforum.com/excel-prog...itionally.html), but I couldn't get the code to work after trying to modify it to my specifications.

    Hopefully this attachment works (first time poster), it is just one of the tabs I would like to apply it on.
    Attachment 215817

    What I would like to be able to do is click a macro to hide a column from E through AO to be hidden if the value in Row 31 is zero to clean the sheet up.

    If anyone has any incite or could build off the related post, I would really appreciate the help.

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Macro to Hide Columns Where Sum is Zero

    This macro should work for you.
    It hides all columns with a 0 in row 31.
    Please Login or Register  to view this content.
    I also programmed a button to unhide all columns from E to AO.
    Regards
    Attached Files Attached Files
    Last edited by p24leclerc; 02-21-2013 at 10:22 PM.
    Pierre Leclerc
    _______________________________________________________

    If you like the help you got,
    Click on the STAR "Add reputation" icon at the bottom.

+ 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