Multiple conditional formatting MINIFS

duteberta

Board Regular
Joined
Jun 14, 2009
Messages
92
Office Version
  1. 365
Platform
  1. MacOS
I want to Conditional format ONLY THE ONE CELL that contains the lowest value, but only in there is a "1" in the SEL column. For some reason I'm not able to get the correct syntax for the Conditional Formatting formula.

In this example I'm working within a table named "data". I want the cell in column "WT" to be highlighted if it is the lowest value in that column, but only if there is a "1" in the SEL column.

Can you help me?

example.xlsx
ABC
1DATESELWT
210/1/241335.0
310/2/241334.2
410/3/241334.1
510/4/241335.1
610/5/241333.9
710/6/24333.7
810/7/24334.2
910/8/24332.8
1010/9/24333.0
1110/10/24332.8
1210/11/24333.4
1310/12/24333.0
1410/13/24332.8
1510/14/24332.5
1610/15/24332.6
Sheet1
 

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).
Edit: Need some clarification.
Do you want to look at the min of the subset of WT only where SEL = 1?
or
Do you want to look at the min of the entire column WT but highlight only if there's a 1 in SEL?
 
Last edited:
Upvote 0
Edit: Need some clarification.
Do you want to look at the min of the subset of WT only where SEL = 1?
or
Do you want to look at the min of the entire column WT but highlight only if there's a 1 in SEL?
Thank you- the first one.

Look only where there is a "1" in the SEL column and pick the lowest value in that subset. Thank you very much
 
Upvote 0
Try this.
Book1
ABC
1DATESELWT
210/1/241335
310/2/241334.2
410/3/241334.1
510/4/241335.1
610/5/241333.9
710/6/24333.7
810/7/24334.2
910/8/24333.9
1010/9/24333
1110/10/24332.8
1210/11/24333.4
1310/12/24333
1410/13/24332.8
1510/14/24332.5
1610/15/24332.6
Sheet2
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C2:C16Expression=(C2=MINIFS($C$2:$C$16,$B$2:$B$16,"1"))*(B2=1)textNO
 
Upvote 0
Create Formula in Name Manager, I called it MyMin: =MIN(FILTER(Test[WT],Test[Sel]=1,""))

Highlight the current column from row 2 to end for WT and use the following formula for criteria: =AND($B2=1,$C2=MyMin)
where column B is SEL and column C is WT.
The conditional formatting will carry down as new rows are added to the table.
 

Attachments

  • Capture.JPG
    Capture.JPG
    24.2 KB · Views: 1
Upvote 0
Create Formula in Name Manager, I called it MyMin: =MIN(FILTER(Test[WT],Test[Sel]=1,""))

Highlight the current column from row 2 to end for WT and use the following formula for criteria: =AND($B2=1,$C2=MyMin)
where column B is SEL and column C is WT.
The conditional formatting will carry down as new rows are added to the table.
It's not necessary to create a name range. The conditional format will pick up the new rows automatically.
 
Upvote 0
The named range is used to reference the table (Test[WT] and Test[Sel]). Those table references do not work in the conditional formatting formula bar.
 
Upvote 0
The named range is used to reference the table (Test[WT] and Test[Sel]). Those table references do not work in the conditional formatting formula bar.
I'm aware of that but what is the advantage of referencing table object vs. R/C style here? Genuine question.
 
Upvote 0
Looking at your solution: =(C2=MINIFS($C$2:$C$16,$B$2:$B$16,"1"))*(B2=1)

The advantage is readability IMHO. It could be just aesthetics but to each their own.
 
Upvote 0
Thank you all- you have helped me in my creation of my personal weight loss calculator, I really appreciate it!
 

Attachments

  • Screenshot 2024-11-15 at 2.16.35 PM 2.jpg
    Screenshot 2024-11-15 at 2.16.35 PM 2.jpg
    154.6 KB · Views: 8
Upvote 0

Forum statistics

Threads
1,223,703
Messages
6,173,977
Members
452,540
Latest member
haasro02

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