Macro: Conditional Formatting on Multiple Columns

excelnovice123

New Member
Joined
Jun 21, 2012
Messages
1
Hi guys,

I am trying to create a macro that will apply a "Bottom 10%" Conditional Formatting rule to dozens of columns in a spreadsheet. I would like all columns to use the bottom 10% rule, but bottom 10% values should be relative only to the other cells in that column--not the other cells in the array.

Ideally, the macro would be able to automatically detect all of the populated columns in the spreadsheet and apply the Bottom 10% rule to each of those columns separately from one another, on a column by column basis.

I hope this makes sense, and thank you in advance!!

-Excel Novice
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Hi guys,

I am trying to create a macro that will apply a "Bottom 10%" Conditional Formatting rule to dozens of columns in a spreadsheet. I would like all columns to use the bottom 10% rule, but bottom 10% values should be relative only to the other cells in that column--not the other cells in the array.

Ideally, the macro would be able to automatically detect all of the populated columns in the spreadsheet and apply the Bottom 10% rule to each of those columns separately from one another, on a column by column basis.

I hope this makes sense, and thank you in advance!!

-Excel Novice
Excel 2003
ABCD
1Column 1Column 2Column 3Column 4
2868507637690
32572505812
4373133483110
5646160760147
6861918361655
7629708839203
8988310681926
9305286285822
1060411082697
1117719587100
12711207562510
13845713251462
14673981628849
15539823444519
1664076121207
179510692
18387600667
19606377107
20722870
21846209
22136249
23689228
24768267
25222691
2684455
27272436
2893
29317
30840
31623
32975
33915
3429
35501
Sheet1


In B2 (and will automatically work for any column):
=AND(A2<>"",A2<=SMALL(OFFSET(A$1,1,0,COUNTA(A:A)-1,1),ROUND(COUNTA(OFFSET(A$1,1,0,COUNTA(A:A)-1,1))/10,0)))
 
Upvote 0

Forum statistics

Threads
1,222,414
Messages
6,165,891
Members
451,992
Latest member
kaurmanjodh

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