Google Sheets removing duplicate data based on date and data - google-sheets

I apologize if I've overlooked any similar questions that have been answered regarding this issue. I spent a few hours looking through as many questions as I could, but none have gotten close to helping me resolve this particular problem...
I'm working with Google Sheets along with a form to help populate a chart that gives us the locations of equipment based on serial numbers (screenshots below).
The chart is arranged by building names that have the potential to house equipment in column A and equipment types in columns B-H. The form attached to this chart sends its submissions to a second sheet, which is where I draw the data from. I am using MAXIFS to populate the
The problem I'm having is that when a new form submission is entered into the second sheet regarding the movement of a piece of equipment that has previously been moved, the chart will list that equipment in two places instead of simply listing it in the newest location based on the newest form submission. Obviously an item can't be in two places at once.
chart sheet
form sheet
As you can see from the screenshots above, in the "chart sheet" it shows 9006 in three different locations. In the "form sheet" it shows that 9006 was moved from LSB to HSB and then to Admin (in column D).
What I'm looking to do is remove all previous submissions regarding a piece of equipment and only using the newest submission in the chart sheet so that it shows me that piece of equipment in only its newest location. I've tried using UNIQUE, FILTER, and QUERY to try to get the results I'm looking for, but to no avail.
Again, I apologize if a similar question has been answered previously. If any further information based on this question is needed, I'll gladly provide it. Thank you!
EDIT: Here is the "form sheet" with the properly spaced timestamp column.
form sheet2
EDIT 2: The equipment are labeled with similar serial numbers but are proceeded by different letters (ex: X9006 and B9006 have similar numbers but are separate pieces of equipment because of their preceding letters.) The serial numbers are listed in column C of the "form sheet" and the preceding letters are in column B of the "form sheet". The answer from player0 works wonderfully, but only considers the serial numbers without regard to the letters in column B. Some buildings may contain different pieces of equipment with the same serial numbers, but have different letters. I would like for the chart to have the ability to list the same serial number on the "chart sheet" only if the preceding letters are different. I hope this makes sense.

try:
=SORTN(SORT(A2:D; 1; 0); 9^9; 2; 3; 1)

Related

Google Sheets- Tally unchecked boxes across multiple sheets

I humbly seek your help.
I'm working on tabulating a bit o' data for a project at my school.
Spreadsheet Info
I have a spreadsheet where teachers have to click their name (which is linked to their own sheet). This brings the teachers to a sheet that contains the roster of their homeroom students. The teachers need to tick a box in columns B, C, and D to indicate if the students brought their charged chromebook, their charger, and their sleeve. They left the box unticked if the student did not complete this task. This spreadsheet contains 70 teacher's names and 1800 student names.
What I'm seeking help with
The teachers have completed their task- and I'm trying to tabulate the # of unchecked boxes for each column (B,C,D) per teacher (or, per sheet). I know how to sum the unchecked boxes. What I need help with is trying to find a way to apply a formula across 70 sheets w/ unique names (without manually typing each unique name in a formula). My limited formula knowledge results in being unable to copy down (or across) formulas when the sheet name is referenced via link in a column.
Simplified Example Sheet:
I have a simplified example linked below.
https://docs.google.com/spreadsheets/d/14MyEFUwm-QmdTf7oxrnJPnoZJEGyS32fAqmttalraCI/edit?usp=sharing
Thank you in advance, I appreciate the recommendations
I attempted the =sum(indirect) formula, but was unable to get that to work
try this formula in your sheet:
=MAKEARRAY(COUNTA(A2:A),3,LAMBDA(r,c,COUNTIF(INDIRECT(INDEX(A2:A,r)&INDEX({"!B:B","!C:C","!D:D"},c)),FALSE)))
You were probably right with COUNTIF and Indirect. Possibly you struggled with single apostrophes for the name of sheets with spaces. You can try this in B2:
=MAKEARRAY(COUNTA(A2:A),3,LAMBDA(r,c,COUNTIF(INDEX(INDIRECT("'"&INDEX(A2:A,r)&"'!B2:D"),,c),FALSE)))

Google Sheets, getting information from multiple different sheets with different lengths to populate structure

I am trying to build a document which will make it easier for my staff to make 'Email Structure' essentially with a series of dropdown choices and when they select an option, different information populates the cells from another sheet within the document. The most important thing is that it brings in the product name and the description of the product across all four columns (the product name, the price, the product type and the product description).
I have used StackOverflow research to try a few different combinations so far but not much has worked.
You can see what I am attempting by seeing the sheet 'Email Structure' on the following Google Sheet: https://docs.google.com/spreadsheets/d/1ExQGxxesv64OZJc4uoHVMLkaOCFUVsIQWVBPMuOB8xE/edit?usp=sharing
I am eventually going to have thousands of products across different sheets to pick from, so any advice on this would be really great so I can learn and understand how to do this before cascading it to apply across many more areas.
Options I have tried in cell C4 of sheet 'Email Structure':
=VLOOKUP(B4, All Products!B6:C65, 2,FALSE)
=IF(B4="Gaming Energy",VLOOKUP(B4,All Products!B6:B12,2,FALSE),IF(B4="Pro Series",VLOOKUP(B4,All Products!B27:B36,2,FALSE),VLOOKUP(B4,All Products!B51:B65,2,FALSE)))
=IF(B4="Gaming Energy",VLOOKUP(B4,A6:B12,2,FALSE),IF(B4="Pro Series",VLOOKUP(B4,A27:B36,2,FALSE),VLOOKUP(B4,A51:B65,2,FALSE)))
=QUERY('Gaming Energy'!B6:E12,"select B,C,D,E where 'Product'='"&B4&"'")
Are you going to have all products in one sheet and then distribute them in the others based on filters??
If you have everything in 'All Products', you can do a Query similar to your last one:
=QUERY('All Products'!B:E,"WHERE C = '"&B4&"'")

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

Search and Replace Multiple Text with Arrayformula

I have a sheet that is populated by a form. On the form I have multiple questions and each question includes a bunch of options where they check off what they want. Because they're check boxes, when they submit the form, all the questions they choose populate into one cell where each question is separated by an comma.
My plan is to take that info and merge it into a Google Document; however what I want merged is a more detailed version of the question they answered.
Problem: The formula does what I need it to, however, I need it to work across multiple rows as new submissions come in and because I'm using =filter, it doesn't work with =arrayformula.
=concatenate("",filter('Look up Table'!B:B,search('Look up Table'!A:A,A2)))
Here is an example of what is happening.
Column A represents what has been submitted through the form. So the user chooses (with checkboxes) what is applicable. They have populated in one cell and are separated by commas.
Column B is my current formula that does a search by question and pulls in the formatted-version of the question (Look up Table tab). This is what merges into the document.
I'm hoping someone can help me find a new formula to use that does the same thing (and works with arrayformula) or perhaps lead me in another direction that I just haven't come across yet. I'm looking into vlookup and regexreplace to see if I can get that work as well.
Try this formula:
=ARRAYFORMULA(SUBSTITUTE(trim(transpose(query(IFERROR(vlookup((IFERROR(search(offset('Look up Table'!A1,,,COUNTA('Look up Table'!A:A)),TRANSPOSE(A2:A)))>0)*row(offset('Look up Table'!A1,,,COUNTA('Look up Table'!A:A))),{row(offset('Look up Table'!A1,,,COUNTA('Look up Table'!A:A))),offset('Look up Table'!B1,,,COUNTA('Look up Table'!A:A))},2,0)),,COUNTA('Look up Table'!A:A))))," "," "))
Look at example here

Convert text in a cell into a number

I'm creating a Google Form to make digital multiple choice tests. The answers that are given will be sent to Google Sheets. The answers are multiple choice so the data that I get consists of a limited number of possible answers.
In this spreadsheet I want to add points (like 3,3 or 5 or 10 or 0) to the answers that are given depending on whether the answer is correct (or partially correct).
In the example spreadsheet every row consists of all the answers that are given by the student. This is automatically imported like this when a student sends in the form (in this testfile I have only one question). In B30:B33 I have put the four answers the multiple choice test has for this one question and in an adjacent column the number of points each answer is worth. I want to connect the points to the answer that is given in D2 (which is a wrong answer and should result in 0).
How can I do this?
With enough responses your range of result scores is likely to get in the way where it is so I suggest moving it to another sheet and giving it a name, such as NamedRange1. But I would swap over the columns first (answers to the left of their scores) - and replacing the 0s to suit with 3,3 5 and 10.
Then in your form responses sheet Formulierreacties 1:
=vlookup(D2;NamedRange1;2;0)

Resources