+ Reply to Thread
Results 1 to 6 of 6

Unhide Cells Macro

  1. #1
    Registered User
    Join Date
    02-17-2010
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    13

    Unhide Cells Macro

    Hi All,

    I am looking for a macro to unhide a set of cells within different sheets in the same workbook. Basically, I would like to see the next cell that is hidden to be unhide (if that makes sense).

    I have attached the sheet. For example, on the "games" sheet, I would like to unhide column I, then hide the rest of the columns until O. Next month, I will want to unhide column J and so on, for each month.

    The other sheets have a similar situation, the columns may be in different places, like I have shown in the sheet.

    Thanks for all the help!
    Attached Files Attached Files

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

    Re: Unhide Cells Macro

    Hi,
    I think you really wanted to unhide the first hidden column, based on your worksheet.
    I put the code below on Ctrl+U so you could do it with a keystroke while on any worksheet.
    The code is:
    Please Login or Register  to view this content.
    See the attached and try it to see if it is what you were looking for.
    Attached Files Attached Files

  3. #3
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,963

    Re: Unhide Cells Macro

    The code below must be pasted in the Thisworkbook Module. It will automatically unhide the current month's column upon tab selection.
    NOTE: It requires that full month names (no abbreviations) be in first row of each sheet.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Ben Van Johnson

  4. #4
    Registered User
    Join Date
    02-17-2010
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: Unhide Cells Macro

    Hi, that first macro keeps giving me an error every time I open another sheet within the workbook.

    The second macro I cannot get to run without a sub name.

    Is there any way I can get the first macro to work on all worksheets with a keystroke.

    Thanks,
    Ben

  5. #5
    Registered User
    Join Date
    02-17-2010
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: Unhide Cells Macro

    Ok, I got the first macro to work. Can someone create a loop so I can run that macro across all sheets?

    I tried and failed.

  6. #6
    Registered User
    Join Date
    02-17-2010
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: Unhide Cells Macro

    Also, I would like to start the unhide macro from a specific column. I can input this manually into the macro if someone can write it for the different sheets.

+ 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