Formula only recognizes one submission - google-sheets

My goal is to make it so that the spreadsheet checks to see if the respective Web ID in Column B has an Active LOA as determined in Column I. An Active LOA being defined as one with an end date that has NOT yet passed.
I've gotten the formulas to work with the first entry. But if that first entry's date has passed (marked as Expired) and the entry after that one hasn't passed (marked as Active LOA) then the formula breaks down. It's as if the formula works only once.
The formula that checks the respective Web ID's in Column B of the "Roster" tab against the Web ID in the "ScD LOA Responses" tab is in cell F9 of the "Roster" tab.
The formula that determines whether or not the date has passed/whether the person is still on LOA is found in column I of the respective row.

You are getting wrong result on second row because you have lock the range on first row, change it as following should work properly:
=IF($F3:$F<TODAY(),"Expired","Active LOA")
You may try arrayformula also by only enter formula on F3:
=arrayformula(if($F3:$F="","",IF($F3:$F<today(),"expired","active")))
The issue for Roaster is not syn with the form submission is because Vlookup is limited to return first occurence unless you make so adjustment, here I will give a simple solution to always return the latest result for syn:
=iferror(index(FILTER('SC LOA Response'!C$3:$I,'SC LOA Response'!C$3:C=B6),COUNTIF('SC LOA Response'!C$3:C,B6),7),"")
Since your roster is fixed number, you can copy the formula on every row, hope it solve your issue :)

Related

Is there a simpler way to say whether the current date is within a set range in Google Sheets?

I'm trying to create a fundraising spreadsheet that will say whether funders are currently open or closed for applications. Ideally this would be based on just the month and day, so it doesn't have to be updated every year, but I ran into problems with funding cycles that begin at the end of one year and end in the next (eg. Dec 2020 - Feb 2021). This is what I came up with to get around it, but is there a simpler way to achieve the same result?
It should return Open if today's date falls within the funding window; otherwise it should say Closed. Rolling deadlines are always Open. What I have currently returns the correct output but slows down the sheet. I'm also working with a group of volunteers with varying levels of computer skills and ideally would like to leave them with something that is easy to understand/maintain.
Here is a link to the demo sheet: https://docs.google.com/spreadsheets/d/1lHFd0f_y2PCzLSvXYM6XD1rCfdzCglsQvyfpu7xJiRQ/edit?usp=sharing
=IF(B77="rolling","Open",IF(YEAR(B77)=YEAR(C77),
IF(
AND(
DATE(YEAR(B77),MONTH(TODAY()),DAY(TODAY()))>=B77,
DATE(YEAR(C77),MONTH(TODAY()),DAY(TODAY()))<=C77),
"Open",
"Closed"),
IF(
OR(
DATE(YEAR(B77),MONTH(TODAY()),DAY(TODAY()))>=B77,
DATE(YEAR(C77),MONTH(TODAY()),DAY(TODAY()))<=C77),
"Open",
"Closed")))
I've added a new sheet ("Erik Help") to your sample spreadsheet.
I deleted your header and all of your row-by-row formulas from Column C and replaced them with the following single array formula in C1:
=ArrayFormula({"Status Today"; IF(A2:A="",,IF(ISTEXT(A2:A),"Open",IF((TODAY()>=A2:A)*(TODAY()<=B2:B),"Open","Closed")))})
This one formula will produce the header (which you can change as you like within the formula itself) and all column results.
First, an IF test is run to see if each cell in Column A is blank. If it is, then the corresponding cell in Column C is left null; otherwise the next IF test is initiated.
Since all of your dates are numbers, the second IF test simply checks to see if the value in Column A ISTEXT. If so, then we know it is "rolling," and the return value is "Open"; if not, then the final IF test is initiated.
The final IF test simply checks whether two parenthetical conditions are true (joined by the asterisk, which in array formulas, means AND). The two conditions are that TODAY() is greater-than-or-equal-to the value in Column A and that TODAY() is less-than-or-equal-to the value in Column B. If so, "Open" is returned; otherwise, "Closed" is returned.

Sheet Query formula giving the incorrect output

I have a sheet where the query formula used is very simple.
Here is the test sheet
It just have to display the conetents of the second sheet in the first. Unfortunately, at some point the cell values are merged into single cells.
The example below shows till Apple1 to Apple 10 the data is merged in row 1.
I need a reason for this error and please avoid answering like, delete the row 15 of fruits tab sheet to correct.
Any cause for this is really appreciated.
Sheet2
Sheet1
QUERY has several arguments. If you don't include them, they are assumed to be defaults (with the third argument being to try to make the first row into a header). Try this instead:
=query(Fruits!A3:F,"Select *",0)
or you can leave the middle argument blank in your case:
=query(Fruits!A3:F,,0)

Checkbox (or SOMETHING) to activate a row in Google Sheets

My wife runs a dance school, and occasionally needs to calculate the average age on a given date of a group of dancers. I'm not having a problem with the age calculation and averaging, but I wish to add a feature:
My sheet has all dancers in her company listed. Currently, we copy them all, paste to another sheet, and then delete the ones not included. That's a PITA, so instead I'd like to be able to put a checkbox in the first column, that when checked, would INCLUDE the associated age column in the calculation. So, she could just go down the list, click the included dancers, and it would calculate the average JUST for the selected ones and ignore everybody else.
Honestly, at this point, I have ZERO idea of where to start to do this and need a gentle push in the correct direction. Assume I'm an idiot and know almost nothing.
Here's an example sheet with the new checkbox feature to illustrate the function:
https://docs.google.com/spreadsheets/d/1G8LJyS10yi1HIa2MNHCbWUJPso9QAit3i0cO8A-Uw3A/edit?usp=sharing
I placed the formula above the "Age" column (Column C), and the Checkboxes in Column A:
=iferror(AVERAGEIF(A3:A,TRUE,C3:C),"NO DANCER'S SELECTED!")
This also displays an error message in case no dancer's are selected.
Try this. It looks for 'y' in column A. Assumes names are in column B and ages in column C. You can adjust the columns to match you sheet, and change the 'y' to whatever value you want to enter. It will average the ages of the rows with 'y' in column A:
=AVERAGEIF(A2:A,"=y",C2:C)

Autofill a column in Google Sheets as new rows are submitted through Google Forms

I have a google form that has fields taking up 7 columns in the response sheet. I have reserved the 8th column to compute few fields (basically a formula) and generate a unique ID for that response. I know that when new responses are added, I can drag the box of the 8th column field all the way down to the given number of rows to auto-fill the column. But this type of auto-fill requires a manual effort. What I want is an automated system to keep filling in the column with my formula.
I have tried pulling the column down beyond the current number of rows in a hope for it to auto calculate when the new row is added but a new response simply overwrites the entire row instead of filling in just the seven columns which deletes the 8th column in that row.
The spreadsheet is
https://docs.google.com/spreadsheets/d/1HM2dDRtkF_KlQ8SKoeW2YmjP2dttYAk1_4iCYBVEN8o/edit?usp=sharing
The responses fill up to column H (Member #3) and my desired column is column I (Registration ID) which is aided by column J, K and L.
You can try using
=ARRAYFORMULA(IF(ROW(M:M)=1,"Registration_ID",IF(C:C="UM-DAE CBS, Mumbai", "cbs"&"_"&J:J, IF(C:C="ICT, Mumbai", "ict"&"_"&K:K, IF(C:C="IISER, Pune", "iiser"&"_"&L:L,"waiting for a response...")))))
Just some explanation:
//This one is just to label the first row as Registration_ID so you can replace M:M with any column you want.
IF(ROW(M:M)=1,"Registration_ID"
My first time answering in Stack Exchange so I'm not familiar with the formatting.
Also a heads up, if you wanted to use ArrayFormula() with an If(AND()) or If(Or()) function, just know that the ArrayFormula() requires you to use arithmetic functions like "*" or "+" instead.
So IF(AND(A,B)) will be IF(A*B).
Use the "CopyDown" add-on for Google!
On your Google Sheet that your Form posts to, click Add-Ons > Get Add-Ons > type "copyDown".
This add-on quickly & easily allows the sheet to automatically copy the formula from one of your top rows (adjustable) to the rest of the form's submissions.
Love it!

Sum above cells ignoring blanks

I have a spreadsheet where I have data from a bank account. Each bank transaction has a date and an indication if that transaction is already done or if it's just expected. When it's already done, it must be added to the total balance up to date. If not, then the total balance up to date must be blank. I need to autofilter the data, so I can filter and order it depending on date or other conditions, that's why I've been using this formula:
=IF(D3="Y";B3+INDIRECT(ADDRESS(ROW()-1;COLUMN()));"")
Problem here is that when the cell above is blank, total sum resets and it starts from the value of that transaction. I need a formula that ignores the upper blank cells, and sums all cells above that are not blank plus the amount of that transaction.
Besides, once I change the "N" in "Done" Column to a "Y" I need the formula to update and show the correct balance.
I share an example sheet for better understanding https://docs.google.com/spreadsheets/d/1_gk0YaziUhOZfRbrlfHizMrVu6OT7njIaTUyQaE6Lbs/edit?usp=sharing
Ok I THINK I understand what your going for - please let me know if I am confused, but I added an example on your sheet.... basically what I ended up doing was including one of your conditionals, but then also adding another function to exclude the blank rows by way of filter , index and counta It looks more complicated than it is because I nested it all back into one formula:
=IF(I3="Y";sum(G3;index(filter(indirect("F2:"&address(row()-1;column();4));ISNUMBER(indirect("F2:"&address(row()-1;column();4))));counta(filter(indirect("F2:"&address(row()-1;column();4));ISNUMBER(indirect("F2:"&address(row()-1;column();4)))))););)
To work it from the inside out - the way I am excluding the blank rows is by using FILTER to get all the rows from the first row with a value ( Like A2 in your example) and using INDIRECT and ADDRESS to end the array I want to include exactly one cell above the current cell.
Then I use the condition that the range I built has a number value in it, there fore excluding the blanks.
In order to get the last value available, I use COUNTA to find out the total rows in the filter, then wrap the formula with INDEX to use the counta value as the row to return (which automatically is the last row available above the current cell)
Try this in A3 and copy down:
=IF(D3="Y";B3+INDIRECT(ADDRESS(ROW()-1;COLUMN()));A2+0)
If you want to display the "N" rows as blank, add a column (B) fill in the header and the starting number (5000) then put this in B3:
=if(E3="N";"";A3)
Copy it down then hide column A.

Resources