IF formula do not return anything - arrays

I have a Google sheet where I receive the data automatically from a software. Basically it adds a new row and with data in each column. Now I have to add manually a column and I want to add a formula to each new row. I'm using IF to leave the cell blank if G1401 is empty.
=if(G1401="", , ifna(CONCATENATE(G1401," - ",H1401," - ",J1401)))
But i have to drag the formula for the cells I want and thats THE problem. If I drag the formula, when the software sends a new row, it's assuming that I already have a row filled with a formula and write in the next one without the formula.
What I want is something similar to FILTER function to be able to not use the drag cell formula to use it or something similar.

use in row 2:
=ARRAYFORMULA(IF(G2:G="",, G2:G&" - "&H2:H&" - "&J2:J))

Related

IFERROR MATCH formula not searching whole sheet

We use a sheet to look up information. There are 936 rows and will get more as time goes on, however the query returns a blank result (as it should) after row 600, how do i change what the search/lookup area so it will search the whole table on a separate sheet and return the results?
=IFERROR(IF($D$5=""," ",INDEX(allvehicles2,(MATCH($D$5,indexes2,0)),7))," ")
Tried to alter the selection and even moving to another sheet but would not return the results.
If you are able to, try using Tables with the XLOOKUP function.
It simplifies the formula and the table will automatically grow as data is added to it.
This ensures that the formula will use all the data.
Make sure that the data you are using to lookup against is continuous.
That is no empty rows or columns.
Ensure that it has headings.
Turn it into a table by selecting it and pressing Ctrl + T.
You can change the name of your table by selecting the data and not the headers.
Then use the Name box to change the name.
Then use the XLOOKUP function, with the lookup_array and return_array values each being a column in the table. If the value is not found, an empty string will be returned.
Formula structure
=XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found])
Example formula based on the screenshot
=XLOOKUP(A2,MyTableName[Key],MyTableName[Value 6],"")

Google Sheets: Using Transpose on an array in other tabs & identifying the tab by

I would appreciate some help, please.
I have a google sheet with many tabs with data going horizontally.
I would like to create a formula that imports and transposes the data into a vertical list.
However, I want to be able to type in (or drop-down list) to select the tab which the transpose formula to look at. I cannot get anything to work. I have tried this
=TRANSPOSE(A1&!B2:J2)
To add to that if it could use a lookup (vlookup or hlookup) to find the correct row to transpose then that would be great also.
I have set up a test sheet below. Please help. Many Thanks Tim https://docs.google.com/spreadsheets/d/1Menn6Z1mLl8wYOrcdQFnfs7Lp0dbC9UJe1S3AQRcOS0/edit#gid=0
You should not use IMPORTRANGE to work with data that exists anywhere in the same spreadsheet. IMPORTRANGE is for use retrieving data from a separate spreadsheet.
Instead, delete your current Sheet1!A2 formula and replace it with this:
=ArrayFormula(TRANSPOSE(INDIRECT(A1&"!B16:J16")))
I also added a new sheet ("Erik Help") with an advanced formula that accomplishes your lookup using whatever is types in B1. If whatever is typed in B1 exists in Column A of the selected sheet, the results of that row will be retrieved. If no match is found, IFERROR will return "No Match Found."
That formula, in 'Erik Help'!A2:
=ArrayFormula(IFERROR(QUERY(TRANSPOSE(INDIRECT(A1&"!B"&VLOOKUP("*"&B1&"*",{INDIRECT(A1&"!A:A"),ROW(INDIRECT(A1&"!A:A"))},2,FALSE)&":"&VLOOKUP("*"&B1&"*",{INDIRECT(A1&"!A:A"),ROW(INDIRECT(A1&"!A:A"))},2,FALSE))),"Select * WHERE Col1 Is Not Null"),"No Match Found"))

Filling out cells based on another cell in Google Sheets

I am trying to fill out cells in Google sheets based on another cell. That is, I have drop down list in column J and based on what I choose in that column, I need cells in column K to fill with a specific number. I tried conditional formatting, but that works for colours only, not values. I tried IF function, but this doesn´t work either:
Anyone has any ideas? Thanks a lot!
use in empty column in K2 cell:
=INDEX(IFNA(VLOOKUP(J2:J;
{"Cyklistické bundy"\ "2642";
"Dámske bundy"\ "1763";
"Pánske bundy"\ "1739"}; 2; 0)))

Find and repeat a cell value if values match

My spreadsheet is collecting data from a form
On another tab I'm showing the responses that match "Lesson day" with "Today's date" (in the example, all the lessons are showed).
As you can see, the "e-mail" field is filled out only once.
Is there a way to automatically fill the "e-mail" field in the second tab? Maybe matching the "Student Code" with the "e-mail" fields in the first tab?
I've tried the MATCH() function but it returns only the position. I feel like I need to combine MATCH() with other functions but I have no idea about where to start
EDIT: Having the email adresses on another column would work too.
SOmething like: if the "Student Code" in the 2 tabs matches, show the email adress for that "Student code"
try:
=ARRAYFORMULA(IFNA(VLOOKUP(D4:D, FILTER({form!E2:E, form!G2:G}, form!G2:G<>""), 2, 0)))
change form to match the sheet name of your form sheet
As suggested, I created an auxiliary table (just called Sheet7) and getting closer to the desired result
In A column I used
=UNIQUE(Lessons!E:E)
In column B I used
=INDEX(Lessons!A:M, MATCH(A2,Lessons!E:E,0),7)
Then, on my second spreadsheet, I could get all the e-mail adress using the following formula
=INDEX(Sheet7!A:B, MATCH(D4,Sheet7!A:A,0),2)
I've tried to use ArrayFormula on the auxiliary table
ARRAYFORMULA(if(A2:A="",,INDEX(Lessons!A:M, MATCH(A2:A,Lessons!E:E,0),7)))
But it doesn't work. It shows only the email adress matched from the cell A2, ignoring A3, A4,...
A different approach:
Make an extra column in your form responses sheet called "Student E-mail".(In this example it is column "I")
In row 2 of that column, write the following formula:
=ARRAYFORMULA(IF(ISBLANK(G2:G),VLOOKUP(F2:F,INDIRECT("F$2:G"&ROW(I2:I),TRUE),2),G2:G))
Use that column for the emails in your other tab (hide the original email column)
Update:
Using array formula, you don't have to manually drag & drop. And it keeps going as new rows are added.
Usually MATCH is combined with INDEX
You should build an auxiliary table with one column for names and another for ee-mails.
To build the auxiliary table from the collected data you could use something like this
=UNIQUE(FILTER({Lessons!E:E,Lessons!G:G},LEN(Lessons!G:G)))
The above is better than using a formula for each column as this prevent having mismatching data.
INDEX / MATCH usually doesn't return the "expected" results in an ARRAYFORMULA. Instead use VLOOKUP.
NOTES:
Please bear in mind that every time that you edit a value the formula will be recalculated. If you have a lot of formulas (like when doing a fill down to copy a formula to all the cells in a column) or having an ARRAYFORMULA with open ended references i.e. G2:G this could affect your spreadsheet performance.
If you go for using an ARRAYFORMULA, use ARRAY_CONSTRAIN to limit the number of rows returned by your formula.
Related
How to map values between columns in worksheets

Default cell value on insert row from Forms

I'm trying to create a live quiz with results from a Google form. It inserts rows into my custom sheet, but one of the values which is a sum() of specific cells is ignored on insertion, is there a way to set the default value of a specific cell when a new row is inserted to the specific sum formula I require?
I have seen various examples but all are more complex than I need an I am unable to unpick them.
Is it also possible to specify a checkbox in a cell as well?
try:
={"TOTAL"; ARRAYFORMULA(IF(A9:A="",,MMULT(FILTER(D9:CE,
MOD(COLUMN(D9:CE)-1, 2)=0)*1, ROW(INDIRECT("A1:A"&COLUMNS(D:CE)/2))^0)))}
spreadsheet demo

Resources