Distinguish between two variables in one column - google-sheets

I am working with dynamic data which will populate my Google Sheet from a Form.
Basically we work with two companies at a time who assess different client opportunities. This sheet feeds into Google Data Studio.
In order to avoid manipulating the data in the sheet each time we want to display info in Data Studio, for each client that is assessed I am trying to use a formula to attach a tag in column F. Client assessed with the number 1 for the first assessment and Client assessed with the number 2. I.e: Lloyds1 or Lloyds2.
This would be easily doable if only one person from each company assessed client account but in fact it could be two or three from each company.
In the case of one person from each company i used this:
=IF(ISBLANK($D2),,(D2&COUNTIF($D$2:$D2,D2))) - worked because there would only ever be two entries
I've tried to adapt this to COUNTIFS but it doesn't work.
Hopefully I explained this problem ok and someone can help
Link to sample spreadsheet:
https://docs.google.com/spreadsheets/d/10sqp0zpThdtdRws2p2Dqs0n8IwxwBIpwk-ibH5vofGQ/edit?usp=sharing

So, I couldn't do it all in one formula as the countifs was not working for me as well. So I had to do it in a support table (which you can put in a support tab or something where you can hide it):
The support table I did was the following:
cell A2: formula: =ARRAYFORMULA(if(len(B2:B),B2:B&""&C2:C,))
cell B2: formula =unique(E2:F)
cell D2: formula =ArrayFormula(if(len(B2:B),countifs(B2:B,B2:B,row(B2:B),"<="&row(B2:B)),))
And then in the cell, you want you may have the following:
=ArrayFormula(IF(ISBLANK(E2:E),,(E2:E&vlookup(E2:E&""&F2:F,A2:D,4,false))))
It should look like this:
It is not the neatest solution, but it works and is dynamic

Related

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: 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?)

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.

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

Using text from a cell in a formula in Google Sheets

I would like to use the text from a cell in a formula in Google Sheets.
I have a document with multiple sheets that a variety of people can edit with a H,M,L (high, medium, low) value from a drop-down list. Each person has their own tab in the Google Sheet.
I then have a dashboard that populates based on their choices of H,M,L. I know that I can use the formula =('Jay Delacruz'!C6) for example to populate a cell in another sheet by manually selecting the cells on the other sheet.
However, I am looking to make quite a few of these documents automatically with another Google Script that I am running that creates the individual sheets from a roster of names on the first tab.
My question is, is it possible to have a =('Jay Delacruz'!C6) type formula that instead of the sheet reference it can pull the name of the person from the roster, as this will match exactly the sheets that are automatically generated by the script I have running.
So I would essentially have a pre-populated dashboard of formulae that would become valid once the sheets are created with the names, as created by the other script.
If it makes it a little clearer, there is a link below to make a copy of the Sheet I am working with. All names were randomly generated, so don't reference any real people or data.
https://docs.google.com/spreadsheets/d/1NiXqko8SibD6VsfrnFcj7e7c99Hg-RoSlHVAYWb0E94/copy
Thank you in advance!
Liam
Try
=INDIRECT(C1&"!C6")
Also see here for more info on INDIRECT() function.

Resources