Google Spreadsheet Conditional Multiple Rows Formatting Based on range - google-sheets

I wish to conditionally format cells within a range based on another range...
Eg: format D7:I7 if a value is found in D19:I19.
I've looked but couldn't find a way...
Tried both HLOOKUP& MATCH:
=HLOOKUP(D7,D$24:I$24,,FALSE)
=MATCH(D$7,D$24:I$24,0)`
I have also tried a simple =D$19:I$19 - this one returns only partial formatting on the ranges selected - E9, G11, H13....
Ideas??

Applies to range: D7:I7
Custom formula is: =countif($D19:$I19,$D$7)>0

Related

Conditional Formatting with 2 Sheets not working

im trying to mark matching URLs red.
I have two sheets with URL Data.
My custom Formula looks like this:
match(A2,indirect(Sheet2!A2:A),0)
wondering why there is an error if i use =match(A2,indirect(LostURLs!A2:A),0)
so with the additional =
Anyways both methods are not working and im wondering why?
Indirect excepts the first argument to be "a cell reference as string".
So please try
=match(A2,indirect("LostURLs!A2:A"),0)
and see if that works?
Note: depending on if you want the formatting for a single cell, a column or a row you may have to use a dollar sign in the first argument of the match() function
E.g: If you'd want to repeat the formatting for column A, you would have to use
=match($A2,indirect("LostURLs!A2:A"),0)
For row 2 that would be:
=match(A$2,indirect("LostURLs!A2:A"),0)
and for a single cell
=match($A$2,indirect("LostURLs!A2:A"),0)
NOTE: Depending on your locale, you may have to change the comma's to semi-colons.
perhaps try:
=MATCH(A2; INDIRECT("LostURLs!A2:A"); 0)

Google Sheets multiple conditional formatting for date range and text

I'm trying to apply multiple conditional formatting to a google sheets column. I want two conditions:
A Column needs to equal/contain "Accepted" from a dropdown cell
B Column needs to contain a future due date that is within 14 days to today
I want to highlight C column based on those two conditions being met with a priority flag for Accepted and has a due date within 14 days of today. Here's what I've got so far:
Custom conditional formatting for column C is:
=(A="Assigned")+(B<=TODAY()+14)
What I'd like to see is:
=(A="Assigned")+(B<=TODAY()+14)+(B>=TODAY())
But it's not working. Either I have to specify the exact reference columns (ex: A5) which aren't what I want, or it's not working at all. Any recommendations?
Yes - just get it right for the first row (say row 2) and the other rows will follow by relative addressing:
=and(A2="Accepted",B2>=today(),B2<=today()+14)
If you want to apply the conditional formatting to more than one column, put in dollar signs to anchor the columns:
and($A2="Accepted",$B2>=today(),$B2<=today()+14)
you were close... this is what would work as well:
=($A2="Assigned")*($B2<=TODAY()+14)*($B2>=TODAY())

Trouble searching combined ranges in HLOOKUP

I'm having trouble with HLOOKUP in Google Sheets. I'm trying to determine whether an inputted word is unique in a row and for this reason my formula searches combined ranges [that exclude itself] within an HLOOKUP. This is the formula I'm using [in cell E4]:
=HLOOKUP(E2, {B2:D3;F2:M3}, 2, false)
Doubtless, there's something I'm doing wrong, because I keep getting this error:
"HLOOKUP evaluates to an out-of-bounds range"
What I want to happen is that it will find a match for "ice" in the range to the left [B2:D3] and the range to the right [F2:M3]...
Confusingly, the equivalent formula works for VLOOKUP, but not HLOOKUP. I've found it also works in HLOOKUP if I search for a single range [ie B2:D3] and not a combined range.
So I'm a bit stuck. The combined range search works fine in VLOOKUP, but perhaps I need to write it differently for HLOOKUP?
Any help would be greatly appreciated.
instead of this:
=HLOOKUP(E2, {B2:D3; F2:M3}, 2, 0)
try this:
=HLOOKUP(E2, {B2:D3, F2:M3}, 2, 0)
For identifying duplicates conditional formatting might suit you. Select all relevant columns : Format > Conditional formatting..., Format cells if... Custom formula is and:
=countif(1:1,A1)>1
with formatting of your choice.
This should format all instances of any value repeated in its row.

In Google Sheets, how can I find text within a range of cells?

I have a range of cells in one column, some contain text and some are blank cells. I want to search the range for the first occurrence of a word. I know that it's possible to combine Index and Match functions to find exact text within a range of cells. But I need to search for partial matches. I've tried mixing using the Search function, but it doesn't seem to accept a range. How can I search a range for the first partial text match? I only want to use formulas, not script.
The search function can be applied to a range using arrayformula wrapper:
=arrayformula(search("str", C2:F9))
This returns a bunch of #value! errors where no match is found, or the position of substring when it's found. A more readable output is produced with
=arrayformula(if(iserror(search("str", C2:F9)), , C2:F9))
This leaves non-matches blank, and returns the actual cell content where there is a match. Or you could put row(C2:F9) at the end to get the row numbers, etc.
We can simply use vlookup or match formula to find a string from a specific range
Vlookup example:
=VLOOKUP(B2, $B$2:$B, 1, FALSE)
Match example:
=MATCH("Sunday",A2:A9,0)
=MATCH(DATE(2012,1,1),A2:F2)

format rows in google sheets based on conditional range

I have a data set with 77 rows. One of the columns (let's call it C) contains a name value. I would like to highlight the row if the name in column C is found in a list of names in another column.
Currently, I'm able to check only a single value, instead of a list of values. In conditional format rules, I'm able to enter the following formula
=$C:$C=$GU$1
This, of course, only checks the value against the first name in column GU. I tried to add :$GU$100 to the condition, but that won't work as the condition is now checking if the entry is the same as the entire value from GU1:GU100.
I thought I might try to use a FIND() method to see if the substring were in the larger string. To do that, I attempted the following:
=$C:$C=IF(ISNUMBER(FIND($C$1,$GU$1:$GU$100)),1,0)
While this did not return an error, it also did not highlight any rows. I'm unsure how to format one row based on whether or not the value in that row is an entry in a list elsewhere. Any ideas?
Please select your 'entire row' range (here assumed ColumnsA:G) and Format, Conditional formatting..., Format cells if..., Custom formula is:
=match($C1,$H:$H,0)
choose your Formatting style and Done. Where ColumnH is assumed to have your list.
You can add conditional formatting like this with the custom function option and applying to column C, pretending that the list with names your matching against is in column J:
=IF(ISTEXT(VLOOKUP(C1:C,J:J,1,false)),TRUE,FALSE)

Resources