How to drag formulas down every night at midnight? - google-apps-script

I know little to nothing about code so please bear with me. I am just wondering if it is possible to use google scripts to automatically pull down formulas every night at midnight so I don't have to. I have looked online and don't yet have the knowledge to adapt various ideas to my task. Here is what I need, as best I can describe at the moment:
In sheet (this sheet) start at cell C33 and go down until you identify the last value in that continuous range of data. This is equivalent to hitting control+downarrow. Then from that bottom-most cell, for instance, C191, identify the last value to the right (equivalent to hitting control+rightarrow). So now your range is C191:Z191. Once you have identified that range, drag it down. I am dragging down formulas and I want them to stay as formulas, not be pasted as values.
I just want it to run automatically every night at midnight if possible. That's it except for 1 pretty annoying exception. On the first day of the month still drag everything down as normally but do NOT drag down the second cell to the right (which would be in column E). So for instance, you would then drag down C191:D191 and F191:Z191
Sorry for basically asking for a complete answer, but I figured I may as well before spending however many weeks learning the requesit skills to understand and write this script.

Related

How can I automate a cells value changing in Google Sheets to change when the next sheet is altered?

I'm fed up of the misses complaining that I don't do enough around the house so I've decided to create a cleaning rota that fairly splits the chores. In order to keep on top of who does what chore each week I want the cells to automatically change once the next spreadsheet is edited. For example the check boxes will need to be unchecked and the person completing the chore will swop (one person does it one week then the other does it the week after).
Here's my sheet: https://docs.google.com/spreadsheets/d/1JOf383hTLH8Y3fmXCEdPCgKCfwDLBJabfXkP6MnIMkQ/edit?usp=sharing
I know that I will likely have to use some form of script but I need direction into how to do this and what script I would use.

How To Change The Row Height Based On Cell Value In Google Sheet?

I have a monitoring database that automates status in one column based on the latest input. Now, when the word "final" appear in the status cell, I manually adjust the row height to 15. Is it possible to set this automatically that when the word "final" appear in any cell of a column, the row height will adjust to 15 only?
Thank you in advance!
The only trigger that ever come close to that are onEdit and onChange and they don't respond to no user edits. So the only thing that remains are timebased triggers which would allow to poll which would require you to reread the data and compare it to what you already have and detect changes that way.
I seriously doubt that Google will ever unleash that kind of trigger power. They have too many users and I suspect triggers like that could bring their server to their knees pretty quickly. Especially with users working together with that specific goal in mind.

Scan COLUMN for key set of initials, get value of that ROW, then get CONTENTS of different CELLS

I have access to a review sheet, regarding the review of web content articles for blogs. I'm one of the reviewers.
Here's an image of the review sheet (I'm sorry, I haven't been granted access to embed images):
EXAMPLE REVIEW SHEET
I want to produce in invoice based on that review sheet. Here's the invoice:
EXAMPLE INVOICE
I understand how to create the link between the two separate spreadsheets, but what I need is this:
In the EXAMPLE REVIEW SHEET I need to look down COLUMN B (INITIALS) for the last instance only of initials 'MF' and make a note of the ROW
Then, I need to scan back up COLUMN B, for 3 more instances of MF, and make a note of the ROWS for all 3 instances.
I now have the last four instances of MF, and the ROWS they appear.
Now in my EXAMPLE INVOICE, I want to populate cells B19-22 with the contents of cells Aw Ax Ay and Az from the EXAMPLE REVIEW SHEET, where w, x, y and z are the 4 ROW NUMBERS that we got from the original LOOKUP.
Here's the link to the actual sheets (all on one spreadsheet for the examples)
ACTUAL SHEETS
For some other invoicing requirements, I found this line of code:
=index(B:B,max(row(B:B)*(B:B<>"")))
Which I know returns the lowest-positioned non-empty cell in a column. But I don't really understand WHY it returns it, I just know that it does. I'm sure some part of the INDEX function can help to return the values I need, but I don't know how.
I'm guessing that what I'm looking for is beyond the fx input on the spreadsheet, and requires a script to be run. Whereas I can sometimes make sense of some basic programming - and by that I mean ANSI 74 BASIC, which is where my knowledge stops - I can't really program using the script editor.
What I'd LOVE is if someone could help me, and also explain the logic behind the solution. I'll probably need it in layman's terms, but I'd really like to start understanding how to manipulate spreadsheets - so I'm really keen to find out HOW something like the INDEX code works, and what the variables mean.
I've tried to fathom the explanations given by Google but, TBH, their way of explaining seems to require that you understand their solution before they explain it to you. The examples are very hard to relate to the formulae, because the description of the variables is not 'human' enough.
If anyone fancies a stab at my problem, and could take the time to explain the logic behind the solution, please know that I'll be forever thankful!
Regards,
Miles
I think this formula will work for you, but unfortunately it's a bit more sophisticated than would make it easy to understand. I placed it in P19 on the Invoice tab.
There are a few different ways to solve your problem, but i wouldn't use INDEX() for any of them.
=ARRAYFORMULA(QUERY({'EXAMPLE REVIEW SHEET'!A2:B,ROW('EXAMPLE REVIEW SHEET'!A2:B)},"select Col1 where Col2='MF' order by Col3 limit 4"))
If you were willing to have a numbering column to the left of the table in the "Review Sheet" it would make all of this much simpler and I could show you how to do it in a way that might make a bit more sense.
Thanks for answering so quickly!
The REVIEW SHEET is maintained by somebody else, but I have editing rights as I need to fill in my review comments. I was planning to keep a linked copy of REVIEW SHEET as a tab in my Work Spreadsheet. If I do this, then there's no problem with adding a numbering column, or any extra columns that you think will help.
Thanks again
Miles

How do I use VLOOKUP to fill out an hourly calendar schedule?

Rather than typing out the function I am dealing with since it is rather long and arbitrary without the columns it is referencing, I have provided a simplified mock-up of my spreadsheet here. Be sure to make a copy of it and not edit the original directly. If I need to remove this link, I will.
Essentially, I am trying to take a schedule that another party has already created and display it in an hourly calendar view according to the VLOOKUP search key. In my example linked above, I have created a classroom schedule in the Master Schedule tab that includes the room(s), subject, teacher(s), and start and end times, as well as the date. I have rooms scheduled for the current day, as well as the day before since some of the end times from the previous day go past midnight, and therefore I would like to include them in the calendar view for the current day if they run into the early morning. In that same tab, I have a VLOOKUP formula with the room number as the search key. The reason the formula is so long is because I have to account for if there are multiple rooms separated by a comma "," or forward slash "/", and it was drawn from an solution offered to another Stack Overflow question of mine. It gets the job done, but if there is a method that is not as convoluted, I'm all ears.
I would like to translate the data in the Master Schedule tab into the calendar view in the Room Schedule tab. I thought I had it worked out logically with a few IF statements, but I have struggled mightily. I realize open-ended questions like these aren't always appreciated on this platform, yet I am at a loss for how to accomplish what I am going for, especially without having the formulas take a long time to populate the calendar any time there is an update to the master schedule, so any help or a nudge in the right direction is greatly appreciated. I'm happy to clarify anything if the spreadsheet I linked or my objective is not clear.
paste in C2 cell and dra down and then to the right:
=IFERROR(FILTER('Master Schedule'!$F$2:$F&CHAR(10)&'Master Schedule'!$D$2:$D,
REGEXMATCH('Master Schedule'!$E$2:$E, "^"&$A2&"$"),
HOUR('Master Schedule'!$B$2:$B)<=HOUR(INDEX(SPLIT(C$1, "-"), 1, 1)),
HOUR('Master Schedule'!$C$2:$C)>=HOUR(INDEX(SPLIT(C$1, "-"), 1, 1)),
'Master Schedule'!$A$2:$A=TODAY()))
note: if this would be turned into one-cell arrayformula the performance of the sheet would suffer a lot hence this per-cell solution

Is there a way to make a Google sheets cell display multiple hyperlinks (one per line in the tooltip) when selected?

I develop this spreadsheet here:
https://docs.google.com/spreadsheets/d/1ye_HTjC_jrExwMDPM2X1mtXhSDQOtjg841SzBno0ExU/
Essentially, someone hosts a period of multiple tournaments corresponding to various timeslots throughout the week, and they post a final round replay (URL) of each tournament in one cell: Column G in the 'Chronology' sheet. So every cell in Column G, contains a list of replays, e.g. http://a, http://b, http://c (if there were 3 tournaments).
One day, less than a month ago, I was pleasantly surprised to discover a hyperlink of each replay appeared on each line in the tooltip when I selected the latest replay cell. I got really excited, and decided to trigger it for cells (I think I spammed the return key). I assumed the way to trigger would stay, but it seems to me it's now been altered so it won't result in multiple hyperlinks being displayed in the tooltip.
You can see a good use of it in Row 988 (984th edition), but it's gone by Row 991 (987th edition).
So my question is, is there a way to code this in the script editor or a way to still trigger this in the spreadsheet itself?