Checkboxes to insert value in specific cells - google-sheets

I am trying to implement checkboxes to populate the Home and Away Teams name in B7 and D7 when its checked and cleared when unchecked.
The only formula i came up with and it doesn't work is =IF(F3,H3,"")

use:
=INDEX(TEXTJOIN(; 1; IF(F3:F53; G3:G53; )))

Accomplished what I wanted using =iferror(IFS(F3=true,G3,F4=true,G4,F5=true,G5,F6=true,G6,F7=true,G7,F8=true,G8,F9=true,G9,F10=true,G10,F11=true,G11,F12=true,G12,F13=true,G13,F14=true,G14,F15=true,G15,F16=true,G16,F17=true,G17,F18=true,G18,F19=true,G19,F20=true,G20,F21=true,G21,F22=true,G22,F23=true,G23,F24=true,G24,F25=true,G25,F26=true,G26,F27=true,G27,F28=true,G28,F29=true,G29,F30=true,G30,F31=true,G31,F32=true,G32,F33=true,G33,F34=true,G34,F35=true,G35,F36=true,G36,F37=true,G37,F38=true,G38,F39=true,G39,F40=true,G40,F41=true,G41,F42=true,G42,F43=true,G43,F44=true,G44,F45=true,G45,F46=true,G46,F47=true,G47,F48=true,G48,F49=true,G49,F50=true,G50,F51=true,G51,F52=true,G52,F53=true,G53))

Related

Google sheets match index arrayformula

I have a count using a formula that needs to be stretched (the formula is in cell F9
) https://docs.google.com/spreadsheets/d/1sZM1aAuqkHNONJWagiu3aTw6_vfw515gbiKwhKuQAD4/edit#gid=1464536028
=IF(ISBLANK(E9);;IF(O9=TRUE;INDEX('Тех Лист'!$F$2:$M$2;MATCH(TRUE;Q9:X9;0));IF(P9=TRUE;INDEX('Тех Лист'!$F$3:$M$3;MATCH(TRUE;Q9:X9;0));"Ошибка!")))
I tried to remake it under Arrayformula, but nothing came of it ... later I got the idea to do it through query, but when I add query to the array, the data I need disappears
=INDEX(split(FLATTEN(TRANSPOSE({'Стадник'!$D9:D&"x"&'Стадник'!$Q8:$X8&"x"&'Стадник'!Q9:X&"x"&'Тех Лист'!$F$2:$M$2&"x"&'Тех Лист'!$F$3:$M$3}));"x"))
Please tell me how I can compare the headers, and if the list is TRUE, take the sum from the table
In G9 I entered
=ArrayFormula(if(len(E9:E); vlookup(trim(transpose(query(transpose(if(Q9:X; Q8:Y8;));;50000)))&""; transpose('Тех Лист'!E1:M3)&""; if(O9:O; 2; if(P9:P; 3;));0)+0;))
Note that this solution requires that only one checkbox can be ticked in the range X9:X.
See if that helps ?

Google Sheet - Formula to split out dates

I have a dashboard that I'm creating, And it contains start and end dates, which I want to split out into months (which I'll group together later in order to create charts etc)
I'm not sure if this is possible but if I data like this (simplified for query purpose):
And I basically want to split the data like this:
I can achieve this with a script that I've written which the user can run by clicking a button. I was just curious if it's possible to achieve this using formulas (I'm fine with writing scripts, but still struggle with query and array formulas) since this is for a dashboard, I thought it would be nicer if the data updated "live" instead of having to click a button.
use:
=INDEX(TEXT(QUERY(SPLIT(FLATTEN(IF(A2:A="",,A2:A&"×"&IFERROR(TEXT(DATE(YEAR(B2:B),
MONTH(B2:B)-1+IF(""=SPLIT(REPT(12, DATEDIF(EOMONTH(B2:B, -1), EOMONTH(C2:C, -1)+1,
"M")+1), 2), "♀",COLUMN(1:1)), 1), "mmm yyyy")))), "×"),
"where Col2 is not null"), {"#", "mmm yyyy"}))
This is not an elegant answer but it does the work done by modifying an answer here
Formula:
=arrayformula(SPLIT(A4&";"&unique(text(sequence(days(C4,B4)+1,1,B4), "MMM YYYY")), ";"))
Output:
Note:
I have 3 cells with formula here (E2 for Project A, E9 for Project B and E13 for Project C).
You will need to change A2, B2, and C2 to their respective cells for every entry.
Regarding the manual clicking of a button on your script, I do recommend that you use onEdit trigger with your script instead to automatically trigger the script once a certain cell is edited (or a certain condition is met). That way, no buttons will be needed to be clicked.

How to use arrayformula in googlesheet to count the column with condition?

Hi everyone,
I'm trying to count the number of "Yes" appeared in each row. I want to use array formula so that I'm not required to have formula in each cell in column G. May I know arrayformula can achieve this or there is other method? I tried to use arrayformula(countif(B4:F4,"Yes")) but nothing come out for row 5,6,7,8. Hope to get some advice on this problem as I'm new to google sheet. Thank you.
Give this a try.
=ARRAYFORMULA(COUNTIF(IF(B4:F="Yes", ROW(B4:B8)), ROW(B4:B8)))
Edit: For the case that you describe below (only including certain columns), it's a little more involved, but the same principle works.
=ARRAYFORMULA(COUNTIF(IF(B4:B="Yes", ROW(B4:B8)), ROW(B4:B8)) + COUNTIF(IF(D4:D="Yes", ROW(D4:D8)), ROW(D4:D8)) + COUNTIF(IF(F4:F="Yes", ROW(F4:F8)), ROW(F4:F8)))

INDIRECT parameter value is not a valid in another tab

I create an account sheet on a google spreadsheet for my new small business. There have 3 tab sheets. In the Dec tab, I want to create a dependable dropdown list. In the data tab, the Array Formula works correctly but the same formula does work in Dec Tab. Can anyone help me, please?
try:
=ARRAYFORMULA(IF(LEN(D2:D), TRANSPOSE(
IF(TRANSPOSE(D2:D)=Data!B1, INDIRECT("Data!Funding"),
IF(TRANSPOSE(D2:D)=Data!C1, INDIRECT("Data!Sales_Revenue"),
IF(TRANSPOSE(D2:D)=Data!D1, INDIRECT("Data!Space_Equipment"),
INDIRECT("Data!Inventory_Purchase"))))), ))

Concatenate merged cells with Google Sheets

I have this situation on Google Sheets:
I want to concatenate (=A2&B2) with a merged cell, but only the first cell has a value. I want to get the values of the column "Expected results". How I can detect the first value of each work office in this example?
You can use INDEX/AGGREGATE:
=INDEX($A$1:$A$9,AGGREGATE(14,4,(ISBLANK($A$1:$A$9)=FALSE)*(ROW($A$1:$A$9)<=ROW())*ROW($A$1:$A$9),1)) & B2
Edit for google sheets:
=INDEX($A$1:$A$9,LARGE((ISBLANK($A$1:$A$9)=FALSE)*(ROW($A$1:$A$9)<=ROW())*ROW($A$1:$A$9),1)) & B2
When merging a cell, the content appears only as if it were if the first cell of that block. Hence, you need to only use that first value as your reference. For this you need to block the reference, and it would look like this:
=($A$1&B2)
You can check more information about that in this link.
Try this in D2:
=ARRAYFORMULA(IF(B2:B="",,VLOOKUP(ROW(A2:A),FILTER({ROW(A2:A),A2:A},A2:A<>""),2)&B2:B))

Resources