Google Sheets - Concatenating Multiple lists across sheets - google-sheets

I am interested in taking the values from 1 list in a sheet and concatenating it with the values from another list in a different sheet in Google Sheets. For example, if my lists are:
Sheet A
Apple
Orange
Sheet B
Quarter
Half
Whole
I would want to generate on Sheet C this...
Apple Quarter
Apple Half
Apple Whole
Orange Quarter
Orange Half
Orange Whole
Is this possible? I tried doing this with ARRAYFORMULA, but I just end up outputting something like this: Apple QuarterHalfWhole

Here you go:
=ARRAYFORMULA(FLATTEN(A1:A2 & " " & TRANSPOSE(B1:B3)))
A1:A2 and B1:B3 indeed could be from a different sheet (tab or document (IMPORTRANGE will be used for that case))
FLATTEN is undocumented function in Google Sheets, which will make a 2D-range into a column. I learned about it recently from #MattKing here on SO.

Related

How do I make a dynamic query?

I have a summary sheet and 5 detail sheets (additional details sheets will be added). Each detail sheet has information in cells A10:G16.
I want to join those ranges from each detail sheet in a single list on the summary sheet. Right now I have the following formula in Summary sheet!b1
={DetailSheet1!A10:G16;DetailSheet2!A10:G16;DetailSheet3!A10:G16;DetailSheet4!A10:G16;DetailSheet5!A10:G16}
Which works. However, as my list of detail sheets grows, I don't want to have to go back and add another segment to the formula. I would like to just have a list of the names of each detail sheet and have the formula pull the A10:G16 range from each detail sheet in the list.
Do you want to add other future new sheets without modifying your formula?
It's not ideal to do it this way because it will be slow, but considering it is a small range and imagining your spreadsheet is not that wide, you could use this formula:
=MAKEARRAY(7*COUNTA(A:A),6,LAMBDA(r,c, INDEX (INDIRECT(INDEX(A:A,rounddown(r/7,0)+1)&"!A10:G16"),IF(MOD(r,7),MOD(r,7),7),c)))
Where you have in A:A the list of names of your sheets. Obviously you can change the range

Google Sheets formula to be applied in rows where there is only numbers

I have a Google Sheets workbook, have lot of data in it in the following way as shown in the picture:
So What I want to do is to highlight all rows in which LDCP > Current (Displayed in green), that is fine when I use conditional formatting and add a formula. But since there are 1000s of such rows, what I want to do is to select all and apply that formula however when I do that it highlights the rows with text such as Leasing Companies and Leather & Tanneries.
Is there a way that I can select the whole sheet and apply a formula which only is applicable where the B column (LDCP) and F Column (Current) consists of numbers. This way only those rows will be highlighted and not the other ones.
Any other kind of advice to do this would be appreciated as well.
Regards,
~K
Try this in your conditional formatting custom formula:
=and($B1>$F1,isnumber($B1))
Range A1:Fnnn where nnn is the end of your sheet.

Find similar values and move cells in Google sheet

Basically, I have Google Search data for two different months in one Google Sheet. I'm trying to align similar terms with their data for both months.
Here's the Google Sheet -> https://docs.google.com/spreadsheets/d/17Xu5_37aLJW3yBCJ8SbquexNHShMwsApF-2BpBEhpcA/edit#gid=0
As you can see in the Sheet, we have data in Black and Blue color, Black represent July and Blue represent August.
In the sheet, you can see A8 and A9 search terms are also found in Blue (August) at G6 and G7.
How do I move the data so that both months search term aligns?
it's either first one or second one you seek:
=ARRAYFORMULA(IFERROR(VLOOKUP(A:A, G:L, {1,2,3,4,5,6}, 0)))
=ARRAYFORMULA(IFERROR(VLOOKUP(G:G, A:F, {1,2,3,4,5,6}, 0)))

Conditional formatting based on cells matching a column of another sheet

I've got a spreadsheet made on Google Sheets that contains 11 sheets, and each sheet is a set of things that I'm considering buying.
Some sets contain the same individual pieces as something else.
For example item A might be on sheet A and sheet D.
I'd like to make some kind of formula to highlight all duplicates, so that when I was looking through the sheet I could see whether buying item A will help me complete more than just the set that I'm looking at. So I can look at a set and if it's mostly green I know there's more value in buying it as almost all of the contents will also go towards another set.
I know how to do it so that they glow if they match on the same sheet.
$A2=$B2
However I'm not sure how to do it across sheets, or how I'd include if statements. As the colour would have to change if it matches any cells in column A on any sheet. They're also not in the same order on different sheets so while item A might be in A3 on sheet A, it might be in A17 on sheet D.
I'm not sure how possible something like this is, but I'd appreciate any help.
Google Sheets does not allow direct references to cells in other sheets in conditional formatting formulas. But this can be circumvented with indirect:
= A2 = indirect("Sheet2!A2")
formats the current cell (A2) if it's the same as the contend of A2 on Sheet2.
But you want to check whether the content is duplicated anywhere in column A of another sheet. This can be done with match: select the column A2:A of the present sheet, and add conditional formatting with custom formula
=match(A2, indirect("Sheet2!A2:A"), 0) > 0
Here match returns either the position of found element (a positive number) or #N/A, and the formula evaluates to True in the former case only.
Although the formula says "A2", it can be applied at once to any range that has A2 as its upper left corner.

Change color of cell if sum of row drops below 2

I'm working on a sheet to help me keep track of inventory at a bookstore. Here is a watered down version. There are 19 titles in total, kept at three different warehouses. I'm working on a notification system where the top box will turn red if the sum of books in any single title drop to 3, so I know it time to restock.
How can I do that?
NOTE: I can't add another column to get the sum value. The original spreadsheet is pretty crowded as it is.
The full sheet is in the copy of Inventories.
A custom formula in conditional formatting to achieve this:
=ARRAYFORMULA(MIN(SUMIF(IF(COLUMN(C3:E3),ROW(C3:C21)),ROW(C3:C21),C3:E21))<3)

Resources