+ Reply to Thread
Results 1 to 6 of 6

'Merge & Center' to 'Centre Across Selection' as code with Data Splitting.

  1. #1
    Forum Contributor
    Join Date
    02-16-2017
    Location
    Bangladesh
    MS-Off Ver
    2021
    Posts
    220

    'Merge & Center' to 'Centre Across Selection' as code with Data Splitting.

    I got help from this forum before to convert 'Merge across' alignment to 'Centre across selection' and as the following code gives output. The previous code needs a little modification. For example, merge cells always have three data sets separated by spaces or line breaks. These three data have to be split and allocated vertically to three cells, and then the cells have to be converted to the output as given by the following code.?*
    Furthermore, this code works with 9 pages of data, I want it to work with up to 15 pages of data.

    I don't know if my request is appropriate or if it is consistent with the forum rules. If anyone can help me with this, I would be very grateful.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by Ariful Islam; 11-23-2024 at 08:34 AM.

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    31,169

    Re: 'Merge & Center' to 'Centre Across Selection' as code with Data Splitting.

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by JohnTopley; 11-23-2024 at 01:35 PM.
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  3. #3
    Forum Contributor
    Join Date
    02-16-2017
    Location
    Bangladesh
    MS-Off Ver
    2021
    Posts
    220

    Re: 'Merge & Center' to 'Centre Across Selection' as code with Data Splitting.

    Your work was excellent. You did it very quickly and with a lot of care. I am grateful to you.
    I would be grateful if you could provide solutions to the following issues if you ever have free time.

    1) Column 'D' (Room) and column 'E' (Short Name) of the 'Output' sheet will be swapped.

    2) If there is a class in two periods, for example, 'Sunday' 08:45-09:30 and 09:30-10:15, these two periods are a single class, so I only want the start and end time of that period in the output sheet as single time duration, for example, 08:45-10:15.
    You have done this work earlier through the code below.

    3) Additionally, in the output sheet, I want "Group" and "Semester" according to the routine of the 'Routine(Input)' sheet. This is my humble request, which was not asked in the original question.

    Please Login or Register  to view this content.
    Last edited by Ariful Islam; 11-24-2024 at 03:45 AM.

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    31,169

    Re: 'Merge & Center' to 'Centre Across Selection' as code with Data Splitting.

    Please Login or Register  to view this content.
    the above does not require cells to be unmerged.

    I have left the other (old) macros in the w/book (as a fallback!)

    and please do not quote code in any replies as it is only "clutter".
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    02-16-2017
    Location
    Bangladesh
    MS-Off Ver
    2021
    Posts
    220

    Re: 'Merge & Center' to 'Centre Across Selection' as code with Data Splitting.

    I am grateful to you again for taking the time and patience to solve a complex problem. This will make some of my work much easier. I am already in debt to you.Your concept was amazing.Thank you very much.

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    31,169

    Re: 'Merge & Center' to 'Centre Across Selection' as code with Data Splitting.

    You're very welcome. Thank you for the feedback and rep.

+ 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. Can you automate Merge & Centre?
    By nachtels_ghost in forum Excel General
    Replies: 2
    Last Post: 05-30-2019, 11:18 PM
  2. [SOLVED] Merge and Centre
    By SimonCampbell in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-19-2018, 05:17 AM
  3. Centre Across Selection problem
    By Keibri in forum Excel General
    Replies: 7
    Last Post: 12-27-2016, 05:56 PM
  4. VBA Centre Across Selection Help!
    By Happy Booking in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 02-19-2014, 10:44 AM
  5. [SOLVED] centre across selection shortcut
    By Martin B in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-17-2006, 04:15 PM
  6. [SOLVED] undue merge and centre
    By ED in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 03-31-2006, 03:50 PM
  7. 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