Trigger to stop updating the value in a cell - triggers

I'm hoping someone can help me with this:
In a Google Sheet spreadsheet, the values in column C of sheet 'Daily' are automatically copied and updated from cell C4 in sheet 'Current.'
I would like the value corresponding to each day (in sheet 'Daily') to stop updating at the end of the day.
OR:
Could the value in C4 of 'Current' get copied (without future updating) at a certain time each day in the cell corresponding to that day in 'Daily'?
I hope I wrote this clearly enough. Thank you in advance to anyone who can help or direct me to the right place.
Best,
Lambert
see above.

Related

Google Sheets - Protect monthly range script needs monthly triggers at specified date and time

I would like to request help with a script Im trying to put together.
Linked is my test spreadsheet including the script I currently have on the second sheet.
The idea is that this sheet will be copied individually to a group of people. Each person will get their own sheet, editable only by them and myself. It does not get shared any further. Each day the person will add a value into the corresponding day's cell.
On the last day of each month at 8pm, I would like to protect (lock) the cells for that month, to stop the person changing any values that they previously entered.
I have put a repeating script together with a function for each month, covering each range. The problem I'm having is creating triggers that will run the function on the required day. If I set a monthly trigger, they will all trigger at the same time at the end of the first month. Ideally I need individual triggers that will run once a year on the specified date and time for each individual function.
Is this possible? Is there a better way of doing this?
I also realise that I will need to give permissions for each function run, and possibly for each individual copy of the sheet I give to said persons. Is there a clever way around that?
Im also thinking another approach would be for the script to trigger each monthly function 'on open' if the relative date has passed. For example, on Open, if Date is Feb 1st, lock January range, and so on.
Any help provided would be greatly appreciated.
(Note: the true sheet I copied my script and layout from starts this section at Column U, which is why I have minimised Columns A-T).
Test Sheet Link: https://docs.google.com/spreadsheets/d/13z8eWpo6oislkGX3USifLWqh5sz3DsJpSY1YyqNLrx8/edit?usp=sharing

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.

Tableau - Excluding Null Values From Multiple Time Series

So I have two time series on one time axis. However, the second time series (Exiters) has null data for the last time period (2018 Q3). Tableau is currently dealing with this null data point by extending the series line to to the bottom which ultimately makes it appear to any user that the data has dipped to "0". Extending the line to "0" is misleading in my opinion.
That being said, is there any way to exclude this null data point only without affecting the data in the other time series (Participants)? Basically, I just want to exclude this specific null data point, have the Exiter time series end at 2018 Q2 and maintain the Participant time series ending at 2018 Q3. This surely is possible right?see image here
In my attempts to reproduce this, I kept finding that the default behavior was to act as you are desiring; to have Exiter end at Q2 while Participant displays into Q3.
I was able to reproduce the "0" effect, though, once I clicked on the following button "Show data at default position" after clicking on the "2 Nulls" button at the bottom right of the viz:
I wonder if perhaps at some point that button was clicked in the creation of this workbook. More information on default positions here.
The way to revert this behavior, which may end up giving you the view you are looking for is:
Analysis > Special Values > Hide

Finding Difference from Previous Day Volume to Next Day Volume

I have been struggling to find the new incoming volume per day.
I have categories as : - total ticket, Resolved, closed and Daily left.
So the calc is everyday resolved and closed are moved from the queue and
'daily left = Total Ticket- (Pending + Closed)'
Now there is some carry forward everyday hence the total ticket for the next day includes some volume i.e. Daily left of previous day.
I am not able to figure out how to show that number, I have tried using previous value but it is not helping. Please suggest. Attaching a print screen of the data.
For 3rd the # of records are 33 however there is 1 carry forward from previous
day hence the Fresh Vol should be 32. I have used the formula to calc but it is
not giving correct result
sum([Number of Records]) - (PREVIOUS_VALUE([Daily Left Volume]))
This is taking the left over of current day and not previous day.
I am also using look Up function but that also does not show the current output.
The output from tableau after using the lookup function is below attached as well
I am new to this community and dont have enought reputation to comment :P. So writing few possible solutions here:
1) Make sure the data is sorted by date and is unique on date level. If it is not then Previous or lookup might not work
2) Another solution will be take running_sum of every field and then apply the operations. This should give right answer
3) If this does not will it possible to change the way you import the data?
a) Simply create another filed as Date_past = Date-1 in your raw data.
b) Duplicate your data.
c) join the two data sets on Date = Date_past
d) Now you have all the data of today's date and last day in one field and you can perform operations as you need

Macro that will copy only cells with data and paste in a different worksheet

I need create a macro that will copy cells that go from A2 to O2 in the worksheet DL and continue for a varrying amount of rows. (Depends on the month). I need this pasted in the worksheet Efficiency in rows A2 to O2.
Because every time I create the report the number of rows of data changes I'm running into issues with creating an effective macro.
Also, some of the rows don't have information in every column, but I still want the blank cells to be coppied in this case. Basically if there is data in column A I want the rest of the row to column O to be copied as well.
Do any of those suggestions help you out?
Also, I'm a bit confused of what are you referring to when you write "rows". A row has a number (1 to 1048576 in Office 2010 and up) and a column has a letter (A to XFD in Office 2010 and up). So what do you mean by "row A2 to O2"?
EDIT: Also, to copy from A to O every time, you simply set the range from A to O. For example Range("A2:O10") would include every cell from A2 to O10. Since you set the range with simple strings you can select the row numbers with the help of one of the suggestions in the link I gave you.