+ Reply to Thread
Results 1 to 5 of 5

Auto Hide/Unhide Based on Results of IF Formula Pulling From Another Sheet

  1. #1
    Registered User
    Join Date
    11-30-2012
    Location
    Wisconsin
    MS-Off Ver
    Excel 2003
    Posts
    6

    Auto Hide/Unhide Based on Results of IF Formula Pulling From Another Sheet

    Hi all,

    I am really new to VB, I basically know nothing about it. I have a worksheet (we'll call it 'Analysis') that is pulling data from another worksheet (we'll call it 'Dump') in the same workbook that is a dump of exported data from another program. Basically, the exported data can have anywhere from 1-22 columns of data, and I want the 'Analysis' sheet to automatically hide the columns that won't have data if the number of columns of data in the 'Dump' is less than the maximum of 22, which it almost always will be.

    Right now, my sheet works out so that I could make the showing and hiding contingent on row 13, columns B through W. That column will either return the name of the column heading in 'DUMP', or it will return a dash. I want columns that don't return a dash to show, and columns that do return a dash to hide. This is the formula that I have in row 13.

    =IF(DUMP!F9="","-",DUMP!F9)

    I don't know if this makes a difference, but the columns will always populate in order, so if I have two columns, they will always be B and C. Three columns will always be B, C, and D. Etc.

    Is there a way for me to do this? Any help is appreciated!

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,525

    Re: Auto Hide/Unhide Based on Results of IF Formula Pulling From Another Sheet

    Attach a sample workbook.

    When you are in Advanced reply, click on the paperclip to open the upload window.

    View Pic

  3. #3
    Registered User
    Join Date
    11-30-2012
    Location
    Wisconsin
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Auto Hide/Unhide Based on Results of IF Formula Pulling From Another Sheet

    I can't post a sample workbook because is contains confidential information and it would be time consuming to recreate it without that information. Hopefully this screenshot will be enough, if not I can try to create a sample. In this case, I would want columns D - W to hide automatically because row 13 returns a "-" in those columns. Thank you for the help!

    ss2.jpg

  4. #4
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,525

    Re: Auto Hide/Unhide Based on Results of IF Formula Pulling From Another Sheet

    Hi, sorry, the site was unavailable to me for 5 days.
    Even a screen shot would require somebody to recreate the sheet so they could work on getting you an answer.

    When you are asked to supply a sample workbook, that is what it is. A sample.
    It should show how your layout is and would include "Phoney" data

  5. #5
    Registered User
    Join Date
    11-30-2012
    Location
    Wisconsin
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Auto Hide/Unhide Based on Results of IF Formula Pulling From Another Sheet

    Quote Originally Posted by davesexcel View Post
    Hi, sorry, the site was unavailable to me for 5 days.
    Even a screen shot would require somebody to recreate the sheet so they could work on getting you an answer.

    When you are asked to supply a sample workbook, that is what it is. A sample.
    It should show how your layout is and would include "Phoney" data
    No problem.

    Ok, I will work on creating a sample, I just didn't know if it could be determined without that. I will try to have it done tomorrow. Can I PM it to you?

+ 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