Conditional Formatting Formula To Fill Red If Number Nearest Zero

muhammad susanto

Well-known Member
Joined
Jan 8, 2013
Messages
2,102
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
hi all...

how to make formula in Conditional Formatting :
to determinate fill cell red color for number that nearest zero (absolut number)
this layout :

[TABLE="class: tableizer-table"]
<tbody>[TR="class: tableizer-firstrow"]
[TH]data1[/TH]
[TH]data2[/TH]
[TH]data3[/TH]
[/TR]
[TR]
[TD]-10%[/TD]
[TD]39%[/TD]
[TD]-46%[/TD]
[/TR]
</tbody>[/TABLE]

any help thank in advance...

.sst
 
Last edited:

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Assuming your values are in A2:C2 (change to suit):
1. Select A2:C2
2. Home>Conditional Formatting> New Rule> Use a formula
3. Formula is: =ABS(A2)=MIN(ABS($A$2:$C$2))
4. Choose format and click OK

EDIT: This is an array formula, but you don't need to add any braces, Excel will handle that.
 
Last edited:
Upvote 0
hi Joe...
i have found new problem, how is if the column different :
my data in A2,C2,E2
i have just modify but not working

[TABLE="class: tableizer-table"]
<tbody>[TR="class: tableizer-firstrow"]
[TH]Col.A[/TH]
[TH][/TH]
[TH]Col.C[/TH]
[TH][/TH]
[TH]Col.E[/TH]
[/TR]
[TR]
[TD]78%[/TD]
[TD][/TD]
[TD]-12%[/TD]
[TD][/TD]
[TD]15%[/TD]
[/TR]
</tbody>[/TABLE]
 
Last edited:
Upvote 0
I tested this in row 6 so change the row number throughout to suit. New CF formula is:

Code:
=AND(ISNUMBER(A6),ABS(A6)=SMALL(ABS($A$6:$E$6),COUNTBLANK($A$6:$E$6)+1))
 
Upvote 0

Forum statistics

Threads
1,224,825
Messages
6,181,190
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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