Example -
Client has a master list of client's hosted domains in sheet 1.
Client keeps list of actual A record verified domains in use in sheet 2.
What I need is to highlight domains in sheet 2 which match domains in sheet 1 using a color, and highlight domains in sheet 2 a different color if they do not appear in sheet 1.
(Domains in master list which match A record entered domains in sheet 1 appear in Green, domains which do not match list appear in red)
The column names on both sheets are "domain".
Add a helper columns in each, say H, with formulae like:
=--countif(Sheet1!B:B,B1) >0
copied down to suit (assuming domains are in ColumnB - change Sheet1 to suit actual sheet names).
Then apply Conditional Formatting rules of:
=H1
and:
=H1<>TRUE
to Ranges B:B
with colours to suit.
Correction
The above was based on my misreading the question (I thought some highlighting was to apply to each sheet): Instead please try, in say H1 of Sheet2 and copied down to suit:
=--countif(Sheet1!B:B,B1) >0
and these two rules:
where the first is:
=and(H1<>"",H1<>TRUE)
(the first part of which is to avoid blank cells being highlighted).
Related
I have a Google sheet which has a column for business name (A) and a column for city (B). I would like to set conditional formatting such that if the city name is contained within the business name on the same row, the business name will be highlighted.
list example
Every row contains different business/city data, and there are thousands of rows. I need one formula that will work for the whole sheet.
I know how to do it if the city name and business name are exactly the same =$A$2:$A=$B2, but struggling to figure out how to do it if just a portion matches. Putting an asterisk before $B2 broke the formula.
=REGEXMATCH ($A2,$B2) would do the work too!
Use SEARCH:
=AND(ISNUMBER(SEARCH(TRIM(B2),A2)),B2<>"")
with range starting from A2. You search if A2 contains text from B2 and returns starting number if found. So if it is a number then ISNUMBER returns TRUE
Result:
I want to automatically generate unique, incremented ids (SKUs) for products in my inventory using Google Sheets. These SKUs should be immutable and not change when the sheet is sorted. This screenshot shows my flawed attempt to do this:
The formula I have for column A is:
=if($B2<>"",$B2 & TEXT(COUNTIF($B$2:$B2,$B2),"-0000"),"")
That formula appears to give the desired result. However, if I sort by the values in Column C, SKUs become associated with different Item Names, which is a problem. How can I modify the spreadsheet to get immutable, auto-generated SKUs?
Update:
I would like to be able to add additional rows/SKUs to the sheet over
time
Here is a link to the sample spreadsheet
I've added a sheet ("InventoryMaster(Unsorted") to your spreadsheet.
This sheet would be used to add your prefixes and items only. Once added, you would never sort, insert rows, delete rows or items, etc. Just keep adding the next prefix and item into the next open row, in Col B and Col C. Col A has a formula that will create the static SKUs from that unchanging and ordered information. (I've hidden that formula-containing Col A, so that you only have to enter the manual data and don't have to worry about accidentally overwriting the formula or its results. It's still there at all times, serving its purpose in the background.)
Then, other sheets (see my added "Erik Help" sheet) can reference that "immutable" list, giving you the ability to sort without losing SKU connection.
Here is the A1 formula from the 'InventoryMaster(Unsorted)' sheet:
=ArrayFormula({"SKU";IF(B2:B="",,B2:B&TEXT(COUNTIFS(B2:B,B2:B,ROW(B2:B),"<="&ROW(B2:B)),"-0000"))})
And here is the SKU-assigning formula from A1 of the "Erik Help" sheet:
=ArrayFormula({"SKU";IF(B2:B="",,VLOOKUP(B2:B&C2:C,{'InventoryMaster(Unsorted)'!B2:B&'InventoryMaster(Unsorted)'!C2:C,'InventoryMaster(Unsorted)'!A2:A},2,FALSE))})
My Query is i want to highlight the duplicates in the two tabs in a sheet. My sheet is attached along with this question. In that "Sheet A" & "Sheet B" have common names in it i want to color it for the duplicates.
Sheet : https://docs.google.com/spreadsheets/d/1hL64Q7REorVkjJNKAEGPFBdinlIn8VwnE6H7L9fYB2c/edit#gid=0
If it is possible, is there any option to find the duplicates between two google sheets ?
if yes then pls help me to find duplicates in Sheet A in Match 1 sheet and Sheet C in Match 2 Sheet.
Sheet 2 : https://docs.google.com/spreadsheets/d/1xAUmvmaZPvfJwCHD_esrshLccgKM3VmP1CI46mMoRB8/edit#gid=0
I have an answer that shows how this can be done. See the tab I added, "Sheet 1-GK", into your sheet.
The formula in C1 looks at the data from Sheet 2 to see whether each name in Sheet 1 column A is found in Sheet 2.
Here is the primary formula:
=ARRAYFORMULA(IFERROR(
IF(MATCH(A2:A9,IMPORTRANGE("https://docs.google.com/spreadsheets/d/1xAUmvmaZPvfJwCHD_esrshLccgKM3VmP1CI46mMoRB8/edit","'SHEET C'!A$2:A$8"),0),
"Y",
"N"),
"N"))
In the sheet, I have wrapped it in an array, {...}, to also add the column header text.
Then a conditional formatting rule is used to highlight the rows that have "Y" in column C.
Note that you can either hide column C, or incorporate its formula logic into the conditional formating rule, to do everything there.
Is this what you were looking for, or did you need something else?
I'm trying to set up a conditionally formatted training record. I have a separate sheet that shows job titles and X's for required training. Because conditional formatting cannot reference other sheets, in the actual training record I copy the previous sheet (=Sheet1!A1). In the record, there's a drop-down to select job function.
My formula works, but only for the current column and to the right. Column 1 will work for any column (job title), but column 3 can only read job titles on column 3+.
I've tried moving the source data to the right (so the job titles copied from the first sheet start at BB300 instead of B300) but it has the same issue. Locking down the column letter with $ screws up the formula.
=if(AND(B3="",OR(AND(B$2=B$300,B301="X"),AND(B$2=C$300,C301="X"),AND(B$2=D$300,D301="X"))),True,False)
Sample copy of sheet https://docs.google.com/spreadsheets/d/1q0ImPv7FAeDNgz_adOyedcmA2RCot-UzI7nBByMWNiM/edit?usp=sharing
This is a shortened version of the code I'm using, but the idea is that B2 is the job title for the first person, C2 is the job title for the second person, etc. The script checks to see if the job title in B2 matches B300 (the copied requirements from sheet 1) and if so, checks if there is an X. If so, the cell colors (due to the conditional formatting being true) unless there's an X in the cell to show training is completed.
This works appropriately for the first column, but in column 2 (second employee) if I select the job title in column 1 none of the cells flag appropriately (are all blank).
...because conditional formatting cannot reference other sheets...
actually it can. you need to use INDIRECT for that. example:
=A1=INDIRECT("Sheet1!A1")
...to compare if A1 from current sheet Sheet2 is equal to A1 of Sheet1
_____________________________________________________
in your sheet Training Requirements add one row above header row and hide it:
then you can use this custom formula:
=INDIRECT("Training Requirements!"&ADDRESS(3, MATCH(B$2,
INDIRECT("Training Requirements!2:2"), 0), 4)&":"&SUBSTITUTE(ADDRESS(3, MATCH(B$2,
INDIRECT("Training Requirements!2:2"), 0), 4), 3, ))<>B3
spreadsheet demo
I need a system that allows to filters entries by different text tags.
Say we store info about some products. We have Red Apples, Pears, Watermelons, Cucumbers, Peppers and Bread. We store them in sheet named "Data" in column A. Next columns are occupied by tags, like Red Apples are Red, Sweet, Fruit, Unpacked; Peppers are Red, Spicy, Veggie, Packed; Bread is just Packed.
Then on another sheet we have a dedicated range, say A1:A10, which can accept any data tag, like Spicy or Packed. What I need is when somebody enters Spicy and Packed in this range, it looks up all items that are Spicy and Packed and displays them, so in this case it would display Peppers in B1 cell.
To recap: Data!A:A - entry names, Data!B:Z - tags, Main!A1:A10 - tags entered by user, Main!B:B - entries with tags, that correspond to those entered in A1:A10.
I was trying to use FILTER, but I can't figure out how to select proper condition ranges. I feel like this should be possible within this system and I really don't want to delve into scripting field.
This can be achieved using a helper column to collect all the tags and then a =query() formula.
1)
Start by creating a multi-tag column using either =join() or =textjoin(), capturing all the potential tags for each product.
2)
Then use this answer to help you create the =query() formula needed.
There is a pretty simple solution to this.
You would need to add a helper column and count how many tags does your item has from the listed ones, using this formula
=SUM(ARRAYFORMULA(COUNTIF(B1:1,'Main'!$A$1:$A$10)))
Next, in your presentation sheet reserve some place where you can enter tags - one at a time. In my case, it's range A1:A10. Then just paste this formula anywhere else
=IFERROR(FILTER(Data!$B:$B,Data!$A:$A=(10-COUNTBLANK($A$1:$A$10))),"")
At that place, all suitable elements will show up. I also added sorting to the formula, cause why not.
You can use more tags, for that just increase the tag range and edit formula so when there are no tags entered, COUNTIF gives 0.
if Data sheet looks like this:
and you need "constructive" list, you can do:
=SORT(FILTER(Data!A2:A, REGEXMATCH(TRANSPOSE(QUERY(TRANSPOSE(Data!B2:Z),,999^99)),
TEXTJOIN("|", 1, A1:A10))))
spreadsheet demo
if you need a "destructive" list do:
=ARRAYFORMULA(SORT(QUERY({Data!A2:A, TRANSPOSE(QUERY(TRANSPOSE(Data!B2:Z),,999^99))},
"select Col1 where "&TEXTJOIN(" and ", 1, IF(A1:A10<>"",
"Col2 contains '"&A1:A10&"'", ))&"", 0)))