Results 1 to 3 of 3

Group Based Outside Borders across Columns A to U till data in last Row in Column A

Threaded View

analystbank Group Based Outside Borders... 01-13-2025, 02:17 AM
ORoos Re: Group Based Outside... 01-17-2025, 05:25 AM
analystbank Re: Group Based Outside... 01-28-2025, 05:12 AM
  1. #1
    Forum Contributor
    Join Date
    08-17-2013
    Location
    Asia
    MS-Off Ver
    Excel 2021
    Posts
    273

    Group Based Outside Borders across Columns A to U till data in last Row in Column A

    Hello Team,

    Group Based Outside Borders across Columns A to U till data in last Row in Column A

    For above purpose, sample workbook with desired outcome is attached for ready reference

    Apply Top ,Bottom, Left, Right Thin border and No Internal Border across column A: U till last data row in Column A based on Rule setout below with control Column U for Group logic

    start with Row 2
    take first 15 characters from LEFT using function =Left(U2,15) and comapre with following rows and if blank, make it a group and apply External Border Top, Bottom, Left, Right and no Interior border across columns A:U for this range of Group, untill next text is found in column U, compared to U2

    Move on
    now, Say if U3 [=Left(U3,15)] is non blank but not same as Left(U2,15) then U2 itself is a group and new group shall begin from U3, Left (U3,15) and comapre with U4 untill new text is found in column U and follow group structuring to apply external border. In given sheet Left(U3,15) is not equal to Left(U2,15) but U4, U5, U6 comapred to U3 are blank hence make group and apply external border A3:U6

    Move one
    Left(U7,15) compared to Left(U6,15) or previous group start from Left(U3,15) is not same hence , new group begins from here. U8 has different text than U7 and hence A7:U7 should have external border and so on

    How final output should look like is given in sample workbook attached, and suitable VBA macro is needed accordingly.
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Add Thick Outside borders till last active cell
    By E5254730 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-14-2020, 11:02 AM
  2. Color the columns based on group and column value
    By geoisaac in forum Excel General
    Replies: 19
    Last Post: 05-15-2019, 04:41 AM
  3. [SOLVED] Sort columns B,C,D based on column B then loop to next 3 columns and repeat till last colu
    By Andy15 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-09-2017, 05:35 PM
  4. Replies: 1
    Last Post: 07-10-2015, 10:22 AM
  5. Group value in columns with header based on value in another column
    By hitarov in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-02-2013, 03:44 AM
  6. Delete every alternate columns till the last data in the row from column G
    By andywsw in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-11-2012, 11:59 PM
  7. Hiding a group of columns based on another column
    By fasterthanyours in forum Excel General
    Replies: 1
    Last Post: 01-13-2010, 04:17 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