Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6935245
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:04:37+00:00 2026-05-27T12:04:37+00:00

Is there a method whereby columns in Excel (2003, 2007 and/or 2010) can be

  • 0

Is there a method whereby columns in Excel (2003, 2007 and/or 2010) can be automatically shown (un-hidden) when the column to the left contains data?

Something like this:

IF column to the left contains data
THEN show column


+-----+-----+  
|  C  |  C  |     //If column1 contains data
|  O  |  O  |     //Then reveal/show (unhide) column2
|  L  |  L  |
|  U  |  U  |
|  M  |  M  |
|  N  |  N  |
|  1  |  2  |
+-----+-----+

I’m guessing that VB code is required but am unsure as to what this would be.

Further to this, is there a way to automatically show the column going by the date (first day of each month)? This is a little more complicated. For example:

FOR all dates
    IF system date = year(month.day1)  //If it is the first day of a new month
        THEN show column(month)  //Then show the corresponding column for that month
    ENDIF
ENDFOR

i.e. IF system date = 01/09/2012
     THEN show column(September)

Is this possible?

Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T12:04:37+00:00Added an answer on May 27, 2026 at 12:04 pm

    Correct, you need VBA to achieve that. Use the Worksheet_Change event which fires whenever something changes. Then, use one of the various methods to determine if a column is not empty (http://ewbi.blogs.com/develops/2006/03/determine_if_a_.html, or just google). Alternatively, if this is to slow because if fires almost all the time, you could use the Worksheet_Activate() event (an overview of all Excel events can be found here).

    If your column 7 contains data, you can unhide column 8 using MyWorksheet.Columns(“8:8”).Hidden = False.

    Your second problem can be solved in a similar way. In the Worksheet_Activate(), check if today is the first day in a month using Day(Date) = 1 (I guess it needs to take into account that the user may not be using Excel this day, so the code should be a little more complex) and show that column using MyWorksheet.Columns(“12:12”).Hidden = False (or whichever it is) for December 1st.

    All this code assumes that the columns are already there, just hidden.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there some method to use for Assert and Verify. I can't find any
Is there any method in C can find a text within another text? For
Is there any sort of support in Eclipse whereby I can programatically generate a
Is there a method of accessing an Exchange server that does not have IMAP
Is there a method to get all of the .aspx files in my website?
Is there any method? My computer is AMD64. ::std::string str; BOOL loadU(const wchar_t* lpszPathName,
Is there any method to generate MD5 hash of a string in Java?
Is there a method built in to NSString that tokenizes the string and searches
Is there a method available for copying a section out of a shape to
Is there a method to launch an Internet Explorer window from a desktop Icon

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.