Google Sheets - merge duplicates "join" alternative - google-sheets

CONTEXT:
I have a script that fetches some infos from gmail - "Emails Received" sheet - like from, cc, subject, to.
Sometimes the email subject isn't exactly the same but what's important it's the reference always indicated on the subject - e.g. 9052/18.6T8TER in subject: "Re: payment proof 9052/18.6T8TER".
I've created another sheet called "Emails Joined" that extracts that important reference from the subjects on Column A; merges the remaining data that belongs to all emails that have that same reference within email subjects
Using "Join" as is now, Array doesn't work and it makes the script a lot slower when it's fetching the emails as, I assume, it's always trying to join the results.
WHAT I'M LOOKING FOR
A better alternative to Join, keeping in mind that I don't want to match the full subject but instead the reference that's contained within the email subjects
An alternative that doesn't make the script so slow but if that's not possible, I also saw some posts about using If to "stop" a formula and maybe that's the way to go so the merge doesn't interfere with the email fetching
Can anyone point me in a better direction?
Thanks in advance.
Test Spreadsheet

Take a look at the new tab called MK.help. 3 formulas in B2,D2 and E2. This is the one for B2, it's based on a concept I learned here on Stack from #Player0.
=ARRAYFORMULA(SPLIT(TRANSPOSE(TRIM(QUERY(QUERY({REGEXEXTRACT('Emails Received'!C2:C&"|";"[A-Z]\D*([ \d|/\(.|_)\d A-Z+]+)\[?")\CHAR(9679)&TO_TEXT('Emails Received'!D2:D)&CHAR(10)};"select MAX(Col2) group by Col2 pivot Col1");;9^9)));"|"))

Related

How do I return missing data when comparing two columns?

I've read a few similar questions, and I can't seem to find exactly what I'm trying to do.
I have a roster of employees in sheet "Roster" with their names in Column A. In sheet "Hours" I have a list of assigned jobs for tomorrow, with the assigned employee's name also in Column A. I'm trying to add a column of employees from the roster that are NOT in the list of employees on jobs.
The closest I've gotten is with this, on the Hours sheet:
=ARRAYFORMULA(VLOOKUP('Roster'!A2:A, A2:A,1,0))
which gives me a list of the entire roster, with the missing ones returning an #N/A error that tells me the missing name when I mouse over it and read the error code. Is there a way to just get a list of the errors? Would I be better off attacking this from a completely different angle?
EDIT: Sanitized example pictures. If what I was trying to do worked, it would return Bob and Jim in this example.
Assuming you're trying to return this list in the "Hours" sheet, you can build off what you had. Try this:
=ARRAYFORMULA(FILTER(A2:A,ISERROR(VLOOKUP('Roster'!A2:A, A2:A,1,0))))
Keep in mind that this formula was written sight-unseen. If it doesn't work as expected, consider sharing a link to a copy of your sheet (or to a sample sheet set up the same way and with enough sanitized but realistic data to illustrate the problem, along with the manually entered result you want in the range where you want it).
I ended up going a completely different route. I made a third "Under the Hood" sheet, pulled the two columns into it with queries, ran a match formula down the list and returned "" on errors, then ran a query on Hours to get the names where it had null for the match list.

Google Sheets: How to Filter Vertically Merged Cells

I've come looking for help regarding this issue. I'm a teacher, and am trying to help my students get all their documents together for university applications. Google Sheets tell me that I'm not able to filter cells containing vertical merges, but I want to filter by the earliest application deadline (column G) so I know which student I have to chase up first, second, third, etc., without losing the rest of the data in the row.
Does anyone know a good way of doing this? I've created a sample of my spreadsheet: here.
Thanks in advance.
Try Insert > New sheet and this formula in cell A1 of the new sheet:
=query('2021'!A1:Z, "where G is not null order by G", 1)
The sorted list is for reference only. You will need to continue to do your editing in the 2021 sheet.
I would split the data between a couple of sheets.
In the first sheet you'd have important data that can be seen at a glance and filtered easily, like student names, universities and deadlines.
In the second sheet (which you can link by student name or id) you can put extra info like necessary documents, urls etc - something like this.
Alternatively keep all the info in one sheet but don't use split columns or rows - it isn't conducive for sorting, filtering and viewing data (and what's the point of data if you can't analyse it?)

Personal Finance Sheet - Copy and Paste Transactions

I'm trying to make a personal finance sheet. I would like to take the transactions from my bank and copy and paste them into "Current Results" Table. That way I don't have to manually put them in each day. The problem I am having though is the transactions are hard to read with all the numbers and other words that I don't need.
Here is my question...
Is there a way to check the "Transactions" table and change the transactions to match what is on the items list table? (See Desired Results Table)
View example spreadsheet here.
https://docs.google.com/spreadsheets/d/1dT7NtWysMOri9XxmYwCqJCNcL_-ZGtU0H1-BpFd3d4c/edit?usp=sharing
Another example here.
Change - PURCHASE WENDY'S CITY STATE CARD1234 - To ---> Wendys
Here are the formulas that I tried to get to work.
REGEXREPLACE(B8:B21,"something",K7:K23)
VLOOKUP(K7:K23,B8:B21,1)
Thanks for all of your help! I really appreciate it.
You can use the following formula
=ArrayFormula(REGEXEXTRACT(PROPER(B8:B21),PROPER(REGEXREPLACE(JOIN("|",G7:G),"\|+$",""))))
The "red words" you notice can not be extracted giving a #N/A error, since the sheets have no way of knowing them.
This can be remedied by adding them to the Items List
Functions used:
ArrayFormula
REGEXEXTRACT
PROPER
JOIN

Summarise row data by removing blanks and use heading (Google Sheets)

I am looking for some help with summarising subject data.
We have 550 pupils who select subjects and our system outputs the information into a Google Sheet like this https://docs.google.com/spreadsheets/d/13rKygFBINl6nBBlHch0Gqo39iaoEYPTBfVCxoAs3QP4/edit?usp=sharing
I want the info to come out summarised, so we see the user info and the subjects they chose.
So this would mean when a cell is found to contain text along the row to reference the column heading and put this information into the second sheet under the subject 1 heading.
I have tried to show in sheet 2 called "Should look like this" so you can get an idea of what it should look like.
Is this possible in Google Sheets?
here is a copy of your sheet with the solution in cell A2 on the tab called Classes By Student.
=ARRAYFORMULA(IFERROR(SPLIT(TRANSPOSE(TRIM(QUERY(TRANSPOSE({Data!A2:E&CHAR(10),IF(Data!F2:AX="",,Data!F1:AX1&CHAR(10))}),,9^9))),CHAR(10)&" ",0,0)))
It is also possible to make a similar transformation that i've done on another tab called Students by Class.
QUERY() smush can be a powerful tool for problems like this. it consists of leveraging the query "header" argument to smush together entire columns of data all together, before splitting them back out without missing spaces.

Formula (Array, etc.) for automatic Google Sheets Indexing using inputs from Google Forms

I'm hoping that someone can help me tweak (or even substitute) a formula that I'm using in Google Sheets to automatically populate columns with information based on inputs from a Google form.
Simply put, I am using the Index function to match the name that is selected from a drop-down menu in the Google Form and arrives in Column E of the Google Sheet receiving the responses with an identical list of names in Column A of 'Sheet 2'. The index formula takes information from 'Sheet 2' relating to that name (e.g. Registration Number, Email Address) and places it in the 'Formresponses 1'sheet alongside the inputs from the Google form (including, of course, the name that appears in Column E'.
I have been using (variations on) the following formula without any issues, but I have to manually drag it down the relevant column in 'Formresponses 1' each time a new entry/name arrives from the Google Form: =index(Sheet2!$B$2:$B,match(E2, Sheet2!$A$2:$A,0),1)
I have successfully used Array Formulas to automatically carry out other functions on data arriving from a Google Form (i.e. adding up individual numbers to arrive at an overall total), but in this case I cannot figure out how to create a formula that will automatically take each new name that arrives in column E and insert it into the relevant indexing formula at that end of that new row.
Any suggestions - or solutions! - would be greatly welcome!
Thanks,
A.
Cheers I'-'I,
I've used I'-'I's response to my original question here as a starting point and, with a bit of research, I've come up with the following working formula:
= ArrayFormula(vlookup(E2:E, Sheet2!A:E, {1,2,3,5},FALSE))
[The curly brackets simply indicate the columns in Sheet 2 from which I want to pull pieces of data relating to each name that is matched up in the 'front end' sheet receiving the responses from the Google Form.] As with my previous problems with array formulas, I found the following website really useful, so full credit has to go to it: benlcollins.com

Resources