Count red numbers only in row

stkin

Board Regular
Joined
Dec 18, 2013
Messages
53
I did conditional formatting to get numbers in a cell that have the lowest value show in red. How can I count how many cells have red numbers in a row?

Example

4 5 6 4 3 2 5 4 in this example the result is 2 cells have red numbers this is what I'm trying to count.

thanks
 

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).
Hello,

The best solution is to use the formula you have designed for conditional formatting ...

HTH
 
Upvote 0
I'm sorry I don't understand, here is my conditional formatting formula: =c7=min(c7:c106) then I just formatted the text for red in color. this is for each column then I need to go across each row and count the red numbers

thanks
 
Last edited:
Upvote 0
See if this example helps


A
B
C
D
E
1
Header1​
Header2​
Header3​
Result​
2
4​
4​
10​
5​
3
5​
2​
1​
4
10​
10​
1​
5
8​
2​
7​
6
5​
7​
5​

Formula in E2
=SUMPRODUCT(--(A2:C6=SUBTOTAL(5,OFFSET(A2:C6,0,COLUMN(A2:C6)-COLUMN(A2),,1))))

M.
 
Upvote 0
Or if you need the count for every row...


A
B
C
D
E
1
Header1​
Header2​
Header3​
Count Mins​
2
4​
4​
10​
1​
3
5​
2​
1​
2​
4
10​
10​
1​
1​
5
8​
2​
7​
1​
6
5​
7​
5​
0​

Formula in E2 copied down
=SUMPRODUCT(--(A2:C2=SUBTOTAL(5,OFFSET(A$2:C$6,0,COLUMN(A$2:C$6)-COLUMN(A$2),,1))))

M.
 
Upvote 0
When I use this I get in column min 18, does the formula need to be different if I have 18 columns then a total column. The total for min could be anywhere from 0 to 18.

Thanks
 
Upvote 0
When I use this I get in column min 18, does the formula need to be different if I have 18 columns then a total column. The total for min could be anywhere from 0 to 18. Also I need to count each column with the same formula and it works for that, just not when I do rows. My conditional formatting formula: =c7=min(c7:c106) which I use to turn the lowest number in each column RED, so that's why some rows will have many red numbers. I hope this helps to explain it better. Thanks so much for your help so far, it has been a great help.


Thanks Again
 
Last edited:
Upvote 0
Where are your data? How many columns?
Tell us the exact location of your data.

M.
 
Upvote 0
Hello,

Whenever you are using the Subtotal() function ...the argument 5 means Min() ...

HTH
 
Upvote 0

Forum statistics

Threads
1,214,405
Messages
6,119,320
Members
448,887
Latest member
AirOliver

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