+ Reply to Thread
Results 1 to 5 of 5

centre across selection while hiding columns

  1. #1
    Registered User
    Join Date
    01-08-2015
    Location
    Australia
    MS-Off Ver
    Mac 2011
    Posts
    75

    centre across selection while hiding columns

    Hi,

    I'm creating a spreadsheet for multiple users. For the headings I've tried to use centre across selection. I run into a problem when I need to hide columns for some users.

    In the first image is how it looks with all columns visible.

    Screen Shot 2021-12-29 at 8.14.35 am.png

    In the second image it shows when columns U and V are hidden.

    Screen Shot 2021-12-29 at 8.15.01 am.png

    The heading Words their way should appear over the yellow columns only. Writing Moderation should appear over the green column but it doesn't as the text is held in V2.

    Is there a workaround for this?

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,090

    Re: centre across selection while hiding columns

    Been here before recently with someone else. Don't use Merged Cells, or Center Across. Just put the text in the leftmost cell of the header range and use a largeish font. It will flow into neighbouring cells. Make the background colour whatever is appropriate and it will have a similar effect to Centring Across.

    If you want anyone to test potential solutions, don't post pictures (at least, not on their own), post ansample workbook.

    In this case, it would make sense to link back to the previous thread for background.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    01-08-2015
    Location
    Australia
    MS-Off Ver
    Mac 2011
    Posts
    75

    Re: centre across selection while hiding columns

    Thanks, I'd rather not do that. Users can insert a column to the left or right making the heading a different length. I've added the following VBA code to copy the formatting from the left most cell in the heading and paste it into the new column. This comes undone when hiding the columns.

    Thanks for the advice on posting pictures, workbooks and link backs.

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    01-08-2015
    Location
    Australia
    MS-Off Ver
    Mac 2011
    Posts
    75

    Re: centre across selection while hiding columns

    Workbook attached
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    01-08-2015
    Location
    Australia
    MS-Off Ver
    Mac 2011
    Posts
    75

    Re: centre across selection while hiding columns


+ 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. Centre Across Selection problem
    By Keibri in forum Excel General
    Replies: 7
    Last Post: 12-27-2016, 05:56 PM
  2. Hiding columns based on drop down list selection
    By acadzow in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-26-2015, 01:29 AM
  3. VBA Centre Across Selection Help!
    By Happy Booking in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 02-19-2014, 10:44 AM
  4. [SOLVED] Looking for some help on hiding columns based on checkbox selection
    By Spritz in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-07-2013, 10:38 AM
  5. [SOLVED] Hiding Columns / Sheet selection
    By ola7mat in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-19-2012, 05:30 AM
  6. centre across selection shortcut
    By Martin B in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-17-2006, 04:15 PM
  7. [SOLVED] How do I get "centre across selection" to centre properly?
    By Marjon in forum Excel General
    Replies: 5
    Last Post: 03-16-2006, 08:24 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