I would like to create a new sheet from Google Form data which only imports cell data that matches specific criteria. Respondents have five response options for a number of questions (all questions have the same five options). I want the new sheet to only show the data in the cells that fit my criteria and the cells that don't, should be blank. I would like all rows and column formatting to remain the same.
I've got the import range part down, but I don't know should I use query, filter, if, or some other function?
Within the same spreadsheet, QUERY works well. You could also use QUERY(IMPORTRANGE( or just IMPORTRANGE if you want it to go to a different spreadsheet.
As Rubén said, if you want to maintain all the formatting, without manually doing it yourself on the destination sheet, you'll need to use script.
Query Reference
EDIT
See Sheet3 HERE. Make a copy to edit.
Any cell with a blue background has a formula. The main one is below.
=ARRAYFORMULA(IF('Form Responses 1'!D3:DD="","",SWITCH('Form Responses 1'!D3:DD,$D$1,"",$E$1,"",'Form Responses 1'!D3:DD)))
You will not be able to edit those columns. If you need to edit (like the "Comments/Adaptations" columns, you could modify the formula above and apply it column by column.
If that works, please click the green check mark to accept the answer!
Beside the number format, any formula keeps the format of the source range, so if your the format includes fonts styles, bold, italics, colors, etc., instead of a formula you should use a script.
Related
I need to create a list from a column when the cell doesn't contain a given text.
In the example above I want to exclude the folders that have the words (Archive, Rollback, rollback) as below.
I know
=countif(B2:B20,"<>*Archive*")
gives us the count but doesn't allow me to define more than one search phrase and also doesn't give a list.
Is it possible to use an Array Formula? where =ARRAYFORMULA(B2:B20) can be changed to exclude the words in B22
Test Sheet is in https://docs.google.com/spreadsheets/d/1WnGEsuuJcKsHVhpyYCX5EpmIxuKQEst5XVXgeETzxJ4/edit?pli=1#gid=1789577026
See the 'List_Excluding_Words' worksheet and feel free to add a worksheet with possible solutions.
Would a regex method work in this case like? Google Sheet REGEXMATCH function case insensitive
I understand this can be done using filters but I want a full list so I can run other processes on it and it doesn't allow for more than one phrase.
In B26 on the tab 'JPV_HELP' I entered
=filter(B2:B20, not(regexmatch(B2:B20, "(?i)Archive|Rollback")))
See if that works for you?
I need to compare two different sheets to find matching values between them.
In the first sheet, I have a list of order numbers and in the second one, I have a list that needs dispatching. Therefore, without scrolling through the sheet manually for the 1000+, I'd like to use a formula or conditional formatting in order to flag the values that are the same (or all of the different values) so I can simply copy and paste this into another sheet.
I have shared a link to a google sheet below if someone could help with this that would be very much appreciated.
Edit: The second sheet (on the google document) is the list of all orders and the first are the ones to be dispatched. I need to know which one's from the second sheet are missing from the first.
https://docs.google.com/spreadsheets/d/18vSBu9GzxK1UMCE2RrDyNSH6yi-FzTvuABsVw9r172Y/edit?usp=sharing
In second sheet in column B you could do:
=COUNTIF(Sheet1!A:A,A2)
IF the formula returns 0, it means that id number is not in your first sheet.
I have a worksheet being fed by a Google Form. I want the responses on the Google Form to populate two fields in the next tab. The B column in the second tab is the one beyond my skillset. I have written out how the field should display, based on the form responses for reference. I also have used comments on the sheet to explain the rules for each field.
I know split function can be used but it wont adjust it. any possible solution.
Here the Sheet link
https://docs.google.com/spreadsheets/d/1ueKCNdcn1xmJHYtrzKKKkj_FSraRfpvJS4Oi3BHNUvk/edit?usp=sharing
I've added an answer on your sheet. Since the data is all delineated by semi-colons, this formula seems to match what you want.
=SPLIT('Import Data'!B1,";",0,0)
Let us know if it doesn't do what you want, or if this helps.
Updated: After checking with you, I realise that you want only some of the data split, and some kept concatenated. But since all of the data "fields" look the same, separated by semi-colons, and since there could be various numbers of fields in each response category, I don't think there is a simple logic that can tell where to split, and where to keep things like dress styles or sizes concatenated. So I understand that this is not your desired answer.
Sheet regarding this question.
I have a set of sheets where each person must use a drop down box to select a house they would like to view. We can easily add a house to the list by inserting the address, and a URL into the "houses" sheet and it will be shown in the dropdown list and the results table.
Everything works so far, but if a house becomes unavailable, I want to mark it unavailable on the "houses" sheet, and then all occurrences of that specific house in the dropdown cells and results section should have a red background.
I could use conditional formatting, but this would require me to apply a different formula to each cell and that wouldn't be practical.
I regret not elegant but I think your layout is not well suited to Google Sheets' strengths. The best I can suggest is in say J2 of sheet Choices:
=vlookup(B2,Houses!$A:$C,3,0)
copied down to J30 and J2:J9 copied across to ColumnN. Then select Choices ColumnsB:F and Format - Conditional formatting..., Custom formula is and:
=J1="No"
with formatting of red background Done.
You might want to hide columns J:N.
You should just use conditional formatting.
Step 1: Select Cell B2, go to conditional formatting and create a new rule, "Use a formula to determine which cells to format".
Step 2: Use the following formula:
=VLOOKUP(B2,Houses!$A$3:$C$42,3,FALSE)="No"
Note: This B2 value since it isn't using $, moves dynamically depending on what cells your formula is applied to. The VLOOKUP looks up the B2 value in the depicted range and returns the 'Available' column (column 3 on the Houses sheet). We're matching on "No" specifically, I believe its case sensitive so watch out for that caveat.
Step 3: Set your format to Red.
Step 4: Make sure your 'Applies to' box is pointed to the following range:
=$B$2:$F$9
Personally I hate hard coded ranges like these, you should look into dynamic named ranges. That way you can just reference a named range instead of the A3:C42 range for both your Data Validation dropdown as well as these formulas.
Using Google Forms checkboxes to collect survey responses into a Sheets doc, I find that I can only get the values of checked lines to fill the spreadsheet.
I'm trying to get the unchecked CheckBox values to fill a different cell in the spreadsheet as well, has anyone found out a way to do this?
I'd appreciate any help!
I have a way with spreadsheet formulas.
The drawbacks are the necessities of
manual input of all possible options
copying and pasting a formula for each response (can be done in advance, but if not enough formulas are pasted for the number of responses, the sheet will break)
An ideal solution would automatically detect all possible responses, and could theoretically accept an infinite number of responses without breaking and needing maintenance.
With that said, he's an example of what I suggest:
Google Sheet
Google Form
All possible options on the form must be typed into cells A2:A
cells B2:B show comma+spaces if the corresponding cell in A2:A is not blank, with =arrayformula(if(isblank(A2:A),"",", ")). These commas and spaces are needed later in a concatenate().
Raw data from the Form Responses spreadsheet was brought into D2:E with =arrayformula('Form Responses 1'!A2:B)
G2:G holds the important formulas. They must be copied and pasted to each individual cell for each row.
First, all possible responses in $A$2:$B are filtered based on if the cell in column A can be found in the text in column E.
=filter($A$2:$B,arrayformula(iserror(search($A$2:$A,E2))))
Next, some error catching. I added an iferror() to catch a "N/A, no results found in filter evaluation", and an if(isblank(),"",) to catch if no timestamp is in column D meaning no response was recorded in this row.
=if(isblank(D2),"",iferror(filter($A$2:$B,arrayformula(iserror(search($A$2:$A,E2)))),""))
Finally, do a concatenate() to pull the values and the comma+spaces all into one string inside one cell.
=concatenate(if(isblank(D2),"",iferror(filter($A$2:$B,arrayformula(iserror(search($A$2:$A,E2)))),"")))
Oh, and if you don't like the comma+space being the last characters in the string, in J2:J I did a =arrayformula(iferror(left(H2:H,len(H2:H)-2),"")) which cuts off the last 2 characters of the string in column H.
If I come up with a better solution, I'll let you know. It's an interesting puzzle to solve.