Is it possible to nest simple programs within a Google Sheets, similar to how you would with Visual Basic for Applications in Excel? Or alternatively a simple = syntax using regex, if there is a way to do that in Google Sheets?
I want to take a list of multiple names (name1, name2, name3) in a single cell from across multiple identical sheets and transpose them to another sheet within the same spreadsheet, check for duplicates and ignore capitals, etc. Is there a way to do this?
You are asking for an easy answer to a composite problem. To solve this, I would split the job into separate chunks:
Split the input cell content into
different cells. As it is unclear
how this format is, I cannot advice
on any specific method. Check out
ImportRange function or similar.
Transpose them. use =TRANSPOSE(area)
Remova duplicates, use =UNIQUE(area)
Check the Google Spreadsheet function list for details.
Nest them: =UNIQUE(TRANSPOSE(A1:C15)).
LOWER cannot be used in this nest as it works with only text input, not array input. Although you can use it for the first input cell.
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 have made a google form to which some answers are formatted as comma separated strings inside the automatically populated google spreadsheet. I would like to read from this sheet to another sheet and reformat the answers so that each comma separated answer is shown on a new row. I have tried to apply an ARRAYFORMULA that reads from the original sheet and then use a solution that uses SPLIT and TRANSPOSE the cell content, however combined with the ARRAYFORMULA this fails since it would overwrite contents in other cells.
Here is an example spreadsheet with the responses, a solution sheet, and a desired results sheet. https://docs.google.com/spreadsheets/d/1r_l5fVJ9lGfpubO2o3pXicV7JlZWmANjwSgNi7_DL0A
Any suggestions for how I can achieve the end result?
Okay, I assume this isn't really what you want, but visually it looks okay...
Try this formula:
={{'Form responses'!A2:A3},ArrayFormula(regexreplace('Form responses'!B2:E3,", ",CHAR(10)))}
Then format the cells so that the cell contents are TOP-aligned, instead of the default BOTTOM-aligned.
Realistically, I imagine that you want each question answer split into multiple cells. But if your data responses really contain letter values separated by commas, as you've indicated, you can still search through those cells to find whether an answer contains a certain value. It all depends on why you want the results structured the way you do.
If you can clarify what you want to do with the form results, instead of just appearing vertically for each question, perhaps we can provide a full solution for that requirement?
UPDATE1:
Okay, I may be getting close. I can get your data transformed to look like the following:
This would let you do the analysis that you want, by searching for Q.1 (question 1 responses) in the first column, and then all the answers in the third column, along with the owner in column 2. And from this, it will also definitely be possible to put the results in the exact form you want. It just may take an intermediate step.
UPDATE2:
Okay, I think I have something you can use. I can convert your data to either of the following two layouts.
The one on the right is closest to what you asked for, with the exception that the answers on the right are bottom aligned, with blanks above. But you can still process them for analysis, with queries. I honestly think having the user identifier (email address) on each row would make things simpler, but I can provide it either way.
The layout on the left is more of a traditional database layout, and would make analysis very simple. Each row has the date and email identifiers, the question number, and the answer (or one of the answers) to that question, from that user.
If this is helpful, it might be best if you enabled your sample sheet to allow us to edit it, to enable me to implement it in your sheet. But here is my sample sheet, in case anyone wants to look through it. Note that the main formula to reformat the data, in Solution!B3, could benefit from a lot of cleanup, and is probably nowhere near the best way to achieve this. Just throwing up one possible solution...
I'll try to add some explantion for the formula at some point, but ask if you have any questions.
I'm using Google Sheets to create a product list which combines two sets of data. I'm wondering if there is a function which will effectively create a list which is a product of the two individual lists.
I can achieve this in a number of ways such as creating an array and then using an offset calculation which I copy down the output column but I'm hoping to find a solution which will take the two lists as arrays and output all of the combinations.
I'm wanting to do it this way because the list lengths are dynamic.
I've looked at ={list_1;list_2} but this just placed the second list under the first list, but it does it as a single cell function.
I've created a spreadsheet which illustrates what I'm trying to achieve and what I've managed to achieve so far...
https://docs.google.com/spreadsheets/d/1Q3lexm06utmI1IE2HmjtNjBKHZc771KVNp1dDjL3jxs/edit?usp=sharing
If your lists are in A and B columns, put this in the C column and copy down until the length of the product of the two list lengths.
=CONCAT(INDEX(A:A,INT((ROW()-1)/COUNT(B:B))+1),INDEX(B:B,MOD(ROW()-1,COUNT(B:B))+1))
I suppose you could throw in some logic that hides the output if you go too far and then just fill the whole column.
This is adapted from here.
I found the answer elsewhere on stackoverflow.com.
The answer is:
=ArrayFormula(transpose(split(rept(concatenate(A2:A&char(9)),counta(B2:B)),char(9)))&" "&transpose(split(concatenate(rept(B2:B&char(9),counta(A2:A))),char(9))) )
and I found it here
Generate all possible combinations for Columns in Google SpreadSheets
wrap it into SUBSTITUTE to get rid of that space:
=ARRAYFORMULA(SUBSTITUTE(
TRANSPOSE(SPLIT(REPT(CONCATENATE(A3:A&CHAR(9)),COUNTA(B3:B)),CHAR(9)))&" "&
TRANSPOSE(SPLIT(CONCATENATE(REPT(B3:B&CHAR(9),COUNTA(A3:A))),CHAR(9)))," ",""))
and to sort it use:
=ARRAYFORMULA(SORT(SUBSTITUTE(
TRANSPOSE(SPLIT(REPT(CONCATENATE(A3:A&CHAR(9)),COUNTA(B3:B)),CHAR(9)))&" "&
TRANSPOSE(SPLIT(CONCATENATE(REPT(B3:B&CHAR(9),COUNTA(A3:A))),CHAR(9)))," ",""),1,1))
I am trying to import multiple sheets in one Google Sheet into another Google workbook. I can get ImportRange to work for one sheet but how do I use it for multiple sheets, or alternatively, how do I combine multiple ImportSheets in one column?
=unique(
importrange("https://docs.google.com/spreadsheets/d/...",
"'Kramerville KH'!d5:o1000"))
I want to be able to add another range to that, e.g. 'Emalahleni KH'!d5: o1000.
Use formula:
={unique(importrange("link...","'Sheet1'!d5:o1000"));
unique(importrange("link...","'Sheet2'!d5:o1000"))}
The result is two imports one behind another, see more info here.
There's no better way to do this. Alternative is to combine formula as text and then convert string into furmula using script. See how in this question.
Although the existing answer has been accepted the question appears to require exclusion of duplicates not only from within each range but also across ranges:
=unique({unique(importrange(" l i n k ","'Kramerville KH'!d5:o1000"));unique(importrange(" l i n k ","'Emalahleni KH'!d5:o1000"))})
Does Google Sheets support any way to combine multiple arrays or ranges into one?
I am looking to combine two data ranges when making a call to FREQUENCY function. For example:
=FREQUENCY(B5:F50; I5:I16)
=FREQUENCY(J5:N50; I5:I16)
work great on their own but I would like them to be combined into a single function call. Something like MS Excel equivalent =FREQUENCY((B5:F50, J5:N50), I5:I16).
Of course I can just reshuffle columns where I have both datasets side-by-side to reference them with =FREQUENCY(B5:K50; I5:I16) but I'd rather not.
Something like this should work:
=frequency({B5:F50;J5:N50};I5:I16)
By the looks of it there is no solution to my question. I've tried an array of options that work in MS Excel but Google Spreadsheets seem to be a different animal.
As a solution I had to modify my spreadsheet code display columns from two different datasets side-by-side.