Getting length of filled column - google-sheets

I have some columns in Google Sheets and want to know that how many of the columns are filled e.g 100,220 or what ever.
How I can put this thing formula so that I don't have to count the columns or look up the columns count every time?

You can do this 2 ways
By formula in a cell or cells within a spreadsheet
By using Google-script for spreadsheets to add a menu item to your spreadsheet that, when clicked executes a script to output the result to a msgBox dialog box on your screen, or output the result to a cell within your spreadsheet.
Both methods are simple, and should require little research. If you require more help please comment back

Related

Using filter with offset

I have a google sheet with a number of columns and tick boxes. I want the Table header to be displayed and joined together when the boxes are ticked in each row. For example looking at the screenshot below:-
In the result for John in row 2, I would want to have a Red and Green joined in Cell M2.
Currently have got this formula to pull filter the boxes that are TRUE
=IFERROR(JOIN(" ",FILTER(B2:L2,B2:L2=TRUE)),"") but cant seem to work out the rest. I'm fairly sure the offset function is probably needed or a query may be easier?
formula:
=BYROW(B2:L,LAMBDA(bx,INDEX(TEXTJOIN(", ",1,IF(bx=TRUE,B$1:L$1,)))))

Google Sheets consecutive rows when multiple checkboxes are ticked

I am looking for help with this sheet. I have some item names and images next to those. They belong together.
Whenever I tick the first checkbox in the item sheet, I want the item name and the image to be displayed in Sheet 2. I have managed to do that with the formula in A1 for the image
=Iferror(VLOOKUP(B1,Items!B4:F15,2,FALSE),"")
and for the item name formula in B1 I used
=iferror(QUERY(Items!B4:F15,"select B where D=True"),"") .
My problem is:
When I tick the first checkbox of any item, the item gets normally displayed in Sheet2 with the belonging image. When I tick the second checkbox for that same item (x2), I want the same item to be displayed right again in the second row in Sheet2 with the belonging image again. If I tick the third checkbox, I want it to be displayed three times basically below each other with the belonging image.
Is that possible without scripts?
https://docs.google.com/spreadsheets/d/1tjyBIMDWbM4AxuQby4vmEUeFgqLbxN1EPk1pGqEX_64/edit?usp=sharing
You can try
=sort(filter({
ifna(filter(Items!B4:C,Items!D4:D),{"",""});
ifna(filter(Items!B4:C,Items!E4:E),{"",""});
ifna(filter(Items!B4:C,Items!F4:F),{"",""})},query({
ifna(filter(Items!B4:C,Items!D4:D),{"",""});
ifna(filter(Items!B4:C,Items!E4:E),{"",""});
ifna(filter(Items!B4:C,Items!F4:F),{"",""})},"select Col1")<>""))
UPDATE: Better approach
=sortn({
ifna(filter(Items!A4:B,Items!D4:D),if({1,1},char(999)));
ifna(filter(Items!A4:B,Items!E4:E),if({1,1},char(999)));
ifna(filter(Items!A4:B,Items!F4:F),if({1,1},char(999)))},
countif(Items!D4:F,true),,2,1)
Essentially we are filtering the data three times (one for each checkbox), stacking all the results together and sorting them in ascending order. The if({1,1},char(999)) is used as padding in case there's no match (i.e. no checkbox is ticked) to prevent ARRAY_LITERAL. The idea with char(999) is to have a character that goes to the bottom of the list when the range is sorted so we can exclude it with sortn(). I don't know how Google Sheets sorts when special characters are involved (if anyone does please let me know) but char(999) seems to get the job done.

Find a way to increment formula in merged cells and blank cells

It's my first time posting here, I tried to look for something similar to what i am looking for but couldn't find anything, but if I just didn't look enough, I apologize.
My problem is as follows:
https://docs.google.com/spreadsheets/d/10yx-WO_SlOnFLNW83N8wucOrcexfLtt1TE2FDzTAQbc/edit#gid=799857548
I have a data table with information I receive from somebody. I then need to use that information to feel kind of individual product data table on another sheets, and add more to it.
Instead of copy everything of sheets one in sheets 2, I would like it to feel by itself.
I tried with =Cellsadress or =OFFSET and other stuff but couldn't manage to get what I want.
When i put every formula in the green table on sheets 2 and try to increment it by dragging down, the formula values increase by 25 approximately. but i want it to increase by only one, or find another way to show the information in the column of sheets 1 to reflect in different cell of sheets 2.
In my real document i have 100 of lines, so i cant do it manually like i could do with 4 lines.
Is there a way to do that?
If somebody have a solutions i would be gratefull
try this formula for C32 =INDIRECT("'Sheets 1'!F"&(int(row()/25)+2))
when you copy-paste this formula into cell C57 or C82, it will take values from 'Sheets 1'!F4 and 'Sheets 1'!F5, respectively

Google Sheets: How do I "ImportDATA" or "importRANGE" from single cell into merged cells?

I have a Google Sheet that has the first three columns filled with 2-cell high merged cells down to row 42.
Example:
I would like to import data from another sheet (rows A4:A23) and have that data populate into the merged cells A3-4:A41-42. Is it possible?
This function brings the information in, but it does not display correctly in the merged cells.
=importrange("https://docs.google.com/spreadsheets/d/sheetIdentifier","TabName!A4:A23")
The idea is to have the player and their strength numbers in columns A:C and then have their two assignments in the un-merged rows in columns D:F.
Thanks for any assistance you can give.
You may have some mistake in the syntax
Please try the following
=IMPORTRANGE("JUST_THE_SHEET_ID_HERE","TabName!A4:A23")
(If still facing issues edit your question, share some data, the expected results and let us know.)

In Google Sheets, How do I find the row number of a cell with certain text in it?

In Google Sheets, What do I do if I want a cell to display the row number in which a certain word/line of text appears?
So, I'm working with two kinds of spreadsheets here: One has the number of "Competitors" (which I'm looking for) in the 7th row of the spreadsheet, while others might have it in a different row. To work around this inconsistency, I want to set up a cell function which outputs the row number of where ever the "Competitors" number is, and then concatenate that function into a reference for the correct row-number.
The tables that I'm looking in all have the labels in the first column
Here are some viewable links to the Sheets I'm working on:
https://docs.google.com/spreadsheets/d/1SS_Bk2FFGNnsxhhg3RQGflTSxEncAjD-CaQBtPjTIVM/edit?usp=sharing
https://docs.google.com/spreadsheets/d/1JJvbiYUYT3zb8OFwHoF1WaLmEGkwO4N7lLLeBqgWRcw/edit?usp=sharing
^Notice how "Competitors" is in row 7 in one sheet but in row 6 in the other. This is why I need to find a function which can find a reference to the row number of "Competitors"
Figured it out - To find the row numbers that the string "Competitors" was in, All I had to do was use the MATCH function like this:
=MATCH("Competitors", A:A,0)
The user #Jeeped told me about the "Match" function in a comment under his answer. Although Jeeped's answer did demonstrate the "MATCH" function, he presented it being used along side the "SUM" function, which confused me at first. Give thanks/upvotes to Jeeped for helping me find the solution in this :)

Resources