Google Sheets copy between columns based on match? [duplicate] - google-sheets

This question already has answers here:
How to do Vlookup using two search columns to compare with two result columns?
(2 answers)
Closed 1 year ago.
See my following spreadsheet: https://docs.google.com/spreadsheets/d/1SO3Z-liX1T61W47gKv5ugWFiQKsHa0-XBQsi1A7dTE0/edit?usp=sharing
I'm trying to create a formula that I can put into column C (the missing emails) based off of the names and emails in columns E-G.
In other words, I'm only missing the emails for folks to the left. The columns on the right has the data I need. I just need a formula that will auto-fill the missing emails based on matching the names in columns A/B and E/F.
I hope that makes sense. This is just an example spreadsheet. The real sheet I need to work with has hundreds of missing emails.

=ARRAYFORMULA(VLOOKUP(A2:A8&B2:B8,{E2:E14&F2:F14,G2:G14},2,0))

Related

How to Query a column where numbers are mixed with text (GOOGLE SHEET) [duplicate]

This question already has answers here:
Query is ignoring string (non numeric) value
(2 answers)
Closed 5 months ago.
I'm using a query to pull data from a multi-sheets in Google Spreadsheet that is populated by a Google Form. If the form has only numbers, there is no problem. However, if there's a mixed of text and number then it did not work.
=QUERY({Sheet1!A:S;Sheet2!A:S},"SELECT* WHERE Col4<>''",0)
EDIT: Added the second one here:
=QUERY(Sheet2!A:S,"SELECT A,C,D,E,F,G,H,I,J,K,L,R WHERE G IS NOT NULL ORDER BY G LABEL R 'FRUIT'",TRUE)
Regards,
Yes, this is how QUERY works. It only pulls the most frequent data type per column. To pull mixed data types, you can use FILTER:
=FILTER({Sheet1!A:S;Sheet2!A:S},{Sheet1!D:D;Sheet2!D:D}<>"")

Google Sheets SUMPRODUCT/COUNTIF formula question

I am currently working on a google sheet where I'm counting the number of schools that have a device assigned. One of the ranges that I'm pulling contains duplicate device serials from another column.
My question is what would be a good formula given that i'm counting column A but i want to not include anything that might be a duplicate in column C.
For example:
A---------------B-----------C
RHS---------date------0011
EHS---------date------0082
EHS---------date------0064
EHS---------date------0082
SHS---------date------0058
I want to count EHS in Column A but exclude the duplicate number in Column C. The answer should be 2
Thank you for any help!
You can use COUNTUNIQUEIFS():
Formula in E1:
=COUNTUNIQUEIFS(C1:C,A1:A,"EHS")

Combine multi-row source data across separate tabs into one summary tab without using hard references to individual sheet names [duplicate]

This question already has answers here:
How to create INDIRECT array string of multiple sheet references in Google Sheets?
(2 answers)
Closed 2 years ago.
I would like to create a summary sheet that reports the same data from across multiple tabs and doesn't rely on referencing individual sheet names in the formula/code. I have successfully done this when there is only one line of data representing each tab (using getSheetnames or Index scripts).
But, the data I want to summarize has multiple rows from each tab that need to be reported on a summary sheet.
I've successfully managed to combine and report the data from separate sheets into the Summary using a query/array combo where the query range includes each sheet and separated with ";". This can be done using cell references to the Sheetname list as well.
However, this needs to be more dynamic as sheets will be added/removed regularly and I would like to not have to re-write the query every time to add/remove individual sheet names.
SUMIF also works, but with similar limitations.
I believe my main challenge is using a list of sheet names which I can generate (listing one sheet per row) and associating those names formula/code that will produce summary results in multiple rows.
If Sheet names are in Column A, the following formula displays data combined from multiple tabs
=ArrayFormula(query({INDIRECT(A3&"!A2:A200"),to_text(INDIRECT(A3&"!B2:B200")),INDIRECT(A3&"!C2:C200");INDIRECT(A4&"!A2:A200"),to_text(INDIRECT(A4&"!B2:B200")),INDIRECT(A4&"!C2:C200")},"select Col1,Col2,Col3 where Col1 contains 'Project'"))
BUT, I want to reference my Sheetnames list without having to write in actual sheetnames or cell references to the formula.
Here's a link to a dummy workbook with sample.
I realize I'm late to the party on this question, but have you considered a Google Form with 5 questions:
Project?
Phase?
Transaction?
Start?
End?
That way, all your data would be in a single tab. People could input using the form, and you could still have project by project outputs for viewing/analysis using a simple query.
Google Sheets was designed from the ground up to be different from excel in specifically this way. There are all sorts of incentives to condense your data SOURCES while making it easy to disaggregate your ANALYSIS. While Excel is exactly the opposite. It's easy to keep track of things on tons of different tabs, and aggregate it all in one place. Yet there is no such thing as FILTER() or QUERY() to do the opposite.

How to create a runing total formula that expands automatically when new rows are added to my spreadsheet [duplicate]

This question already has answers here:
Fill down - Google Apps Script for Spreadsheets
(4 answers)
Closed 4 years ago.
Hello right now I have a simple deposit / expense spreadsheet where I have a sum formula that does down column C adding(or subtracting) from what is put into column B. Formula is =SUM($B$1:B1) This works great for the rows that are created however when I add a new row. I have to drag down the forumula in C to cover the new row before it will calculate the new total. I would like this to be done automatically. IE I add a new row and it calculates C from what I entered in B and the history in C. Can't seem to find how to do this. Am using Google Spreadsheets so unsure if this is even possible.
This other question seems to be very complex coding for something else. My question was answered however by user JPV below. Thanks to him for his time.
Remove contents of column C and then try in C1 this formula
=ArrayFormula((IF(LEN(B1:B), SUMIF(ROW(B1:B),"<="&ROW(B1:B),B1:B),)))

UNPIVOT function in Google Sheets [duplicate]

This question already has answers here:
How do you create a "reverse pivot" in Google Sheets?
(10 answers)
Closed 5 months ago.
Background: Have a sheet that is being constantly updated with new rows, where the rows are in a PIVOTED fashion. Think left column is date, following columns are staff-ids - extending to right as new staff joins.
I have researched a bit - but did not find my required solution. Eg: the QUERY function has PIVOT but NO UNPIVOT function. So ...
Is there a FORMULA based method (without scripting) that can produce the normalized/UNPIVOTed data from the already pivoted data?
I'm not looking for a solution, hence no sample sheet. But rather, if this is possible, please point me to the functions that could do it ?
I don't know a formula that does this directly. What I would do is:
1) Use COUNT() twice, to count the columns and rows that contain data. Let's call these C and R.
2) Use simple formulas to write all combinations of C and R into C*R rows and 2 columns. Use more rows to allow for C and R to grow.
3) Use OFFSET() to read the pivoted data into the 3rd (unpivoted) column.
4) If you need to get rid of empty cells, use QUERY() on the 3 unpivoted columns.
Hope that helps.

Resources