Combo with conditional options in google spreadsheet - google-sheets

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

Related

In Google Sheets, how can I check a list of entries for missing values and generate a new line with the missing value?

As per the image example below, I would like to scan a list of entries for a missing data points (e.g.: I expect 3 different month names per name entry in the list, but some names only received offers in 2 or 1 of these months), and for each detected missing entry, automatically generate a new line with the value of row A, the scanned for value of row B filled in, and row C with a blank value.
I've tried generating this via an IF formula, but to no avail.
Is there a way to do this via formula, or would this require a macro?
The example below shows the input on the left with the desired output on the right. Any hints are much appreciated!
Example
try:
=INDEX(TEXT(LAMBDA(n, SORT(LAMBDA(x, {SPLIT(x, "​"),
IFNA(VLOOKUP(x, {n&"​"&"1/"&MONTH(LEFT(OFFSET(n,,1), 3)&1), OFFSET(n,,2)}, 2, ))})
(LAMBDA(a, FLATTEN(UNIQUE(FILTER(a, a<>""))&"​"&
TRANSPOSE(UNIQUE(FILTER("1/"&MONTH(LEFT(OFFSET(a,,1), 3)&1),
OFFSET(a,,1)<>"")))))(n)), 1, 1, 2, 1))(A2:A), {"#", "mmm", "#"}))

Google sheets: Can I combine offset over range, based on dropdown?

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.

If or query, if criteria is met, copy from other sheet

I think, what I am trying to do is pretty simply. But I cant seem to get it right.
I have 2 taps In one sheet.
Sheet 1 is an Overview of Sheet 2.
In Sheet 1 I have in column A the status for each pallet. In Sheet 2, I have the overview of the content of each pallet.
Now I just want to select once, the status (if Sold or Available) in Sheet 1 and it now automatically copies the status to Sheet 2, where the criteria of the pallet name is met.
EG: P-0011 is marked as sold in Sheet 1 - In Sheet 2 all rows who contain P-0011 will automatically copy the status to the cell.
I have tried
=if('Recap Pallets'!C:C,B2,'Recap Pallets'!A:A)
But it's not working.
I have also tried
=query('Recap Pallets'!A:C,"Select A where A='Sold' or A='Available'")
but also this seems wrong, because it just copies the row, and not the content regarding to the matching criteria.
What is the mistake?
Please see here example:
SHEET
delete everything in A column and use this in A1:
={"Status"; INDEX(IFNA(VLOOKUP(B2:B, {'Recap Pallets'!C:C, 'Recap Pallets'!A:A}, 2, 0)))}
Here's a quick and dirty solution:
=iferror(INDEX('Pallets Total'!A:A,MATCH(C3,'Pallets Total'!B:B,0)),"")
There's certainly more elegant ways, but this may work for the time being.

Autofill numbers based on column

This may seem extremely elementary, however, I haven't been able to figure it out. I am wanting to be able to autofill a number series up to 6.
For example, the column would go from 1, 2, 3, 4, 5, 6 down each row, and then start over after 6. The columns in A2 would have the item and the columns in f are the position of the item in the gallery (crm requires 6 for each). Basically, it would repeat itself based on column A2. Is there a formula or an array type formula for this or something like it?
try:
=ARRAYFORMULA(IF(A2:A="",,FLATTEN(SPLIT(QUERY(REPT(" "&
QUERY(SEQUENCE(6, 1),,9^9), ROUNDUP(COUNTA(A2:A)/6)),,9^9), " "))))
You can use this formula in cell F2.
=ARRAYFORMULA(MOD(ROW(A2:A)-2,6)+1)
This would get the row number from A2, subtract by 2, divide by 6 and get the remainder, then add by 1.
Here is a row-agnostic version based on Carlos M's suggestion:
=ArrayFormula(IF(A2:A="",,MOD(SEQUENCE(ROWS(A:A)-ROW(),1,0),6)+1))
By "row agnostic," I mean that if the parallel range were moved to be A3:A or A5:A, etc., that is the only part of the formula that would need to be adjusted; the rest would accommodate without change.

Google sheets: Compare cell value in sheet 1 to cell values in a column of sheet 2

I have a 2 worksheets within a single file. Col A in each sheet has a list of websites. When I enter a new website to col A of sheet 1, I need it to compare the entry to the list on sheet 2.
If the same website is listed on sheet 2, I need the new entry to be marked in some way - red background, bolded, whatever.
What it should look like:
Sheet 1:
https://i.gyazo.com/07667520bc0f58a1dd2547405545eb5e.png
Sheet 2:
https://i.gyazo.com/a524832a9cb96e35bd2981e95e5c1edf.png
Stackoverflow is listed on sheet 2, so when it's added to sheet 1 it's marked with red.
I've been Googling and checking SO threads for about an hour, but I can't even begin to figure this out. I have very little experience with this stuff.
Any help appreciated. Thanks!
It may be possible with Format>Conditional Formatting
then set a Rule for formatting, there are many options including cell value 'equal to'
It should work.

Resources