Row conditional formatting by criteria min and max of the column "K" value

motilulla

Well-known Member
Joined
Feb 13, 2008
Messages
2,362
Office Version
  1. 2010
Hello,

My data range C2:K32 i want to highlight 2 rows by finding min/max value of the column "K" and highlight entire row.
One formula to find Min value in the column ranges K2:K32 and highlights the entire row.
Second formula to find Max value in the column ranges K2:K32 and highlights the entire row.

*ABCDEFGHIJKLM
1
2
3
4
5Seriol NumPart NumYearSeriolRow NumSumSum RankDelayDelay Rank
612618419/20372.267176817750
72190518/19512.212727713261
832545220/21372.32671751817
947868819/20342.26499808051
1051267819/20392.26939667549
1162577717/18422.136275020869
1277283920/21502.339717556
1387242717/18102.104386524072
1491999819/20502.28029546445
15101541820/21542.343797812
16113316519/20212.25135609353
17122944920/21222.31141703330
18133164320/21242.31348723128
19147985920/21462.3352647910
20151165120/2152.29421375039
21164196920/21402.32935601514
22179430520/2112.29020345441
23188613619/20582.28824435642
24195929020/21472.336657489
2520511818/19192.180264716464
26218286620/21342.32330572120
27224408220/21492.338356067
28234272820/2192.29817284637
29244419104/05411.433152191181
30251156120/21182.30729543732
31265421720/21262.31519322927
32277854717/18332.127162521770
33
34

For example, the sample image is attached.

Thank you all.

I am using Excel 2000

Regards,
Moti
 

Attachments

  • Conditional Formatting.png
    Conditional Formatting.png
    44.6 KB · Views: 16

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Hi Motilulla,

Does this do what you ask?

Motilulla.xlsx
CDEFGHIJK
1Seriol NumPart NumYearSeriolRow NumSumSum RankDelayDelay Rank
212618419/20372.267176817750
32190518/19512.212727713261
987242717/18102.104386524072
1091999819/20502.2829546445
11101541820/21542.343797812
12113316519/20212.25135609353
23224408220/21492.338356067
24234272820/2192.29817284637
2524441915-Apr411.433152191181
26251156120/21182.30729543732
27265421720/21262.31519322927
28277854717/18332.127162521770
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C2:K28Expression=$K2=MAX($K:$K)textNO
C2:K28Expression=$K2=MIN($K:$K)textNO
 
Upvote 0
Here you go :)
Book1
CDEFGHIJKLM
1Seriol NumPart NumYearSeriolRow NumSumSum RankDelayDelay RankTrue/False For MaxTrue/False for Min
212618419/20372.267176817750FALSEFALSE
32190518/19512.212727713261FALSEFALSE
432545220/21372.32671751817FALSEFALSE
547868819/20342.26499808051FALSEFALSE
651267819/20392.26939667549FALSEFALSE
762577717/18422.136275020869FALSEFALSE
877283920/21502.339717556FALSEFALSE
987242717/18102.104386524072FALSEFALSE
1091999819/20502.28029546445FALSEFALSE
11101541820/21542.343797812FALSETRUE
12113316519/20212.25135609353FALSEFALSE
13122944920/21222.31141703330FALSEFALSE
14133164320/21242.31348723128FALSEFALSE
15147985920/21462.3352647910FALSEFALSE
16151165120/2152.29421375039FALSEFALSE
17164196920/21402.32935601514FALSEFALSE
18179430520/2112.29020345441FALSEFALSE
19188613619/20582.28824435642FALSEFALSE
20195929020/21472.336657489FALSEFALSE
2120511818/19192.180264716464FALSEFALSE
22218286620/21342.32330572120FALSEFALSE
23224408220/21492.338356067FALSEFALSE
24234272820/2192.29817284637FALSEFALSE
25244419104.maj411.433152191181TRUEFALSE
26251156120/21182.30729543732FALSEFALSE
27265421720/21262.31519322927FALSEFALSE
28277854717/18332.127162521770FALSEFALSE
Sheet1
Cell Formulas
RangeFormula
L2:L28L2=MAX($K$2:$K$28)=$K2
M2:M28M2=MIN($K$2:$K$28)=$K2
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C1:K28Expression=MIN($K$2:$K$28)=$K1textNO
C1:K28Expression=MAX($K$2:$K$28)=$K1textNO


Is that what you wished for?
 
Upvote 0
Solution
Hi Motilulla,

Does this do what you ask?

Motilulla.xlsx
CDEFGHIJK
1Seriol NumPart NumYearSeriolRow NumSumSum RankDelayDelay Rank
212618419/20372.267176817750
32190518/19512.212727713261
987242717/18102.104386524072
1091999819/20502.2829546445
11101541820/21542.343797812
12113316519/20212.25135609353
23224408220/21492.338356067
24234272820/2192.29817284637
2524441915-Apr411.433152191181
26251156120/21182.30729543732
27265421720/21262.31519322927
28277854717/18332.127162521770
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C2:K28Expression=$K2=MAX($K:$K)textNO
C2:K28Expression=$K2=MIN($K:$K)textNO
Toadstool, thank you for the formula I did modified a bit as per my requirements it seems it highlight first 2 parts ok and in the 3rd part it highlighted 5 rows may be formulas does not work with multi ranges for the same column Min and max values.

Here is how I applied the formulas for 3 different ranges
VBA Code:
Range C2:K28 =$K2=MAX($K2:$K32)
Range C2:K28 =$K2=MIN($K2:$K32)

Range C29:K55 =$K29=MAX($K29:$K55)
Range C29:K55 =$K29=MIN($K29:$K55)

Range C56:K82 =$K56=MAX($K56:$K82)
Range C56:K82 =$K56=MIN($K56:$K82)

*ABCDEFGHIJKLM
1Seriol NumPart NumYearSeriolRow NumSumSum RankDelayDelay Rank
212618419/20372.267
176​
817750
32190518/19512.212
72​
7713261
432545220/21372.326
71​
751817
547868819/20342.264
99​
808051
651267819/20392.269
39​
667549
762577717/18422.136
27​
5020869
877283920/21502.339
71​
7556
987242717/18102.104
38​
6524072
1091999819/20502.280
29​
546445
11101541820/21542.343
79​
7812
12113316519/20212.251
35​
609353
13122944920/21222.311
41​
703330
14133164320/21242.313
48​
723128
15147985920/21462.335
26​
47910
16151165120/2152.294
21​
375039
17164196920/21402.329
35​
601514
18179430520/2112.290
20​
345441
19188613619/20582.288
24​
435642
20195929020/21472.336
65​
7489
2120511818/19192.180
26​
4716464
22218286620/21342.323
30​
572120
23224408220/21492.338
35​
6067
24234272820/2192.298
17​
284637
25244419104/05411.433
15​
2191181
26251156120/21182.307
29​
543732
27265421720/21262.315
19​
322927
28277854717/18332.127
16​
2521770
29282618420/21512.340
82​
7945
3029190519/20432.273
26​
477148
31302545218/19442.205
40​
6913962
32317868818/19362.197
42​
7114763
33321267820/21382.327
21​
371716
34332577720/21292.318
22​
402624
35347283919/20572.287
34​
585743
36357242719/20162.246
16​
259854
37361999820/21112.300
20​
344435
38371541819/2032.233
39​
6611157
39383316520/21482.337
21​
3778
40392944919/2062.236
25​
4510856
41403164318/19632.224
25​
4512058
42417985911/12201.760
10​
1158479
43421165114/15351.936
9​
1040877
44434196916/17282.055
13​
1628975
45449430517/18472.141
11​
1320368
46458613615/16411.998
5​
234676
47465929020/21552.344
37​
6301
4847511818/19582.219
13​
1612560
49488286619/20222.252
15​
219252
50494408220/21312.320
15​
212422
51504272820/21392.328
6​
41615
52514419107/08221.540
3​
180480
53521156120/21362.325
24​
431918
54535421716/17572.084
7​
626074
55547854720/21172.306
11​
133833
56552618420/21412.330
63​
731413
5756190520/21282.317
28​
522725
58572545220/21422.331
39​
661312
59587868820/21452.334
37​
631011
60591267816/17592.086
10​
1125873
61602577719/20472.277
22​
406746
62617283920/21332.322
27​
502221
63627242718/19102.171
22​
4017366
64631999820/21272.316
17​
282826
65641541819/20132.243
34​
5810155
66653316520/21102.299
19​
324536
67662944919/20452.275
16​
256947
68673164320/21202.309
28​
523531
69687985919/20562.286
15​
215844
70691165120/21232.312
7​
63229
71704196920/21532.342
20​
3423
72719430517/18232.117
7​
622771
73728613617/18552.149
7​
619567
74735929020/21162.305
29​
543934
7574511820/21302.319
14​
202523
76758286618/19622.223
17​
2812159
77764408220/2182.297
13​
164738
78774272820/21522.341
13​
1634
79784419112/1391.805
5​
253978
80791156120/2142.293
11​
135140
81805421718/19172.178
6​
416665
82817854720/21352.324
18​
312019
83
84

Result image is attached

Have a nice time

Kind regards,
Moti
 

Attachments

  • Conditional Formatting-1.png
    Conditional Formatting-1.png
    106.7 KB · Views: 6
Upvote 0
Here you go :)
Book1
CDEFGHIJKLM
1Seriol NumPart NumYearSeriolRow NumSumSum RankDelayDelay RankTrue/False For MaxTrue/False for Min
212618419/20372.267176817750FALSEFALSE
32190518/19512.212727713261FALSEFALSE
432545220/21372.32671751817FALSEFALSE
547868819/20342.26499808051FALSEFALSE
651267819/20392.26939667549FALSEFALSE
762577717/18422.136275020869FALSEFALSE
877283920/21502.339717556FALSEFALSE
987242717/18102.104386524072FALSEFALSE
1091999819/20502.28029546445FALSEFALSE
11101541820/21542.343797812FALSETRUE
12113316519/20212.25135609353FALSEFALSE
13122944920/21222.31141703330FALSEFALSE
14133164320/21242.31348723128FALSEFALSE
15147985920/21462.3352647910FALSEFALSE
16151165120/2152.29421375039FALSEFALSE
17164196920/21402.32935601514FALSEFALSE
18179430520/2112.29020345441FALSEFALSE
19188613619/20582.28824435642FALSEFALSE
20195929020/21472.336657489FALSEFALSE
2120511818/19192.180264716464FALSEFALSE
22218286620/21342.32330572120FALSEFALSE
23224408220/21492.338356067FALSEFALSE
24234272820/2192.29817284637FALSEFALSE
25244419104.maj411.433152191181TRUEFALSE
26251156120/21182.30729543732FALSEFALSE
27265421720/21262.31519322927FALSEFALSE
28277854717/18332.127162521770FALSEFALSE
Sheet1
Cell Formulas
RangeFormula
L2:L28L2=MAX($K$2:$K$28)=$K2
M2:M28M2=MIN($K$2:$K$28)=$K2
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C1:K28Expression=MIN($K$2:$K$28)=$K1textNO
C1:K28Expression=MAX($K$2:$K$28)=$K1textNO


Is that what you wished for?
Radoslaw Poprawski, CF formula worked perfect! I do appreciate your help

Have a nice time

Kind Regards,
Moti :)
 
Upvote 0
Here is how I applied the formulas for 3 different ranges
VBA Code:
Range C2:K28 =$K2=MAX($K2:$K32)
Range C2:K28 =$K2=MIN($K2:$K32)

Range C29:K55 =$K29=MAX($K29:$K55)
Range C29:K55 =$K29=MIN($K29:$K55)

Range C56:K82 =$K56=MAX($K56:$K82)
Range C56:K82 =$K56=MIN($K56:$K82)
You are missing $ signs on the row values
Range C2:K28 =$K2=MAX($K$2:$K$32)

Similar with all the other formulas.
 
Upvote 0
You are missing $ signs on the row values
Range C2:K28 =$K2=MAX($K$2:$K$32)

Similar with all the other formulas.
Peter_SSs, I am sorry for my mistake, thank you very much for the observation and correcting my error, yes true adding $ signs formula worked perfectly! ?

Have a nice time

Regards,
Moti
 
Upvote 0
Toadstool, thank you for the formula I did modified a bit as per my requirements it seems it highlight first 2 parts ok and in the 3rd part it highlighted 5 rows may be formulas does not work with multi ranges for the same column Min and max values.

Here is how I applied the formulas for 3 different ranges
VBA Code:
Range C2:K28 =$K2=MAX($K2:$K32)
Range C2:K28 =$K2=MIN($K2:$K32)

Range C29:K55 =$K29=MAX($K29:$K55)
Range C29:K55 =$K29=MIN($K29:$K55)

Range C56:K82 =$K56=MAX($K56:$K82)
Range C56:K82 =$K56=MIN($K56:$K82)

*ABCDEFGHIJKLM
1Seriol NumPart NumYearSeriolRow NumSumSum RankDelayDelay Rank
212618419/20372.267
176​
817750
32190518/19512.212
72​
7713261
432545220/21372.326
71​
751817
547868819/20342.264
99​
808051
651267819/20392.269
39​
667549
762577717/18422.136
27​
5020869
877283920/21502.339
71​
7556
987242717/18102.104
38​
6524072
1091999819/20502.280
29​
546445
11101541820/21542.343
79​
7812
12113316519/20212.251
35​
609353
13122944920/21222.311
41​
703330
14133164320/21242.313
48​
723128
15147985920/21462.335
26​
47910
16151165120/2152.294
21​
375039
17164196920/21402.329
35​
601514
18179430520/2112.290
20​
345441
19188613619/20582.288
24​
435642
20195929020/21472.336
65​
7489
2120511818/19192.180
26​
4716464
22218286620/21342.323
30​
572120
23224408220/21492.338
35​
6067
24234272820/2192.298
17​
284637
25244419104/05411.433
15​
2191181
26251156120/21182.307
29​
543732
27265421720/21262.315
19​
322927
28277854717/18332.127
16​
2521770
29282618420/21512.340
82​
7945
3029190519/20432.273
26​
477148
31302545218/19442.205
40​
6913962
32317868818/19362.197
42​
7114763
33321267820/21382.327
21​
371716
34332577720/21292.318
22​
402624
35347283919/20572.287
34​
585743
36357242719/20162.246
16​
259854
37361999820/21112.300
20​
344435
38371541819/2032.233
39​
6611157
39383316520/21482.337
21​
3778
40392944919/2062.236
25​
4510856
41403164318/19632.224
25​
4512058
42417985911/12201.760
10​
1158479
43421165114/15351.936
9​
1040877
44434196916/17282.055
13​
1628975
45449430517/18472.141
11​
1320368
46458613615/16411.998
5​
234676
47465929020/21552.344
37​
6301
4847511818/19582.219
13​
1612560
49488286619/20222.252
15​
219252
50494408220/21312.320
15​
212422
51504272820/21392.328
6​
41615
52514419107/08221.540
3​
180480
53521156120/21362.325
24​
431918
54535421716/17572.084
7​
626074
55547854720/21172.306
11​
133833
56552618420/21412.330
63​
731413
5756190520/21282.317
28​
522725
58572545220/21422.331
39​
661312
59587868820/21452.334
37​
631011
60591267816/17592.086
10​
1125873
61602577719/20472.277
22​
406746
62617283920/21332.322
27​
502221
63627242718/19102.171
22​
4017366
64631999820/21272.316
17​
282826
65641541819/20132.243
34​
5810155
66653316520/21102.299
19​
324536
67662944919/20452.275
16​
256947
68673164320/21202.309
28​
523531
69687985919/20562.286
15​
215844
70691165120/21232.312
7​
63229
71704196920/21532.342
20​
3423
72719430517/18232.117
7​
622771
73728613617/18552.149
7​
619567
74735929020/21162.305
29​
543934
7574511820/21302.319
14​
202523
76758286618/19622.223
17​
2812159
77764408220/2182.297
13​
164738
78774272820/21522.341
13​
1634
79784419112/1391.805
5​
253978
80791156120/2142.293
11​
135140
81805421718/19172.178
6​
416665
82817854720/21352.324
18​
312019
83
84

Result image is attached

Have a nice time

Kind regards,
Moti
Toadstool, I apologize for my error, as Peter_SSs suggested and corrected my error in the #Post7, your Formula worked absolutely great ?

Thank you for your help. Have a nice time

Kind regards,
Moti :)
 
Upvote 0

Forum statistics

Threads
1,214,947
Messages
6,122,413
Members
449,082
Latest member
tish101

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