Conditional formatting for a Conditional minimum - excel-2010

I am struggling with the following - I am attempting to highlight a conditional minimum using conditional formatting, omitting 0 values for a specific dataset. The conditional maximum seems to work fine, but the conditional minimum does not.
The formula I am using for my conditional maximum (successfully):
=AND(Z17=MAX($Z$17:$Z$616*(A$17:A$616=A17)),A17>0)
The formulas which so far do not seem to work for the minimum:
=AND(Z17=MIN($Z$17:$Z$616*(A$17:A$616=A17)),A17>0)
=AND(A17>0,A17=MIN(IF(A$17:A$616=A17,(Z$17:Z$616))))
If I take out the A17>0, 0 values are being highlighted instead (which are really dummy values here at is a template for which people can input a dataset with variable numbers). Also note that the sets in the ZColumn-set for which A17>0 will never have 0 values.

Enter this as your conditional formatting formula:
=$Z17=MIN(IF(($A$17:$A$616=A17)*($Z$17:$Z$616<>0),$Z$17:$Z$616))
It will highlight the column Z minimums for each different value in column A.
See this Daily Dose of Excel post for a discussion.

Related

Google Sheets array formula not working for negative numbers

I have used this formula so many times and cannot get it to work for values less than zero
Formula: =ArrayFormula(iferror(index(PayrollSummary!A:A,small(if(PayrollSummary!I:I<0,row(PayrollSummary!I:I)),row(4:4))),""))
I use this to find the text of one column based on the value of another. It is the if(PayrollSummary!I:I<0 that is not working, if I change it to less than 1 I get values from 0-1, but not the ones less than 0.
I have checked the formatting on the column, tried number, financial, custom number formats. I have put the PayrollSummary!I:I within VALUE() I have tried LTE(), it will not give be the negative numbers.
try:
=ARRAYFORMULA(IFERROR(INDEX(PayrollSummary!A:A, SMALL(
IF(PayrollSummary!I:I*1<0, ROW(PayrollSummary!I:I)), ROW(4:4))), ))

What's going on with my max value operation in google sheets?

I'm doing a very simple max function to find the max between 2 cells, it works on the first few lines, but doesn't work the rest of the way down.
You'll see in the pic the max functions are in column R and only find the max between cells in column P and Q.
What you can't see is Column P is data input manually, while column Q references a different cell that contains a formula.
Why is this not working? thanks
The issue with your ranges is that the values in range Q1:Q are NOT numbers.
Reading the official page about the MAX function:
Each value argument must be a cell, a number, or a range containing numbers. Cells without numbers or ranges are ignored. Entering text values will cause MAX to return the #VALUE! error. To allow text values, use MAXA.
Because they are not numbers they are considered as 0.
So, when using =max(P2,Q2) the result appears realistic.
But not always.
Do test your values using =ISNUMBER()
You can correct the formulas by formatting values as numbers.
Just using a value alone didn't work for me. Wrapping my range in an arrayformula with a nested value formula worked. For example:
=max(ArrayFormula((value($R2:$R))))
This is probably because my entire column is calculated using formulas. I had to apply the value formula to the entire array.

Highlight one set of data based on if it matches another set of data using Conditional Formatting

I have 6 columns and ~200 rows of numbers on one Google Sheet. Then on the other is also 6 columns but only 3 rows. I am trying to use conditional formatting to highlight the numbers in the larger group if they match any of the ones one my other sheet of data.
I've gotten it for matching one number, but having it look at a whole set is proving to be more difficult.
try on range A2:E:
=(REGEXMATCH(TO_TEXT(A2), "^"&TEXTJOIN("$|^", 1, $G$2:$K$5)&"$"))*(A1<>"")
Conditional formatting Apply to range A:A use the following custom formula:
=or(A1=$G$1,A1=$G$2,A1=$G$3)
This will be the easiest way to do it, of course if you have a lot of matches you want to make then it will become more and more difficult without a helper column... Your example only has 3 matches per column so this will work but if you have hundreds of matches you will need to basically make a column looking up if there is a match and conditional formatting based on that (it will be a lot easier and cleaner).

How do I conditionally format if value extracted is > number value?

I have a use case where I need to conditionally format a cell if the extracted value from this formula is greater than 5.
=trim(MID(C3:AZ,FIND("-",C3:AZ)+1,FIND("pts",C3:AZ)-FIND("-",C3:AZ)-1))>5
When I lock the cell references, I still don't get any conditional formatting, even though it accepts the formula:
=trim(MID($C$3:$AZ,FIND("-",$C$3:$AZ)+1,FIND("pts",$C$3:$AZ)-FIND("-",$C$3:$AZ)-1))>5
When I do the formula referencing a single cell, I get the expected output:
I've made an example Google Sheet for reference, if you'd like to take a look at the sample dataset.
Any help/advice you all could provide would be greatly appreciated.
Thanks!
Try this formula. The way conditional formatting works is if the range for conditional formatting starts on A3, then you can put that one cell as the checking value, and the spreadsheet is smart enough to then check each cell in the range separately. I put a value around it as well since "trim" makes it a text instead of a number.
=value(trim(MID(A3,FIND("-",A3)+1,FIND("pts",A3)-FIND("-",A3)-1)))>5

Google Sheets: Repeat referencing in Formulas

=ArrayFormula(IF(A1:B6<0,0,A1:B6))
The range is referred twice. Is it possible to do this with a singular reference within a formula?
Perhaps something akin to IFERROR like IFCONDITION(range, condition, result_if_condition)
The use case is the range itself are in many cases computed using complex arrangements - so it becomes quite inconvenient/unwieldy when that same complex arrangement needs to be inserted into multiple places.
Sample sheet.
In this particular case, you can use
=ArrayFormula(text(A1:A6,"0;\0"))
so that any negative numbers are displayed as zero.
Since the result is a string, it may need to be coerced to a number for use in further calculations.
This was first suggested to me by #barry houdini - here is an example of it in use (in Excel).
EDIT by OP (as in comment below) ;
Here is the link https://support.google.com/docs/answer/56470 So if you wanted blank cells to be zero, you would set the 4th part to \0 i.e. =ArrayFormula(text(A1:A7,"0;\0;\0;\0")) because a blank cell is not a number.

Resources