I need to make a helper column but am stuck because if I'm doing it for every row it's working, but if I make it an array formula it errors.
For a single cell, the formula is like this:
=if(AND(len(G2)>0, len(F2)>0),
if(G2=G1, I1+1, "1"),
if(AND(len(G2)=0, len(F2)=0), "", I1+1)
)
and I make an array formula like so:
={"Bundle Helper"; arrayformula(if(AND(len(G3:G)>0, len(F3:F)>0),
if(G3:G=G2:G, I2:I+1,"1"),
if(AND(len(G3:G)=0, len(F3:F)=0), "", I2:I+1))
)}
As I understand it, the problem is because I need a row before to add value in column "i" I1+1, but because it's an array so it becomes a problem I2:I+1.
Is there any other way or solution to this problem?
Link to Sheet
=ARRAYFORMULA(IF(LEN(F2:F), COUNTIFS(F2:F, F2:F, ROW(F2:F), "<="&ROW(F2:F)), ))
Related
I created a googlespreadsheet here: https://docs.google.com/spreadsheets/d/1K5oc6-XcgMTUSCICr9GguxHWkrm1UuMhnzXu9Rn3ngY/edit?usp=sharing
I would like to return values from all the "checked" thickboxes in a single row like the image below.
Can I do this using a formula?
use:
=ARRAYFORMULA(REGEXREPLACE(""&TRIM(TRANSPOSE(QUERY(TRANSPOSE(IF(A2:C=TRUE,
{A1&",", B1&",", C1}, )),,9^9))), ",$", ))
While it can be done in an arrayformula for the whole column, you might try this simple JOIN() formula, dragged down the column. Starting in D2:
=IFERROR(JOIN(", ",FILTER(A$1:C$1,A2:C2)))
I cannot find a solution to my problem:
I have a sheet with ~290 rows and ~80 columns. The first row and column are fixed/header.
I would like to collect non-blank values and their header into column B.
I've tried to search for solutions, but I'm not as good at excel, so I cannot wrap my head around most of the advice that I've found.
In Google Sheets you could use an Array formula. I got this:
The formula I've used:
=ArrayFormula(CONCATENATE(IF(--(C2:G2<>"")*COLUMN($C$1:$G$1)<>0;$C$1:$G$1&" "&C2:G2;"")))
This is how it works:
(--(C2:G2<>"") will return an array of 0 and 1 if the cell is blank or not
COLUMN($C$1:$G$1) will return an array of column numbers of each cell
(C2:G2<>"")*COLUMN($C$1:$G$1) we multiply both arrays, so we will get an array of column numbers of non blank cells and 0 of blank cells
<>0;$C$1:$G$1&" "&C2:G2;"") We check if each number in the array obtained in step 3 is 0 or not. If it's 0, it returns a null value, if not, it returns the value of cell
CONCATENATE will concatenate all values from previous array (step 4) so we concatenate null values with real values of non blank cells.
Not sure if this will make the sheet load slower if you have too many records.
Hope this helps
Excel is not the same Google Sheets
=ARRAYFORMULA(TRIM(REGEXREPLACE(
TRANSPOSE(
QUERY(TRANSPOSE(IF(C2:F13<>"",C1:F1 & ", ","")),,99^99)
),
"((\s+)|(,\s*$))",
" "
)))
My sample
use:
=ARRAYFORMULA(REGEXREPLACE(TRIM(TRANSPOSE(QUERY(TRANSPOSE(
IF(C2:G<>"", C1:G1&" "&C2:G&",", )),,99^99))), ",$", ))
I have this example here
I need to have the data in column D filled in with arrayformula. The value should be the value in column B.
I've tried using combination of ROW&INDIRECT&FILTER&QUERY|VLOOKUP , but it didn't work, as if ROW() cannot be used in arrayformula. Maybe you guys have some idea that could work.
use:
=ARRAYFORMULA(IF(C7:C="",, VLOOKUP(ROW(A7:A), IF(B7:B<>"", {ROW(A7:A), B7:B}), 2, 1)))
I want to achieve something like the image below:
How can I do it?
use this formula:
=ARRAYFORMULA(IF(COUNTIFS(A:A, A:A, ROW(A:A), "<="&ROW(A:A))=1,
"first occurance", ))
Looks like this normal Excel formula works just fine.
Assuming your data starts from cell A1, insert following formula
=IF(COUNTIF($A$1:A1,A1)=1,"First Occurrence","")
Then copy down as much as you need.
The problem im getting is if type something in my entry box it first fills index 1 and 2 of the listbox before finally typing into the 3rd index.
def country_get(event):
listbox.delete(3)
listbox.insert(3, country_label.cget('text') + event.widget.get() + '\n')
title_text=StringVar()
entry_country=Entry(master, bg="wheat3", fg="dark slate gray", textvariable=title_text)
entry_country.bind('<KeyRelease>', country_get)
entry_country.grid(row=4, column=1)
I want to be able to type at any index of the listbox whether it be the 3rd or 5th, without having anything at the previous index's.
You can't do what you want. The listbox isn't designed to have empty rows. If you want empty rows, you will need to insert empty strings.
Depending on how many entries I'm using or need, i just insert empty strings like so:
listbox.insert(0, "")
listbox.insert(1, "")
listbox.insert(2, "")
listbox.insert(3, "")
listbox.insert(4, "")
It appears that the listbox is empty when it fact it is just filled with empty strings. There are most likely other ways to get around this, but for what I need my program to do, this is what worked for me.