Is there a formula for conditional formatting?

excelos

Well-known Member
Joined
Sep 25, 2011
Messages
591
Office Version
  1. 365
Platform
  1. Windows
Hello,

I am struggling to do conditional formatting for a row.

It has several percentages from 0% to infinity.

I want everything below 100% to be red and everything 100% or above to be green.

There are some cells with dashes when the percentage is not available.

Any idea please?
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Something like this?

Excel Workbook
ABCDEFGHI
2190%152%57%32%84%-111%71%176%
CF %
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A21. / Formula is =AND(A2<>"-",A2>=1)Abc
A22. / Formula is =A2<1Abc
 
Last edited:
Upvote 0
Something like this?

Excel Workbook
ABCDEFGHI
2190%152%57%32%84%-111%71%176%
CF %
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A21. / Formula is =AND(A2<>"-",A2>=1)Abc
A22. / Formula is =A2<1Abc

Thanks!
 
Last edited:
Upvote 0
Edit: Ah, you got it figured in the end? :)
 
Last edited:
Upvote 0
I have a similar question.

I have about 4K rows, and I want the conditional formatting to compare the values in a single row.

Is there a quick way to copy the conditional format? When I select all, it compares all values, which throws off my shading.

Example attached - I would like the conditional format to be like rows Alpha/Bravo. The rows below the space illustrate my issue.

edit: i cant figure out how to paste an image:(

A B C D E F G H I J K L M Total
Alpha12%20%26%18%0%0%10%5%1%2%0%0%6%100%
Beta28%14%11%12%0%0%26%4%5%0%0%0%1%100%
Charlie53%19%18%0%0%0%11%0%0%0%0%0%0%100%
Delta15%40%12%21%0%0%1%0%6%5%0%0%0%100%
Echo15%36%1%21%0%0%1%10%0%4%12%0%0%100%
Foxtrot32%24%8%15%0%0%0%0%10%10%0%0%0%100%
Golf 21%5%0%22%0%0%7%1%0%45%0%0%0%100%
Hotel13%10%77%0%0%0%0%0%0%0%0%0%0%100%

<colgroup><col><col span="14"></colgroup><tbody>
</tbody>
 
Upvote 0
edit: i cant figure out how to paste an image:(
My signature block below has a link that may help for posting sample data like I did above.
Or else, explain to us what the conditional formatting should be doing in each row.
 
Last edited:
Upvote 0
Thanks @Peter_SSs

I am trying to find a quick way to copy the conditional formatting for all rows.

Excel 2016 (Windows) 32 bit
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ]A[/COLOR]​
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ]B[/COLOR]​
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ]C[/COLOR]​
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ]D[/COLOR]​
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ]E[/COLOR]​
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ]F[/COLOR]​
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ]G[/COLOR]​
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ]H[/COLOR]​
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ]I[/COLOR]​
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ]J[/COLOR]​
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ]K[/COLOR]​
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ]L[/COLOR]​
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ]M[/COLOR]​
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ]N[/COLOR]​
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ]O[/COLOR]​
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ]1[/COLOR]​
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ] A [/COLOR]
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ] B [/COLOR]
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ] C [/COLOR]
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ] D [/COLOR]
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ] E [/COLOR]
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ] F [/COLOR]
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ] G [/COLOR]
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ] H [/COLOR]
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ] I [/COLOR]
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ] J [/COLOR]
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ] K [/COLOR]
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ] L [/COLOR]
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ] M [/COLOR]
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ] Total [/COLOR]
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ]2[/COLOR]​
Alpha
12%​
20%​
26%​
18%​
0%​
0%​
10%​
5%​
1%​
2%​
0%​
0%​
6%​
100%​
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ]3[/COLOR]​
Beta
28%​
14%​
11%​
12%​
0%​
0%​
26%​
4%​
5%​
0%​
0%​
0%​
1%​
100%​
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ]4[/COLOR]​
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ]5[/COLOR]​
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ]6[/COLOR]​
Charlie
53%​
19%​
18%​
0%​
0%​
0%​
11%​
0%​
0%​
0%​
0%​
0%​
0%​
100%​
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ]7[/COLOR]​
Delta
15%​
40%​
12%​
21%​
0%​
0%​
1%​
0%​
6%​
5%​
0%​
0%​
0%​
100%​
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ]8[/COLOR]​
Echo
15%​
36%​
1%​
21%​
0%​
0%​
1%​
10%​
0%​
4%​
12%​
0%​
0%​
100%​
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ]9[/COLOR]​
Foxtrot
32%​
24%​
8%​
15%​
0%​
0%​
0%​
0%​
10%​
10%​
0%​
0%​
0%​
100%​
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ]10[/COLOR]​
Golf
21%​
5%​
0%​
22%​
0%​
0%​
7%​
1%​
0%​
45%​
0%​
0%​
0%​
100%​
[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ]11[/COLOR]​
Hotel
13%​
10%​
77%​
0%​
0%​
0%​
0%​
0%​
0%​
0%​
0%​
0%​
0%​
100%​

<tbody>
</tbody>
Sheet: Sheet1

<tbody>
</tbody>
 
Upvote 0
If you had the CF applied to just row 1 (or rows 1 & 2), place your cursor anywhere in the range that already has CF applied (eg cell D1) then go to
Conditional Formatting -> Manage Rules... -> Applies to: Edit this range from (say) =$B$1:$N$1 to (say) =$B$1:$N:$11 -> Apply -> OK
 
Upvote 0

Forum statistics

Threads
1,216,007
Messages
6,128,244
Members
449,435
Latest member
Jahmia0616

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