In the image above, how can I set up a conditional formatting rule to check whether an EAN appears more than once within a particular supplier "group"? I know how to check if an EAN appears twice in a given column but how can I amend this to check if an EAN appears twice within a given group? I am trying to ensure that if a duplicate Supplier - EAN combination is entered then it flags as red. There should never be more than one row with the exact same Supplier-EAN (WK is always WK03 here so irrelevant).
You can use COUNTIFS for counting duplicates for both cells. Selecting range A2:E put this formula as conditional formatting:
=COUNTIFS($B:$B,$B2,$D:$D,$D2)>1
Related
How can i highlight objects that appears within 30 days by conditional format in google sheet ?
Column A contain date and Column B contains objects.
(only objects need to get highlighted)
thanks in advance. here a link shared to the sheet
https://docs.google.com/spreadsheets/d/1bdWKHtW6SA6XI5pIZUrlLQJLi-Gywx2iYUqxFWY1e0I/edit#gid=0
one more sheet added ('estimated output') where you can see how the output must be. please have a look. thank you
As far as I understood, there are two conditions that must be met for a cell to be highlighted:
The object inside the cell must be repeated in that column.
A date between an object must be 30 days apart from the date of a repeated object.
This behavior can be accomplished with the following formula, which you can plug in as a custom formula in a Conditional Formatting rule:
=AND(COUNTIF(B$2:B$7,B2)>1,COUNTIF(TRANSPOSE(ARRAYFORMULA(IF(B$2:B$7=B2,ABS(A$2:A$7-A2),false))),30)>0)
The first part (COUNTIF(B$2:B$7,B2)>1) makes use of the COUNTIF formula to ensure that the object is repeated (that there are more than one instances of it). The second part uses an ARRAYFORMULA to enumerate the differences between dates with an IF clause to make sure those dates correspond to the same object, and then the COUNTIF formula is used again to check that there is at least one instance of those differences being 30. Finally, those two conditions are combined with an AND formula.
I would like to use an ARRAYFORMULA check if a series of cells is blank/contains a number for each row. if all five columns of a row contain a number, I would like the check column to indicate TRUE. If any one of the five columns of a row are blank, I would like the check column to indicate FALSE.
While the current use references number values, I am interested in a potential blank value option for future cases that may include string data.
I have two working "dragdown" options using AND+ISNUMBER and NOT+OR+ISBLANK—each with an internal ARRAYFORMULA.
=AND(ArrayFormula(ISNUMBER(B2:F2)))
=NOT(OR(ArrayFormula(ISBLANK(B2:F2))))
Is there a single formula that would not require dragging when new values are added?
SAMPLE SHEET (blanks!): https://docs.google.com/spreadsheets/d/1M8ziq4he1oM0xiQ5JqbH2Y2t8UgkQfd8KIhmAFIesoc/edit#gid=109329290
Try below array formula-
=ArrayFormula(IF(MMULT(--(B2:F10=""),SEQUENCE(COLUMNS(B1:F2),1,1,0))>0,FALSE,TRUE))
If you want refer full column then use below formula-
=ArrayFormula(IF(A2:A="","",IF(MMULT(--(B2:F=""),SEQUENCE(COLUMNS(B2:F2),1,1,0))>0,FALSE,TRUE)))
I've tried searching low, high, and deep within the crevices of the internet to find a possible solution to this, but have had no luck. My main goal is to highlight individual cells based on a couple criteria. I have a google sheet that tracks jobs based on input from employees. My conditions are:
Date must be before today
Cell must be empty (no input from that day)
Only the cell that is empty should be highlighted
https://docs.google.com/spreadsheets/d/10W9O55QQ31acOj5SyKcE0CXx8S78MZQtY-sRaIKgB7c/edit?usp=sharing
The goal of this is to make cells that did not receive any data stand out. The current formula I have is
=AND(ARRAYFORMULA(ISBLANK($B3:$D3)), ARRAYFORMULA(ISBLANK($I3:$K3)), $A3<TODAY())
But this is only highlighting the entire row, and when a cell in that row is filled, it no longer highlights that row. The yellow row is today's date. Any help in solving this is greatly appreciated!
It's not 100% clear what should be happening with the merged Column E:H. But from the limited data and assigned colors I see in your sheet, try swapping out your current "pink" custom CF rule with this one:
=AND($A3<TODAY(), OR(AND(COLUMN(B3)<=4, B3=""), AND(COLUMN(B3)>=9, B3=""), AND(COLUMN(B3)>4, COLUMN(B3)<9, OR(B3<>"", JOIN("",$B3:$K3)=""))))
You need to set a conditional format rule for each column
I believe here are the conditional format rules you need:
Apply To Range
Formula
A3:A
=AND(OR(ARRAYFORMULA(ISBLANK($B3:$D3)), ARRAYFORMULA(ISBLANK($I3:$K3))), $A3<TODAY()) *Note the OR
B3:B
=AND($A3<TODAY(), ISBLANK($B3))
C3:C
=AND($C3<TODAY(), ISBLANK($C3))
D3:D
=AND($D3<TODAY(), ISBLANK($D3))
I3:I
=AND($I3<TODAY(), ISBLANK($I3))
J3:J
=AND($J3<TODAY(), ISBLANK($J3))
K3:K
=AND($K3<TODAY(), ISBLANK($K3))
The key concept here is that within one rule you cannot specify specific ranges to apply the rule to. Part of the definition of the rule is the range that it applies to. You can have rules that take precedence over certain ranges, but you cannot have two ranges in one rule. You can test many ranges in one rule, but the formatting applies to the whole range the rule is applied to.
Make sure you have deleted previous rules before applying these to make sure they don't take precedence
Reference
Conditional Formatting
I'm in a few Discord servers that let users hold auctions of in-game items to be exchanged for an unofficial in-game currency. Since some users will bid but fail to follow through on the trade, I have a way of marking that user (for my own personal records) as a bad trader. What I'm trying to do is set up conditional formatting on the row of the auction information to highlight in a red color if the ID of the user (long ID not their tag) matches someone on that list. I have conditional formatting set up to highlight the rows for other reasons and those work great.
Using an arrayFormula() in column L, I've included this code:
LOOKUP(D2:D,Discord!F2:F)
It lists either N/A or the Discord ID number of the user if there's a match. I then hide that column and have the conditional formatting formula as "=$D2:$D=$L2:$L" to find matches.
What I would like to do is to accomplish the same result but without using a dedicated column to do it. Simply put, conditional formatting that will return true when a value from one row in the range matches a value from any row in another range.
You can try this custom formula:
=countif(INDIRECT("Discord!$F2:$F"),$D1)>0
See it working in this example sheet:
https://docs.google.com/spreadsheets/d/1izTh57D58QiG_SOx-IyQW5SLwtAb0FqvDopeArgRnog/edit?usp=sharing
Sheet regarding this question.
I have a set of sheets where each person must use a drop down box to select a house they would like to view. We can easily add a house to the list by inserting the address, and a URL into the "houses" sheet and it will be shown in the dropdown list and the results table.
Everything works so far, but if a house becomes unavailable, I want to mark it unavailable on the "houses" sheet, and then all occurrences of that specific house in the dropdown cells and results section should have a red background.
I could use conditional formatting, but this would require me to apply a different formula to each cell and that wouldn't be practical.
I regret not elegant but I think your layout is not well suited to Google Sheets' strengths. The best I can suggest is in say J2 of sheet Choices:
=vlookup(B2,Houses!$A:$C,3,0)
copied down to J30 and J2:J9 copied across to ColumnN. Then select Choices ColumnsB:F and Format - Conditional formatting..., Custom formula is and:
=J1="No"
with formatting of red background Done.
You might want to hide columns J:N.
You should just use conditional formatting.
Step 1: Select Cell B2, go to conditional formatting and create a new rule, "Use a formula to determine which cells to format".
Step 2: Use the following formula:
=VLOOKUP(B2,Houses!$A$3:$C$42,3,FALSE)="No"
Note: This B2 value since it isn't using $, moves dynamically depending on what cells your formula is applied to. The VLOOKUP looks up the B2 value in the depicted range and returns the 'Available' column (column 3 on the Houses sheet). We're matching on "No" specifically, I believe its case sensitive so watch out for that caveat.
Step 3: Set your format to Red.
Step 4: Make sure your 'Applies to' box is pointed to the following range:
=$B$2:$F$9
Personally I hate hard coded ranges like these, you should look into dynamic named ranges. That way you can just reference a named range instead of the A3:C42 range for both your Data Validation dropdown as well as these formulas.