Why does my formula for date go away when form is submitted? - date

I want my Google sheet that is populated from a Google form to have a column that is just a date (8/5/2019) so that it can be easily merged into a google doc through automation of Autocart.
I inserted a column next to the time stamp and populated it with the formula
=TO_DATE(A5)
=TO_DATE(A6)
=TO_DATE(A7)
and populated the whole column with this formula.
Whenever I test my form to see if it works the data is imported in but the formula in column B is taken away. Why does it take away my formula?

that is expected behavior. you should use instead an array formula one row above eg if your first date starts in A5 paste this in 4th row:
=ARRAYFORMULA({""; IF(LEN(A5:A), TO_DATE(A5:A), )})
=ARRAYFORMULA({"Date"; IF(LEN(A2:A), TEXT(TO_DATE(A2:A), "m/d/yyyy"), )})

Related

How to make a cell Blank when no data is being delivered to it

I have made a sheet to track equipment for the company I work for. I have used a script to populate last edited date to a column when a specific column is populated with data. My issue is that once I remove the data from column "A", the date stays in column "B". Is there some sort of formula or script I can use to make the column blank again once it is not being fed data.
I'm using google sheets.
Thank you.
Kind regards.

Counting days between 2 dates and swapping one of the dates for another if cell if not empty - google sheets

As the title suggests I'm wondering if there is a way to count days from 1 Column from the current day, then when filling in another column it stops counting the difference in days?
I'm using the following formula (found online)
={"Days";ArrayFormula(if(A3:A="",,int(B3:I)-left(A3:A,10)))}
Column A being where my date of entry is, column B is a hidden column with every row set to the
=Today()
I have another column, Column C that I will enter the date manually after date of completion, at which point I would like it to then stop counting the days and show me the number of days between Column A and C (Date 1 and Date 2)
I'm not overly experienced in google sheets but I'm thinking maybe there's a way to
check if column C is empty, if so carry on with todays date, if it's not empty to
calculate Column C - Column A?
Would making an new column for checking if the completion date has been entered work?
ISBLANK(C:C)
If so would it be possible to get one formula to check whether True or False and determine what 2 dates to work with? Lets say Column D is for ISBLANK the following is what I think of
={"Days";ArrayFormula(if(CD:D="False",,int(C3:C)-left(A3:A,10)))}
={"Days";ArrayFormula(if(D3:D="True",,int(B3:B)-left(A3:A,10)))}
When I try this I have no luck and get a "Result was not expanded automatically, please insert more rows (1)" error message
Any help would be appreciated!
Apply the formula :
=if(B2="",today(),B2)-A2
at C2. And drag downwards. That's should do.
Please share if it work/understandable/not.
Sorry it's a bit hard to understand this question, if you could post a current and desired screenshot example that would help I think.
So, I think your best bet here is to review this video if you're wanting sheets to auto-input a time entry when a cell is modified:
https://www.youtube.com/watch?v=548dD3iXetg
And it will show you how to script a cell to enter in a time entry when another cell is edited, and then you could use a variation of formulas to calculate the difference between the days of the original minus the date from the script (such as the once referenced below or by #p.phidot )
So for an example, once you script the time entry to work in the background of the sheet, you have a formula using an IF statement to make it pull between your today date or the new date being entered.
My cell references below are an example as I can't follow the question sheet.
=if(b2="",A2-B2,A2-C2)
This way if b2 is not blank it'll do a2-c2. You could also use ISBLANK if you like.

Google Sheet: Pick max date out of row

Assume: in a google sheet the attendance to courses is logged with crosses.
Goal is to get the last attendance date of a person and add 6 months to it. ( course needs to be followed every six months ).
I've tried to retrieve the date of the last course in one column and add the +6months immediately and tried to have the +6 months in the second column, but I didn't succeed in both attempts.
See this link for example google sheet: https://docs.google.com/spreadsheets/d/10DG2I4VgTlOHJ5TG0qH4pJ5hJ9zsYuJCgRzEtuiTE60/edit?usp=sharing
=lookup("x",$B4:$F4,B$2:F$2)
Enter this formula in cell G4 and copy down the rows.
This formula looks for "x" (the attendance indicator) in cells in row 4 (columns B to F) - it's looking for the last instance. Then it returns the cell value from row 2 (the course date) of the relevant column.
=EDATE(G4, 6)
Enter this formula in cell H4, and copy down the rows.
This is pretty straightforward. It takes the date obtained from the lookup formula and adds 6 months.
Note that the lookup formula references column F. That's because as you create more courses you'll want the formula to automatically include them. So in cell F1, type something like "Don't use this column" - and then don't use that column!
Now when you add a new course, insert a new column to the left of the column headed "Don't use this column". This will ensure that the range in the lookup formula will expand to include the new column/course, and your latest attendance date will be updated automatically.
BTW, there's no guarantee that the date of the next course is a working day.

Transpose columns in another sheet to rows via Data > Validity dropdown

I have a collection of addresses on one LibreOffice Calc sheet (7 columns, 1st name, 2nd street and so one) and want to create an invoice template on another sheet.
I know how to retrieve and transpose a known row - the solution on this other question explains that: Transpose column on one sheet to row on another, with linking
However, this does not seem to work if I use Data > Validity to fill the first cell in the address area (7 cells below each other).
What I am basically trying to accomplish is a dropdown in the first cell where I select the name and it automatically retrieves the address from the other sheet into the cells below.
Is this possible or am I overthinking here?
I suggest:
Name the data in your first column (eg CName)
Name your array of data (eg Clients)
Set the Source for Validity Criteria to CName
Assuming the validation is in A1, in A2 and copied down to suit:
=VLOOKUP(A$1,Clients,ROW()-0,0)
The -0 is not required if the validation is in Row1 but is where an offset should be made if not.

Conditionally clear content of cells subject to Data>Validity

In CALC I have a column which I set up to be filled with values from a specified cell range (using Data > Validity menu). This column represent a "Forecast date" in a spreadsheet used as a TODO list. Now another column in this sheet represent the effective date when an item is done.
I would like that, when this "Done Date" column is filled in a row, then the corresponding value in the "Forecast date" disappears. I thought it would be straightforward to put in the Forecast date column a formula IF(ISBLANK()) but I can't have in this column a formula AND a Data>Validity: if I choose an item in the list the formula is cleared, etc. Is there a way to do so?
Edit:
Screenshot as requested. Column A is where user selects a date within the list, and I want to remove that date if something is filled in Column B.