I'm trying to build a yearplan for speedskating. Blah blah blah, context, what matters is that I can't work this bit out. I want "week type" to be filled with 1 to 10 cells, based on input from the "Cycle type". If I choose, for example, 6 wk, I want 6 cells (1, 2, 3, 4, 5, 6) and then be able to pick 3 wk below. I'm not sure how to do this, but I've come quite far already.
https://docs.google.com/spreadsheets/d/1EZ61f24t3SYAMkuTof6PjkcBNxSkVVdC5AJpxMoQrnM/edit?usp=sharing
This is the link to the sheet. This is the end result I'm trying to achieve
I'd appreciate some help, I've been stuck at this for quite some time! :)
I understand that you want to get "Cycle type" filled automatically according to "week type" form the input table like this.
In order to do that we need:
1 - Data validation in column 01 of output table from the input table "Cyclus type" we go Data > data validation - Criteria: list from range and select the range D3:D
2 - we need to normalize the input table, paste this QUERY fuction formula in Q3.
=QUERY({C3:D,F3:F;C3:D,G3:G;C3:D,H3:H;C3:D,I3:I;C3:D,J3:J;C3:D,K3:K;C3:D,L3:L;C3:D,M3:M;C3:D,N3:N;C3:D,O3:O}, " Select * Where Col1 is not null ")
Note that QUERY with Arrays {} in english local , to join columns side by side and ; to stack them, in Dutch however \ replaces , and ; is the same.
3 - we need a helper table by pasting this formula in W3 and drag down.
=IF(U3="",,TRANSPOSE(FILTER($S$3:$S,$R$3:$R=U3)))
Note: it can be hidden or collapsed using goups.
4 - Paste this formula to get all the results stacked under "Cyclus type"
=FILTER(FLATTEN(W3:AF),FLATTEN(W3:AF)<>"")
I hope that answres you question.
Related
I have two data sets:
Data set 1 is data from our Sales team
Data set 2 is data from our Finance team
The common element between these two sets is the Invoice ID column (col A in data set 1 and col E in data set 2). However, in data set 1, this data is stored as an array, and in data set 2, each value of the array is displayed on its own row.
GOAL
I'd like to be able to enrich data set 2 (cols F & G) with the data from data set 1, however, I'm having trouble making that work. I've tried using =FILTER(A3:A7, REGEXMATCH(TEXT(E3, "0"), TEXT(ARRAYFORMULA(SPLIT(A3:A7, ",")), "0"))), but that gives me the following error: "FILTER range must be a single row or a single column.". I understand that this happens because of the SPLIT function, but I don't know how else to go about this.
The sheet can be found here.
Any help is super appreciated.
I've added a new sheet ("Erik Help") to your sample spreadsheet. The following single formula will produce all results for F3:G ...
=ArrayFormula(IF(E3:E="",,VLOOKUP("*"&"%"&E3:E&"%"&"*",{REGEXREPLACE("%"&A3:A&"%","[,\s]","%"),B3:C},{2,3},FALSE)))
The % symbol is just used to "pad" every element from Col A and Col E in something unique in order to differentiate search term 1 from, say, 14 (i.e., the VLOOKUP will search for %1% instead of just 1, which will not be found in %14%, etc.) The % symbol has no special meaning; it could have been any unique character we were sure wouldn't normally turn up in Col A or Col E.
REGEXREPLACE replaces all commas and spaces with this special % character in addition to the front and back placements. So a Col-A list like 1, 14 would be seen by sheets at this point as %1%%14%.
The * is a wildcard symbol that, appended front and back to the search term, which will allow it to be found in elements of Col A that contain lists.
Results from the second and third columns (e.g., {2,3}) of the virtual array are returned.
Give a try on-
=FILTER($B$3:$B$7,ArrayFormula(MMULT(--(SPLIT($A$3:$A$7,", ")=E3),SEQUENCE(Columns(ArrayFormula(SPLIT($A$3:$A$7,", ")))))))
here i have a sheet, in that we can find the sum of diff categories using query function by selecting from drop down list. but here I can select one month only at a time can i find the amount of January and February at the same time by adding another column for another month or in any other way. here I can find the sales of one month at a time. I want to find sales of two or three months at time.
Please help
https://docs.google.com/spreadsheets/d/1jdtrtdNQBsxiZt8FjvbaE9omCBs8x8vRgp0r2bc1_7c/edit#gid=0
There's no way you can make a drop down list with multiple choice in Google Sheets.
But there are some alternatives.
List of tick boxes (here as list of months)
Manual input of multiple values separated by comma or something else.
I give both:
Months are selected as list separated by | so it can be used as regex inside 'matches' clause in query
This generates list of months:
=join("|",query({A2:B7;C2:D7},"select Col2 where Col1 = true "))
Window with manual input works similar way
=substitute(substitute(F3,", ",","),",","|")
It takes its contents, removes spaces that are adjacent to comma, adds separator | instead of comma. It's case sensitive and I don't know how to get rid of this (?i) does not work within query.
All together it looks like on the picture and combined formula is:
=query(ORDERS!A1:R14,"select A, B, C , D where
A matches '"&join("|",query({A2:B7;C2:D7},"select Col2 where Col1 = true "))&"' and
B matches '"&substitute(substitute(F3,", ",","),",","|")&"'",0)
Here is my solution:
https://docs.google.com/spreadsheets/d/1fQ5_VdxZ-t4MqPbLqzb8q-saqp5Jqz3hVXeWHX_Lls4/copy
I copied your spreadsheet to do my testing. Here's what you can do.
Add another row of the same exact selection found on your "A" row.
Change your formula to this: ={query(ORDERS!A1:R,"Select * where A contains '"&$A2&"' and B contains '"&$B2&"'",1);query(ORDERS!A1:R,"Select * where A contains '"&$A3&"' and B contains '"&$B3&"'",0)}
What this does it run an array of two sets of formulas (In this case 2 queries) for the same set of data.
Here's the screenshot of the output if you're interested.
Sample Screenshot
I am currently working with Google Forms and want to rearrange the way the responses are being displayed on the "Response Sheet". The only way I can think of doing this is by importing or moving the data to another sheet that would select and transpose certain columns if Column A contains key value.
This is what I'm seeing as part of the input and would like to see as the output if Column A Contains certain text:
Input & Output
Thank you in advance for your help!
O.K.
I rewrite headings a2:e2,
I take whole first five columns without headings e3:e6
I display content of columns A,B,F,G,H for all the rows that have 'A1' in column 1
I take tables built in point 1 and 2 together and sort them by first column
My solution is here:
https://docs.google.com/spreadsheets/d/1n7Ppd8v75mb3qrnJz_Jh_b4HNaj4i56X9wRGnz0l6i8/copy
={A2:E2;
sort({A3:E6;
query(A3:H6,"select A,B,F,G,H where A ='A1'",0)})
}
I need to do a combo options with condtional sub options in google spreadsheet. Here is an example of what I need to do.
If the option choosen in column A was "Option 1" then options available in column B must be 1, 2, 3 and 4 and If option 2 was choosen in column A then options 5, 6, 7 and 8 must be available in in the B cell of the same row.
Can you help me?
I set up an example sheet to show one solution:
https://docs.google.com/spreadsheets/d/1yquke1pCponpEHjgZWCa7t8RyiWCAr1QR6VnYwJNSVw/edit?usp=sharing
Unfortunately the data validation in each row of Col B has to be adjusted manually so that the row number matches with Sheet2 though. For this reason it would be a pain to set up for a large number of rows.
I believe secondary validation can also be done by a script though so it may be worth searching one of those out
Google Forms - I have set up a google form and I want to assign a unique id each of the completed incoming form inputs. My intention is to use the unique ID as an input for another google form I have created which I will use to link the two completed forms. Is there another easier way to do this?
I'm not a programmer but I have programming resources available to me if needed.
I was also banging my head at this and finally found a solution.
I compose a 6-digit number that gets generated automatically for every row and is composed of:
3 digits of the row number - that gives the uniqueness (you can use more if you expect more than 998 responses), concatenated with
3 digits of the timestamp converted to a number - that prevents guessing the number
Follow these instructions:
Create an additional column in the spreadsheet linked to your form, let's call it: "unique ID"
Row number 1 should be populated with column titles automatically
In row number 2, under column "Unique ID", add the following formula:
=arrayformula( if( len(A2:A), "" & text(row(A2:A) - row(A2) + 2, "000") & RIGHT(VALUE(A2:A), 3), iferror(1/0) ) )
Note: An array formula applies automatically to the entire column.
Make sure you never delete that row, even if you clear up all the results from the form
Once a new submission is populated, its "Unique ID" will appear automatically
Formula explanation:
Column A should normally hold the timestamp. If the timestamp is not empty, then this gives the row number: row(A2:A) - row(A2) + 2
Using text I trim it to a 3-digit number.
Then I concatenate it with the timestamp converted to a number using VALUE and trim it to the three right-most digits using RIGHT
Voila! A number that is both unique and hard-to-guess (as the submitter has no access to the timestamp).
If you would like more confidence, obviously you could use more digits for each of the parts.
You can apply unique ID numbers using an arrayformula next to the form data. In row 1 of the first rightmost empty column you can use something like
=arrayformula(if(row(A1:A)=1,"UNIQUE ID",if(len(A1:A)>0,98+row(A1:A),iferror(1/0))).
A few comments regarding the explanation provided by #Ying, which I will try to expand, as it is very good.
> Column A should normally hold the timestamp.
In my case, it is date+time stamp.
> 4. Make sure you never delete that row,
even if you clear up all the results from the form
That issue can easily be avoided by placing the formula in the header like this
={"calculated_id";arrayformula( if( len(C2:C); "" & text(row(C2:C) - row(C2) + 2; "000") & RIGHT(VALUE(C2:C); 3); iferror(1/0) ) )}
This formula provides an string for one cell, and a formula for the next one, which happens to be an array formula which will cover all the cells below.
Note: Depending on your language settings you may need to use ";" or "," as separator among parameters.
> 5. Once a new submission is populated,
its "Unique ID" will appear automatically
Issue
And here is the issue I see with this solution.
If the Google Form allows responders to Edit their responses, the date+time stamp will change and so the calculated_id.
A workaround is to have 2 columns, one is the calculated_id and the other will be static_id.
static_id will take whatever is on calculated_id only if itself has no data, otherwise it will stay as it is.
Doing that we will have an ID that will not change no matter how many updates the response experience.
The sort formula for static_id is
=IF(AND(IFERROR(K2)<>0;K2<>"");K2;L2)
The large one is
={"static_id";ArrayFormula(IF(AND(IFERROR(M2:M)<>0;M2:M<>"");M2:M;L2:L))
}
M or K -> static_id
L -> calculated_id
Remember to put this last one on the header of the column. I tend to change the color to purple when it has a formula behind, so I don't mess with it by mistake.
Extra info.
The numeric value from the date/time stamp differs when it comes from both or just one. Here are some examples.
Note that the number of digits on the fractional part differ quite a lot depending on the case.