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.











LinkBack URL
About LinkBacks

Register To Reply

Bookmarks