Creating a totals page for timesheet - google-sheets

I have a spreadsheet that we use as a Time sheet.
It's made up of approx 80 tabs (Names of employees)
We have a front page, simply called "Totals"
This adds up a fortnights worth of hours into several Columns
When we make changes, we have several scripts to help make life easier
(Delete old sheets, duplicate master sheet, rename duplicate sheets, protect ranges etc...)
One script that we don't have though is one to create the totals page faster.
Our totals page has the name of every employee in column A,
We use these names in our scripts to rename tabs etc...
I would like a script to link the calculations on the Totals Page, to the sheet and cell of every individuals tab.
We do this by manually by entering =nameoftab!C47 in the cells of the totals page.
What i want to do is =Totals!A3 C47
So the cell pulls the sheet name from the name list on the left hand side, and points to C47 in the appropriate tab.
This would allow us to add new people to our time sheet by simply adding their name to column A and not the formulas for ordinary time/overtime/travel time/allowances etc...
Can this be done?
I have played with several formulas/scripts to make this easier but to no avail
(Please let me know if you need me to be more specific)

Try this simple formula:
=indirect("'nameoftab'!C47")
or in your case:
=indirect("'" & Totals!A3 & "'!C47")
where Totals!A3 is cell with sheet name.

Related

How to link 3 columns together in Google sheets

I have 3 columns in a Google sheets tab.
Two of the columns are fed into from another tab (Sheet1) by the formulas =Sheet1!A2:A and =Sheet1!B2:B.
I am facing a problem when the 2 columns from sheet1 are sorted, the third column from sheet2 does not stay aligned with the other two and throws off my entire sheet's analysis. Is there a way to link the 3 columns together so when I sort from sheet1, all 3 columns from sheet2 are sorted and not just the first 2 that are being fed into from sheet1?
The short answer is that you can't. Sheets is not a relational database in which rows between sheets will remain linked.
What you can do is to work everything in a Master sheet so everything is sort together, or continue with your system but never "really" sorting your Sheet1. Instead, in any of both cases, you can use Filter Views. Filter views affect the way each user sees the information without altering the other users' views. That way you could just hide columns in Filter View in a single Master Sheet and everyone works in just one sheet; or "sort" the Master Sheet only when you're inside the Filter View, so the connected data always remain in the same rows.
I suggest you consider this possibility. Other ways are via scripts, which could be a headache by implementing it, always syncing and checking every kind of modification, sorting issue and more. Hope it's useful! There are many tutorials and documentation online; here you have just one as example

Alternative to "ArrayFormula" in GoogleSheets

I have been trying to create a production scheduler in google sheets.
Each tab is for a different department to fill out.
Ideally, one person enters the Order summary in the first tab. The next tab gets updated and someone else fills in the relevant details and it goes to the final tab.
Is there a way to automatically add rows to other tabs while having the ability to sort?
I have been using =arrayformula() initially but I realise the if I try sorting in other tabs, it messes up that sheet. I also tried =sheet1!A1, but I want to restrict as much input by other members.
sort it by formula. example:
=ARRAYFORMULA(SORT(A2:C; 2; (D1="asc")*1))
where D1 is a dropdown with asc,desc and we sort the whole array via B (2nd) column

How to get sum/difference From a different sheet using dates as reference?

Collections Sheet
Expenses Sheet
Hi, I would like to get the daily sum/difference of the expenses from the expenses sheet then output to collections sheet using dates as reference/identifier.
I tried this code =MINUS(C8,INDEX(Expenses!20:31,12,2)) but I want it to auto compute when I drag the box. sorry for bad english. thank you
Desired output:
Desired Output
Output at (Net) Cash On Hand Row / Reference Date Column, the output should be August 1 Collection - August 1 Expenses.
The main issue is with the structure of your expense sheet, since you need to use only every second column. For this you can use various methods, something like
=split(substitute(join(";",Expenses!A2:DJ2),"Total:;",""),";")
The join function takes the whole row and joins it into one string, the substitute function removes the Total: from it, along with the trailing ; and the split function separates it again to separate values. This will be an array, automatically spread out to 31(-ish) columns width if entered into a cell like C10 on your Collections sheet.
Then you have two options, simply do =C8-C10 in C9, which you can drag with no problem. You can also hide the row 10 by making the text color white, or even integrate it in that sheet.
My recommendation however is not to do any of that, instead enter the formula
=arrayformula(C8:AG8 - split(substitute(join(";",Expenses!A2:DJ2),"Total:;",""),";")
into C9 on the Collections sheet and it's taken care of, without the need to drag it out. You might need to tweak it, not sure if the AG8 and DJ2 are the correct columns to end them on (should be the last column if every column or every 2 columns is a day). The arrayformula makes sure that the subtractions are done automatically for each pair of values, and expanded automatically into the row. Make sure that there are no values or formulas in D9:AG9, so it can fill up the values automatically and you don't get a #REF error.

Can a single Google Sheets filter view show OR conditions in multiple columns simultaneously?

I am trying to make a spreadsheet for my teachers that will assign them particular students to call each day based on how many periods they are absent during the day. I currently have a hyperlink set up on the Dashboard page so teachers can click their names and see a filter view of which calls they need to make for 8/24. Is it possible to make a single filter view that would simultaneously show where their name is assigned for 8/24 in Column H AND where their name is assigned for 8/25 in Column O? My goal is for them to click a single hyperlink on the Dashboard which takes them to all the calls they need to make for the week WITHOUT me having to make five separate links for each day of the week.
Solution
You should extend the Filter View range to cover the other columns you need to filter.
In this case for the "Amber" Filter View, you should have Range: A1:P116. Then select the proper filter on the column H and O: Filter by Values: Amber.
With the filter view still open, copy the URL in your browser and paste it in the HYPERLINK formula you have in the "Dashboard" Sheet.

Using text from a cell in a formula in Google Sheets

I would like to use the text from a cell in a formula in Google Sheets.
I have a document with multiple sheets that a variety of people can edit with a H,M,L (high, medium, low) value from a drop-down list. Each person has their own tab in the Google Sheet.
I then have a dashboard that populates based on their choices of H,M,L. I know that I can use the formula =('Jay Delacruz'!C6) for example to populate a cell in another sheet by manually selecting the cells on the other sheet.
However, I am looking to make quite a few of these documents automatically with another Google Script that I am running that creates the individual sheets from a roster of names on the first tab.
My question is, is it possible to have a =('Jay Delacruz'!C6) type formula that instead of the sheet reference it can pull the name of the person from the roster, as this will match exactly the sheets that are automatically generated by the script I have running.
So I would essentially have a pre-populated dashboard of formulae that would become valid once the sheets are created with the names, as created by the other script.
If it makes it a little clearer, there is a link below to make a copy of the Sheet I am working with. All names were randomly generated, so don't reference any real people or data.
https://docs.google.com/spreadsheets/d/1NiXqko8SibD6VsfrnFcj7e7c99Hg-RoSlHVAYWb0E94/copy
Thank you in advance!
Liam
Try
=INDIRECT(C1&"!C6")
Also see here for more info on INDIRECT() function.

Resources