+ Reply to Thread
Results 1 to 7 of 7

hide unhide columns with selected cells change font size

  1. #1
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    hide unhide columns with selected cells change font size

    Hi
    I have recorded macro.
    What I am trying to achieve is ....
    When I select cell A2 and press command button
    Then
    - Columns C, D, E are unhidden
    -Relative cells in selected row ( in this case C2,D2,E2) change font to 12
    - When command button is pressed then C,D,E are hidden and font size goes back to 1

    similarly if i select A3 same should happen to C3,D3,E3
    Currently all is OK but when I press command button it all happens with the entire column C,D,E
    Sample book attached.
    Code is as follows:
    Please Login or Register  to view this content.
    Thanks
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    04-24-2012
    Location
    Karlstad, Sweden
    MS-Off Ver
    Excel 2016
    Posts
    232

    Re: hide unhide columns with selected cells change font size

    Try this:

    Please Login or Register  to view this content.
    1. Reply to thread and inform if suggestion was helpful or not
    2. Click on the star (=Add Reputation) if you think someone helped you
    3. Mark [SOLVED] to this thread if solution was found. (On Menu "Thread Tools" > "Mark this thread as solved")

  3. #3
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Re: hide unhide columns with selected cells change font size

    Hi Joakim N,
    Thanks
    It works fine. Great.
    Small issue:
    previously enlarged fonts in other cells remain enlarged and do not return to their original small size.
    Any suggestions please.
    Many thanks
    Kind regards

  4. #4
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Re: hide unhide columns with selected cells change font size

    Hi again,
    It works perfect now. You got to stick to one row at a time.
    If you select one row and font is enlarged, and now if you now go to another row, the previously selected font remains enlarged.

    is there any way we can say at the end of sub, that all fonts not in selected row / range go to size 2

    Great solution by you.
    Thanks
    Kind regards

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

    Re: hide unhide columns with selected cells change font size

    FWIW:

    Please Login or Register  to view this content.
    Last edited by JOHN H. DAVIS; 04-21-2014 at 09:38 AM.

  6. #6
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Re: hide unhide columns with selected cells change font size

    Hi John H Davis,
    Really thanks.
    issue is resolved perfectly.
    Thanks again
    Kind regards

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

    Re: hide unhide columns with selected cells change font size

    You're welcome. Glad to help out and thanks for the feedback.

+ 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. Hide and unhide rows will change the color fill of the specified cells
    By Rocky2013 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-12-2013, 10:03 PM
  2. [SOLVED] Change default font and font size on COMMENTS in cells
    By Thistledown in forum Excel General
    Replies: 4
    Last Post: 11-23-2012, 09:26 AM
  3. Hide and unhide columns based on value of 0 or 1 (respectively) in cells G1:LG1
    By cplawren in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-22-2012, 01:58 AM
  4. macro to white out (to change a font in selected cells)
    By Abi in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-03-2005, 05:06 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