Conditional Formatting Names Based on Their Position in a Column

excelnewb2021

New Member
Joined
Jan 13, 2021
Messages
4
Office Version
  1. 2016
Platform
  1. Windows
Hello, I’m trying to conditionally format a column of names on the basis of where they appear in the range. I’m trying to break them up into four groups and am trying to use their relative position to allow for this. For example, out of 28 names, the individual who is in position number 2 should be formatted as blue. I’ve tried using the match and count function =match(value, range,0) <= count(range)*.25 to achieve this, but no luck so far. Any ideas?
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Yes.
the individual who is in position number 2 <- Is this relative in a range or is it by spreadsheet row number (its important to distinguish it)
Then your formula must return TRUE or FALSE logical result.
Then go to CF and use formula to format cells <--- remember about relative cell references since this is extremly important here.
 
Upvote 0
Thanks for the response, it is relative to the range of values. Ive tried using the formula to conditionally format, the thing is, the match function doesn’t let me refer to the lookup value dynamically… i would have to input the look up value individually for each cell, and that would be terribly time consuming
 
Upvote 0
The goal is to highlight them on the basis of quartiles, so I’m trying to get excels conditional formatting to compare the relative position of a data point to the total number of entries in the data set. I figured using the match + count functions made sense as I can use a multiplier to create quartiles (count *.25, *.5 etc.)
name1
name2
name3
name4
name5
name6
name7
name8
name9
name10
name11
name12
name13
name14
name15
name16
name17
name18
name19
name20
name21
name22
name23
name24
name25
name26
name27
name30
name31
name32
 
Upvote 0
will this be ok?

oAAQqn69R4ikZ1sZ6xst_work.csv
AB
1NameColumn5
2name1TRUE
3name2TRUE
4name3TRUE
5name4TRUE
6name5FALSE
7name6FALSE
8name7FALSE
9name8FALSE
10name9TRUE
11name10TRUE
12name11TRUE
13name12TRUE
14name13FALSE
15name14FALSE
16name15FALSE
17name16FALSE
18name17TRUE
19name18TRUE
20name19TRUE
21name20TRUE
22name21FALSE
23name22FALSE
24name23FALSE
25name24FALSE
26name25TRUE
27name26TRUE
28name27TRUE
29name30TRUE
30name31FALSE
31name32FALSE
Sheet3
Cell Formulas
RangeFormula
B2:B31B2=MOD(ROUNDUP(ROWS(A$2:A2)/4,0),2)=1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:B31Expression=MOD(ROUNDUP(ROWS(A$2:A2)/4;0);2)=1textNO
 
Last edited:
Upvote 0
That's interesting, but I was looking for a way to highlight the top quarter (names 1 thru 8) blue, the second quarter (names 9 thru 16) green, the third quarter (names 17 -24) orange, and the fourth quarter (names 25 -32) red.
 
Upvote 0
you said "quartiles" meaning 4th.

change then my 4 to 8. it should still work
Like this:
oAAQqn69R4ikZ1sZ6xst_work.csv
AB
1NameColumn5
2name1TRUE
3name2TRUE
4name3TRUE
5name4TRUE
6name5TRUE
7name6TRUE
8name7TRUE
9name8TRUE
10name9FALSE
11name10FALSE
12name11FALSE
13name12FALSE
14name13FALSE
15name14FALSE
16name15FALSE
17name16FALSE
18name17TRUE
19name18TRUE
20name19TRUE
21name20TRUE
22name21TRUE
23name22TRUE
24name23TRUE
25name24TRUE
26name25FALSE
27name26FALSE
28name27FALSE
29name30FALSE
30name31FALSE
31name32FALSE
Sheet3
Cell Formulas
RangeFormula
B2:B31B2=MOD(ROUNDUP(ROWS(A$2:A2)/8,0),2)=1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:B31Expression=MOD(ROUNDUP(ROWS(A$2:A2)/8;0);2)=1textNO
 
Upvote 0

Forum statistics

Threads
1,214,973
Messages
6,122,534
Members
449,088
Latest member
RandomExceller01

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