Google Sheets: How set value from two matched columns? - google-sheets

i'm trying to transform data from a row only list to a row-column structure.
I got data in I:K and want to set the values from K to the corresponding cells in A:H where Date and Time Values from I & J have to match within A:H.
example sheet
Does anyone know how to do this with Google Sheet system functions?

Yes, it can be achieved by using sumifs formula, simple and straightforward, here is the formula:
=SUMIFS($I$2:$I$13,$G$2:$G$13,$A5,$H$2:$H$13,D$1)
And this is how the Gsheet look like, accept if helping you :)

Related

Potentially complicated formula with FILTER, VLOOKUP and multiple sheets

I am looking at using a filter to pull data from one Google sheet automatically to another Google Sheet.
The problem is, some of the values in the cells contain "," which mismatch my vlookups.
I have figured out the formula I need to automatically filter this, but I can't wrap my head around how to insert it with a filter formula.
EDIT: The below formulas are on a separate sheet to Data1 & Data2 called "Filter Sheet"
Here are the two formulas I'd like to combine:
=filter('Data2'!C2:C,'Data2'!A2:A="uk")
This one cleans up the values with "," in them:
if(REGEXMATCH(A8,","),iferror(VLOOKUP(index(split(A8,",",1),1,1),'Data1'!A2:A,1,0),iferror(VLOOKUP(index(split(A8,",",1),1,2),'Data1'!A2:A,1,0),false)))
**EDIT:The formula above looks to a different sheet (Data1) to see if the "split" result matches the VLOOKUP on the current sheet. If it does not then it goes through a loop to finally find a match on Data1 Sheet.
Essentially, I want the second statement to**
How do I insert this "clean up formula" so it can work with the filter formula values?
EDIT: How can I combine the filter formula with the "if(regex etc. formula" based on the conditions set?
OR is there an easier way of doing this?
If this helps with an easier method:
The reason why I use a filter formula is because not everything in Data Sheet 1 is found in Data Sheet 2, so this smooths that process out.
Your help is greatly appreciated and thank you in advanced.
Try this formula directly
=filter(Data2!C2:C,REGEXEXTRACT(Data2!A2:A, " (uk)")="uk")

Google Sheet SUMIF across range of cells

I am trying to use a formula in google sheets to find averages based on the contents of a different cell.
Below is some sample data, I am pretty sure I have done similar in the past in Excel by using table headers as a reference but struggling to see how to achieve this in google sheets.
Columns B, C, D to be calculated, currently this is the formula used for D3 (same sort of thing for D4) =IFERROR(ROUND(SUM(E3:H3)/COUNT(E3:H3),2),0)
Just needing to work out the formula for the cells with red text, any help would be appreciated.
as an example C3 would be the average for any numbers in row 3 where it has DeviceB e.g. (2+10+6)/3
Try
=AVERAGEIF($E$2:$H$2,B$1,$E3:$H3)
AVERAGEIF

How can I concatenate and transpose two ranges of cells in Google Sheets?

I have a Google Form linked to a Google Sheet. It has a number of questions with responses that I need grouped into specific columns. I also need to keep the columns in the order they're in.
I was working with a formula someone helped me with to do one single range:
=ARRAYFORMULA({"Job Responsibilities";IF(A2:A="",,TRIM(TRANSPOSE(QUERY(TRANSPOSE(H2:V),,100))))})
However in the instance I am having problems, I need to group together the answers that are in columns W - AK and also BA - BO into one cell.
I tried something like
=ARRAYFORMULA({"Supporting SAP Stream";IF(B2:B="",,TRIM(TRANSPOSE(QUERY(TRANSPOSE(W2:AK)TRANSPOSE(BA2:BO),,100))))})
or
=ARRAYFORMULA({"Supporting SAP Stream";IF(B2:B="",,TRIM(TRANSPOSE(QUERY(TRANSPOSE(W2:AK, BA2:BO),,100))))})
But that makes an error.
Is there another modification I can make to concatenate and transpose the values in these cells?
Here is a link to a Google Sheet showing most of what I'm referring to. It's from an earlier iteration, so it's not 100% exact with what I said above, but the goal is still the same. In this Sheet, I would like to concatenate what's in Columns U - AG and AU - BF.
Update, based on the data in your sheet:
=ARRAYFORMULA({"Supporting SAP Stream";IF(B2:B="",,TRIM(TRANSPOSE(QUERY({TRANSPOSE(U2:AG);TRANSPOSE(AU2:BG)},,100))))})
Try:
=ARRAYFORMULA({"Supporting SAP Stream";IF(!B2:B="",,TRIM(TRANSPOSE(QUERY({TRANSPOSE(W2:AK); TRANSPOSE(BA2:BO)},,100))))})

Google Sheets: Use ArrayFormula for JoinText for multiple columns

I want to Use ArrayFormula for JoinText for multiple columns which have their own ArrayFormulas in Google Sheets.
My formula works for columns that have plain text values but for some reason Google Sheets gives me an error when I apply it to columns that have their own ArrayFormulas applied to them.
Take a look at the example sheet I've created HERE
Any help will be appreciated!
I hope this solution with query is helpful for you:
=ArrayFormula(transpose(query(transpose(C1:D),,2)))
(Will work faster if you know the limit of the range, e.g. C1:D10).
For implementing commas between the columns you can use
=ARRAYFORMULA(IF(C1:C="",D1:D,if(D1:D="",C1:C,C1:C&", "&INDIRECT("D1:D"))))
I put this formula in cell I2 on your sample sheet. It should be relatively fast for many thousands of rows.
=ARRAYFORMULA(SUBSTITUTE(TRIM(C2:C&CHAR(10)&D2:D),CHAR(10),", "))

How can I use nested formulas in the ARRAYFORMULA function in Google Sheets?

I need Google Sheets to compute sums for each row using the arrayformula() function.
I know I can manualy enter somthing like;
=ARRAYFORMULA(A:A + B:B + C:C)
but I need the use of the functions to do it.
I've tried many things including;
=ARRAYFORMULA(sum(A:A,C:C))
Here is a sample file that I could use help with.
This formula works in cell G3 of your test sheet:
=ArrayFormula(mmult(ARRAYFORMULA(IF(ISBLANK(A3:C),0,A3:C)),sign(transpose(column(A3:C)))))
I've used a custom format to hide the zero values on the empty rows as well
Formulas
Addition (SUM)
QUERY function
=QUERY(A3:C20,"Select A+B+C Label A+B+C ''")
Concatenation
& operator
=ArrayFormula(J3:J20&K3:K20&L3:L20)
CONCAT function
=ArrayFormula(CONCAT(CONCAT(J3:J20,K3:K20),L3:L20))
Explanation
Besides ARRAYFORMULA, Google Sheets has QUERY, FILTER, ARRAY_CONSTRAIN, among other functions that could help you to handle array operations. Take a look to Function List to have the complete list. Also could be very helpful that you to take a look to Using arrays in Google Sheets.

Resources