+ Reply to Thread
Results 1 to 3 of 3

Can a Macro hide columns by name and name a sheet based on a cell value?

  1. #1
    Valued Forum Contributor
    Join Date
    12-22-2010
    Location
    Texas
    MS-Off Ver
    Excel 2003 & Excel/Access 2007
    Posts
    438

    Can a Macro hide columns by name and name a sheet based on a cell value?

    Good morning

    I know I can write a macro to hide columns but can it hide columns with a specific name? Like in this example hide column named “field1” and “Field3”.

    I know a macro can also copy the sheet within the workbook but can it only be for one specific person? In this case I would like two other sheets that only show “John” in one sheet and “Jane” in another. Would we be able to name the sheet after the name???
    Attached Files Attached Files
    Last edited by jgomez; 09-12-2013 at 11:02 AM.

  2. #2
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,028

    Re: Can a Macro hide columns by name and name a sheet based on a cell value?

    hi,
    for the 1st question try this: select column, name it in Name Box (above column A) and then use this piece of code
    Please Login or Register  to view this content.
    Regards, John55
    If you have issues with Code I've provided, I appreciate your feedback.
    In the event Code provided resolves your issue, please mark your Thread as SOLVED.
    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

    ...enjoy -funny parrots-

  3. #3
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Can a Macro hide columns by name and name a sheet based on a cell value?

    Maybe:

    Please Login or Register  to view this content.
    And

    Please Login or Register  to view this content.

+ 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] Worksheet_Change Macro To Hide Columns Based On A Range But Only When One Cell Is Edited
    By GEANZ in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-08-2013, 07:54 PM
  2. Macro to hide columns based on a cell value
    By polcen in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 09-20-2012, 10:42 AM
  3. Macro to hide columns based on cell values in the column to be hidden
    By JCMus in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-15-2012, 06:06 PM
  4. Macro to hide sheet based on cell value within the sheet
    By a_dub_green in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 01-04-2012, 12:18 PM
  5. [SOLVED] Hide/unhide sheet macro based on cell calculation
    By Greg Fisher in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-26-2005, 05:19 PM

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