WRAPCOLS formatting and numbering

tigerzen

Board Regular
Joined
Mar 8, 2023
Messages
165
Office Version
  1. 365
Platform
  1. Windows
Would like to be able to conditionally format the wrapped columns as per the spreadsheet below, anyone with priority 1 should be highlighted, also the individual cells should be numbered. Of the 2 requests I've made, the first one is more urgent. Thank you.

Football stats functions.xlsx
ABCDEFGHIJK
1NameDeptPriorityDesired solution
2TomHR11 Tom1 Vic1 Jake1 Tom4 Vic7 Jake
3JackSales31 Jack1 Mary1 Ted2 Jack5 Mary8 Ted
4SamAdmin21 Sam1 Noel1 Ed3 Sam6 Noel9 Ed
5VicHR2
6MarySales1
7NoelAdmin2
8JakeHR3
9TedSales1
10EdAdmin2
Sheet25
Cell Formulas
RangeFormula
E2:G4E2=ROW(A1)&" "&WRAPCOLS(A2:A10,3)
Dynamic array formulas.
Cells with Conditional Formatting
CellConditionCell FormatStop If True
E2:G4Expression=C1=1textNO
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Book6
ABCDEFGH
1No.NameDeptPriority
21TomHR11 Tom4 Vic7 Jake
32JackSales32 Jack5 Mary8 Ted
43SamAdmin23 Sam6 Noel9 Ed
54VicHR2
65MarySales1
76NoelAdmin2
87JakeHR3
98TedSales1
109EdAdmin2
Sheet1
Cell Formulas
RangeFormula
F2:H4F2=WRAPCOLS(LET(s,SEQUENCE(9),CONCATENATE(INDEX(A2:A10,s)," ",INDEX(B2:B10,s))),3)
Dynamic array formulas.
Cells with Conditional Formatting
CellConditionCell FormatStop If True
F2:H4Expression=VLOOKUP(TEXTAFTER(F2," ",1,0),$B$2:$D$10,3,0)=1textNO
 
Upvote 0
A variation

23 09 11.xlsm
ABCDEFGH
1NameDeptPriorityDesired solution
2TomHR11 Tom4 Vic7 Jake
3JackSales32 Jack5 Mary8 Ted
4SamAdmin23 Sam6 Noel9 Ed
5VicHR2
6MarySales1
7NoelAdmin2
8JakeHR3
9TedSales1
10EdAdmin2
WRAPCOLS
Cell Formulas
RangeFormula
F2:H4F2=WRAPCOLS(ROW(A2:A10)-ROW(A2)+1&" "&A2:A10,3)
Dynamic array formulas.
Cells with Conditional Formatting
CellConditionCell FormatStop If True
F2:H4Expression=VLOOKUP(TEXTAFTER(F2," "),$A:$C,3,0)=1textNO
 
Last edited:
Upvote 0
this is
A variation

23 09 11.xlsm
ABCDEFGH
1NameDeptPriorityDesired solution
2TomHR11 Tom4 Vic7 Jake
3JackSales32 Jack5 Mary8 Ted
4SamAdmin23 Sam6 Noel9 Ed
5VicHR2
6MarySales1
7NoelAdmin2
8JakeHR3
9TedSales1
10EdAdmin2
Sheet2 (2)
Cell Formulas
RangeFormula
F2:H4F2=WRAPCOLS(ROW(A2:A10)-ROW(A2)+1&" "&A2:A10,3)
Dynamic array formulas.
Cells with Conditional Formatting
CellConditionCell FormatStop If True
F2:H4Expression=VLOOKUP(TEXTAFTER(F2," "),$A:$C,3,0)=1textNO
this is better.
 
Upvote 0
I was originally going to post that, but then discovered the other one was 1 character shorter. ;)
Funny! I figured you must have seen this construction, so I wondered why you went with the one you did. Personally, I think the SEQUENCE approach is "cleaner", but now I understand reason behind your choice.
 
Upvote 0

Forum statistics

Threads
1,215,108
Messages
6,123,129
Members
449,097
Latest member
mlckr

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top