+ Reply to Thread
Results 1 to 3 of 3

Macro Required - Hide columns where cell in a single column is empty

  1. #1
    Registered User
    Join Date
    08-08-2005
    Posts
    76

    Question Macro Required - Hide columns where cell in a single column is empty

    For some reason the attachments button is not working for my macbook

    I have 2 simple columns.

    COLUMN A COLUMN B
    1 FRUIT QTY
    2 Apple 2
    3 Pear 3
    4 Orange
    5 Melon 4
    6 Banana

    I want to be able to click on a button and have a macro hide rows 4 and 6 based on the fact these corresponding cells in column B is empty.

    Cell content in the QTY column is part of a formula fetching quantities and is set to return "" when QTY from another sheet returns 0.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Macro Required - Hide columns where cell in a single column is empty

    You can turn on the Data > Filter > Table (AutoFilter) and just filter column B for greater than 0.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    08-08-2005
    Posts
    76

    Re: Macro Required - Hide columns where cell in a single column is empty

    I'm trying to use part of the macro code (that hides the rows) for a print to Outlook email existing macro. Sorry for not stating this earlier.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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