+ Reply to Thread
Results 1 to 9 of 9

Hide/Unhide columns based on the value of the cell help!

  1. #1
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Hide/Unhide columns based on the value of the cell help!

    Hi,
    I want to hide/unhide columns for different standard divisions. The code is not giving error but not performing the action require. The divisions are from ‘A to j’ and the hide/unhide columns varies from division to division.

    Please suggest me a correction in the code.

    Thanking you.
    Attached Files Attached Files
    Sincerely,

    mso3

  2. #2
    Valued Forum Contributor
    Join Date
    06-17-2009
    Location
    Chennai,India
    MS-Off Ver
    Excel 2003,excel 2007
    Posts
    678

    Re: Hide/Unhide columns based on the value of the cell help!

    is something wrong with your attachment. please check
    I am not an expert. better solutions may be available
    [email protected]

  3. #3
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Hide/Unhide columns based on the value of the cell help!

    you have to put your code in sheet Information module, not in sheet1 module
    If solved remember to mark Thread as solved

  4. #4
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Re: Hide/Unhide columns based on the value of the cell help!

    Hi patel45,
    Thank you. Now I have inserted the code in the sheet module of information sheet. It's working fine without error but no any action of hiding the columns on sheet1 range 'g:r and t:z'.

    If the value in cell 'b1' information sheet changes then I have to hide different columns as per the division . It varies from division to division.

    Please see the modified file.

    Thank you.
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Re: Hide/Unhide columns based on the value of the cell help!

    Hi venkat1926,
    Thank you for suggestion. I have changed the file. Please see the code and suggest me a solution why it's not performing the action of hiding the columns on sheet1.

    Thank you.

  6. #6
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Hide/Unhide columns based on the value of the cell help!

    I'm sorry, but i can not understand your code and your goal

  7. #7
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Re: Hide/Unhide columns based on the value of the cell help!

    At present I hide the columns manually after changing the value in cell $b$1 on the information sheet. The goal of this code is to perform this action immediately after changing the value in cell $b$1 on sheet information automatically and save time and manual work.
    I want to hide the columns range 'g:r and t:z' if the cell on information sheet cell $b$1 contains a text 'Std. 9 A'. Likewise if the cell $b$1 on information sheet contains a text 'Std 9 B' then hide columns range 'aa:ap' and so on till he last division 'J'. The hiding columns varies from division to division.

    Just suggest me a code for Std 9 A and Std. 9 B. I will do the rest divisions.

    I want to perform the action immediately after changing value in cell $b$1 on information sheet.

    hope this much clearification will help you to modify the code to meet my requirement.

    Thanking you.

  8. #8
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Hide/Unhide columns based on the value of the cell help!

    Hi, mso3,

    maybe try
    Please Login or Register  to view this content.
    Code goes behind sheet Information.

    Ciao,
    Hoilger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  9. #9
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Re: Hide/Unhide columns based on the value of the cell help!

    Hi Holger,

    Good morning!

    Excellent! It's working absolutely fine as per my requirement.

    I appreciate you for the kind help to meet my requirement to complete my project.

    Thank you and have a nice day.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Hide/Unhide Columns based on Cell Value
    By dberg in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 07-26-2013, 03:36 PM
  2. [SOLVED] Checkbox VBA - Hide/Unhide Rows and/or Columns based on cell values
    By gravy258 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-21-2013, 05:39 PM
  3. Hide/Unhide columns based on value of a cell
    By redrackham in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-24-2011, 09:14 AM
  4. Hide & Unhide columns based on a cell value
    By DaveNUFC in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-21-2010, 09:40 AM
  5. Hide or Unhide certain columns based on a cell value
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-10-2006, 01:04 PM

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