Automating Aggregating Data in Google Sheets - google-sheets

I have 100+ rows that are updated daily and as of now I have to update my last column manually. In my last column "Key Results Aggerated" I have to manually copy and paste Key Results into single cells per employee. I spent hours trying to figure out a solution but I am unable to. I have tried using import range function and concatenate function but I am having a hard time automating it since users can always add/remove a new row for "Key Result" at any time of the day. Thanks in advance. 🙏
Pic: Raw Data
Pic: Results I am trying to achieve.
Google Spreadsheet Example

You may insert this in E1 and protect that row:
={"KEYS";MAP(A2:A,D2:D,LAMBDA(aval,dval,IF(aval="","", TEXTJOIN(CHAR(10),1,dval:INDEX(D:D,ROW(dval)+IFNA(XMATCH("*",INDEX(A:A,ROW(aval)+1):INDEX(A:A, ROWS(D:D))),ROWS(A:A))-1)))))}
Erase previously all the prior formulas in E. Let me know

Related

How do I pull the first instance of an open orders expected receive date into a different Google sheet, comparing parts lists

I'm working on an inventory system in Google Sheets and I need to pull data from one sheet into another sheet within the same work book.
I have two lists of parts, one is an indented BOM, that shows quantity of parts. The other is a Purchasing/Receiving log for inventory.
I need to compare the BOM with the Purchasing sheet to find the first instance of an order for that part, then check if it is still open or not, then pull the expected delivery date into the matching row in the BOM sheet assuming that order is still open.
These are the two formula I have that are the closest.
=IF(ISBLANK(A2),"",(SUMIF('PURCHASING/RECEIVING LOG'!D:D,B:B,'PURCHASING/RECEIVING LOG'!L:L)))
This one SUMS the date value, resulting in way off dates when converted back into a date format, but it correctly lines up all dates from PURCHASING RECEIVING, that match part name in BOM
=IF(B:B='PURCHASING/RECEIVING LOG'!D:D,IF('PURCHASING/RECEIVING LOG'!C:C="OPEN",'PURCHASING/RECEIVING LOG'!L:L,"WRONG"),"WRONG2")
This one correctly checks if the purchase order is open or not, but it only pulls the date if the rows match, instead of matching up the data for both columns. So if 'BOM'!B2 = 'PURCHASING RECEIVING'!D2. I need to check if any row in 'PURCHASING RECEIVING'!D:D = 'BOM'!B2, then B3 then B4 etc. Then pull the relevant information from 'PURCHASING RECEIVING'!L:L
Neither of them pull only the first instance of a matching open order.
There are duplicate parts in both the BOM and the Purchasing sheet, since multiple machines use the same parts, and we have multiple open orders for the same parts at any given time.
Any help or if someone could point me in the right direction would be greatly appreciated.
Please let me know if there are any questions.
Thank you.
EDIT: Added sample sheet
https://docs.google.com/spreadsheets/d/1fsrl4h__GbtHeHUCBs0PS25HR8MhWEplQ2bY-qcdWlw/edit?usp=sharing
You can use a QUERY on the second sheet to pull the required date, for example in cell G3, you would use:
=QUERY('PURCHASING RECEIVING'!$B$2:$E,"select min(E) where B = 'OPEN' and C ='"&E3&"' label min(E) ''")
And then drag down to the rest of the rows.
Sample Output:
Reference:
QUERY function
Query Language Reference

Multiple criteria Countif unable to match due to date range, importrange

I am attempting to build a live dashboard for our lovely mechanics to see how many services they have completed in a day. The majority of the time it will be used to only show services from a certain mechanic on today's date, however I would like to be able to change the date it shows date for and so would like to be able to grab that criteria from a certain cell in sheet.
My current thinking is that the dashboard would have a formula like this:
=COUNTIFS(
IMPORTRANGE(
"https://docs.google.com/spreadsheets/d/1bx65qPAChwZ8uxwJsMfh-w5uALdKVdnn8x7LXD6J3zs",
"Servicing!A:A"),
D1,
IMPORTRANGE(
"https://docs.google.com/spreadsheets/d/1bx65qPAChwZ8uxwJsMfh-w5uALdKVdnn8x7LXD6J3zs",
"Servicing!C:C"),
C7)
D1 is where i can put in the date. C7 is where the mechanics name is held. My thinking is that this is not working as the data is populated using a google form. This google form records a timestamp in the following way '3/13/2020 12:09:56' Meaning that It will only match this data if the exact same time matches. Is there a way to make it search for ALL records on a date instead of all from a precise time?
Thanks for reading!
I was able to remove the time from the google forms output by adding and extra column and using this formula
=TO_DATE(DATEVALUE(B805))
B805 is filled by the time stamp from the google form
I then made my formula search for the info in the new colum with the above in each cell. It worked! :)

How to combine data from multiple Google Sheets and organize/filter it?

Here's my sample spreadsheet: https://docs.google.com/spreadsheets/d/1c-nXosPZvnEplFME6GHXlxuQUrVe4ImF5c5Go9_75DU/edit#gid=34769607
I use an API to import data from our time tracking app into Google Sheets. The "Project Details" sheet has most of the info about the projects, except for the hours spent on each project. So I have a "Project Hours" sheet that has the hours spent.
I want to combine these two things into one list in a separate "Main" sheet, as well as leave out columns that I don't care about. I really only care about the project name, the client name, the start date, end date, and total hours.
There must be a simple formula to use that gives me a clean list of all the projects and only shows me the data I care about, like QUERY or ARRAYFORMULA, but I'm not very familiar with those. Any help would be appreciated!
Craig. Yes, a QUERY with a VLOOKUP can accomplish this. I added a new tab (clearly marked as mine) to your example sheet. Being thorough, I wanted to include the column header in the last column as well, which makes the formula a bit longer than it would otherwise be in that it uses the IFERROR wrap on the VLOOKUP to assign the header for Row 1 (or otherwise leaves the last column blank if no match is found for a project name).
Here's the formula I used (though other approaches could certainly have been used as well):
=ArrayFormula({QUERY('Project Details'!A:Y,"Select B, Y, P, Q Where A Is Not Null"),IFERROR(VLOOKUP(QUERY('Project Details'!A:A,"Select * Where A Is Not Null"),'Project Hours'!A:E,5,FALSE),IF(ROW('Project Details'!A:A)=1,'Project Hours'!E$1,""))})

COUNTIF with IMPORTRANGE with date range and unique ID criteria

I haven't been able to find a solution to get this formula to work after multiple days of searching. The google spreadsheet we use is large and used by many people so I would like to keep this in a separate google sheet using IMPORTRANGE.
Data Needed:
Count of assignments a specific user completed within 7 days and after 7 days based on a start and end date.
Where I'm running into issues:
I simplified the equation by using a small data set in the same sheet to see the main issue. When giving a range for the user # the formula doesn't work anymore. When only comparing it to one user # at a time it does.
For example:
This doesn't work:
=COUNTIFS(C2:C-B2:B,"<7",A2:A,E2)
This one does but needs to have the range for the table to work:
=COUNTIFS(C2:C-B2:B,"<7",A2,E2)
I might be going about this all wrong. Any help I could get is much appreciated.
E2: =UNIQUE(FILTER(A2:A, A2:A<>""))
F2 and drag down: =COUNTIF(ARRAYFORMULA(DAYS(FILTER(C$2:C,$A$2:$A=$E2),FILTER(B$2:B,$A$2:$A=$E2))),"<=7")
G2 and drag down: =COUNTIF(ARRAYFORMULA(DAYS(FILTER(C$2:C,$A$2:$A=$E2),FILTER(B$2:B,$A$2:$A=$E2))),">7")

Can I make Google Sheets evaluate a string input as if it were a formula?

I am creating a home budget for myself in Google Sheets, working in Chrome on Windows 10. In the end, the budget will be composed of separate sheets for each month, containing tables for each Friday (payday) within that month. All such tables will follow a certain format and will pull arrays of budget data from an auxiliary sheet.
However, trial-and-error (mostly error) is abundant, and one quails at the thought of having to paste corrections across 52 tables. Is there any way to have each table emulate a formula set down in a template? For example, ideally, my template would contain something like:
=INDEX(IF(condition(relativeCell),namedRange1,namedRange2)
and the final product would pull that formula (with relative reference) to each table. If I discover a mistake or need to make a change, I can simply change the template, and all of the live tables would update their formulas.
Can this be done in Google Sheets?
Failing that, I already have a function that returns a cell's formula as string text. Can this be used to get the desired effect?
there is a formula called INDIRECT which does exactly that:
https://support.google.com/docs/answer/3093377?hl=en

Resources