+ Reply to Thread
Results 1 to 8 of 8

Centre Across Selection problem

  1. #1
    Forum Contributor
    Join Date
    02-09-2015
    Location
    malta
    MS-Off Ver
    Microsoft 365
    Posts
    383

    Centre Across Selection problem

    Hi guys,

    Can someone assist me with the below (for convenience I have attached an excel file with an example)

    Basically, as seen from the file, I am trying to apply centre across selection for each and every consecutive two rows.

    As seen from example 3, the highlighted yellow part (which is still taking into consideration 'merge&centre') is what I would like to achieve.

    If I apply centre across selection and insert two entries- one in column G and the other in Column I- as seen in example 2, all is fine. However if there is only 1 entry, as in example 1, the centre across selection will take all columns from G to J.

    Sorry to ask this question which seems so basic, but not sure if there is a work around the problem

    Thanks

    Keibri
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Centre Across Selection problem

    So, you only want to center across 2 cells?
    highlight those 4 cells, then on the Home tab/Editing/Clear Formats, then apply it again, over 2 cells
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,010

    Re: Centre Across Selection problem

    I learned something new today. Thank you Keibri .

    Highlight cells, Right click, Format cells, Alignment, Horizontal, Center Across Selection.


    I had no idea that was there !

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Centre Across Selection problem

    Logit, that is a vert useful tool to use, you should use it in preference to merge and Center, which causes all sorts of problems with calcs

  5. #5
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,010

    Re: Centre Across Selection problem

    Thanks. I'll keep it in mind.

  6. #6
    Forum Contributor
    Join Date
    02-09-2015
    Location
    malta
    MS-Off Ver
    Microsoft 365
    Posts
    383

    Re: Centre Across Selection problem

    Thanks FDibbins.. I've been trying numerous solutions.. thing is I have a very big excel file all with this type of formatting. But I think your solution is the only work around which can be used without modifying any cells from the whole file... hence I created a macro to apply your solution to a larger range

    Welcome Logit

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Centre Across Selection problem

    happy to help, good luck

  8. #8
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,010

    Re: Centre Across Selection problem

    Keibri

    Thanks for the welcome. Would you be willing to share your macro for others ?

    Have a good 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. VBA Centre Across Selection Help!
    By Happy Booking in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 02-19-2014, 10:44 AM
  2. Update Values problem and a Value Selection Problem----Please Help.
    By TrivialT in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-29-2013, 02:43 PM
  3. Centre across selection - strange behaviour when wrapping.
    By talksalot81 in forum Excel General
    Replies: 0
    Last Post: 04-27-2010, 12:34 PM
  4. hyperlinking to the centre of the screen
    By Alex06 in forum Excel General
    Replies: 11
    Last Post: 04-11-2010, 06:22 AM
  5. centre across selection shortcut
    By Martin B in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-17-2006, 04:15 PM
  6. Replies: 5
    Last Post: 03-16-2006, 08:24 PM
  7. Icon for "Wrap" and for "Centre Across Selection"
    By BeSmart in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-16-2005, 02:50 PM
  8. Replies: 3
    Last Post: 09-27-2005, 05:05 AM

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