Google Sheets - Sum of every nth row displayed in the adjacent column - google-sheets

I am making a spreadsheet to manage my spending on food at work. At the moment, I am getting the total of every week in the last column, but I would also like to total the spending for the month, something like this, but neater and so I can just drag down the rows instead of manually type it every 4 rows.
Thanks for the help!

This is easy to manage - its all a question of which cell(s) you choose to select and drag. Don't just click and drag the cell with the formula; select the three blank cells as well - then drag four cells down the column. This will give a formula in every fourth row.
The SUM formula calculates the costs for the first 4 week period. All Good.
Now, if you select this cell and simply drag it down, then every cell will get a copy of that formula. not good.
But... if you select the first four rows of the first month (including the blank weeks 1, 2 and 3). Like this
and then drag all four cells down the column, then only every fourth cell will have a formula and the preceding three cells will be blank.

Related

How can I fix the range of a Google Sheet MATCH function when using a move rows apps script?

I have a Google Sheet with a script to move rows at a set interval. The last row is moved to the top and all consecutive rows move down one, thus creating a loop. This sheet feeds a dynamic gallery of 10 stores which appear in consecutive blocks, managed by left and right arrows. Each block has a button which takes the value of the particular store of the block being viewed.
I want to register the row a store is on when this button is clicked so, in order to identify it, I have placed a MATCH function in a cell of each row with a formula like this: =MATCH("Store 10",B2:B11,0). All's fine up to this point however, when the row moves, the range also shifts. For example, when Store 10 moves from the last row to the first, the above formula changes to =MATCH("Store 10",B3:B11,0). This obviously renders the whole idea useless since Store 10, which now resides in the first row (B2), is not even found, since B2 is not included in the formula's range anymore!
Is there a fix to this or a better way to achieve my goal?
Try this in G1
={"title of column";arrayformula(MATCH(offset(B1,1,,10),offset(B1,1,,10),0))}

Automatic calculation of cells

I have a Zap running on Zapier that is adding a new row/value to a Google Sheet every hour. I then want to automatically calculate the increase in value between the new row and the previous row. At the moment I have to keep dragging down the formula as new rows are added. Is there a way I can automate this process?
all you need is an array formula:
=ARRAYFORMULA(IF(LEN(B2:B), B2:B-B1:B, ))
If I've understood your question properly you want the same formula (relative to the cells to its left) but have it where you don't have to add the formula every hour?
Can you not just drag down the formula (using the bottom right of the cell) a couple hundred cells? The formula will stay there and replicate the cells relative).
Edit: You can click on the cell which currently has the formula (in your case cell J3). ctrl + C to copy this.
Click on the letter J (to highlight the whole column)
Ctrl + V to paste - this will then paste the formula to the whole column indefinitely.

google sheet Networkday.intl

I am currently looking for the number of working days deducting the holidays and the weekends. I'm using this formula right now.
=NETWORKDAYS.INTL(E2,F2,1,Holidays!A1:A19)
putting the list of holidays on another sheet. It worked on the first cell,I enter the formula. However the numbers on the holidays range keeps on increasing, When I copy and paste into the next cell.
=NETWORKDAYS.INTL(E3,F3,1,Holidays!A2:A20)
This is for the 2nd cell and for the 3rd cell,
=NETWORKDAYS.INTL(E4,F4,1,Holidays!A3:A21)
I would like to ask if there is anything that I can do, When pasting the formula on each cell without moving the Holiday range. I tried entering the formula one by one and it worked. But, I am looking for an easier way for future use. Thanks a lot in advance.
To lock a range use $
=NETWORKDAYS.INTL(E2,F2,1,Holidays!A$1:A$19)
This will lock the rows. So if you drag fill down or copy paste down 1 and 19 won't change. But if you drag fill to the right,A will become B and so on.
To make a full lock, use $ on both columns and rows.
=NETWORKDAYS.INTL(E2,F2,1,Holidays!$A$1:$A$19)

Google Sheets, simple adding sequence

As shown below, I have week one starting on July 18, and I want to then fill in every week from then on, but I don't want to have to keep manually typing and filling after week three.
I know there must be a simple formula to fill in a number and then '+1' for the row below it.
Not sure what you are needing to manually type... You should only need the first two rows of the third column, then you can autofill the rest.
The second row here shows the formula of the cells below it

Excel: How to auto-populate cell with data using static column with a row dependent on another cell?

I've got an spreadsheet with hundreds of problems listed out that map to a smaller number of solutions. I want to use this data to generate a drop down that selects the problem from a data range, and then next to it, another cell that populates the solution from one row over.
Example:
Column A Column B
Issue 1 Solution 1
Issue 2 Solution 4
Issue 3 Solution 5
Issue 4 Solution 1
Issue 5 Solution 1
Issue 6 Solution 3
Issue 7 Solution 2
If I want to create two cells where the first one is a drop down list (A1:A7), how can I make the second cell populate using a static column (B), but with a dynamic row number based off the first cell. So if someone chooses Issue 6 from the dropdown (A6) the second cell will know to populate Solution 3 (B6)?
Thnaks
To do this, you need two steps:
1) For the first cell where you'll have the dropdown option, click on Data Validation command (under the Data ) In the Settings menu in the dialogue box, click on "list" and set the Source to the Column A cells (without the header). This will make these the options in the drop down menu
2) For the second cell where you'll have the solution automatically change depending on the first cell, you'll need to use the vlookup function. The syntax looks like this: VLOOKUP(lookup_value,table_array,col_index_num,range_lookup)
In this case, the lookup_value will be the first cell, the table array will be your original table (without the headers), the col_index_num will be 2 (which means it will take the answer from the second column), and range_lookup will be FALSE (which means it will look for an exact match)
If you want more information about either one of these steps, here's the official help sections for Excel 2010: Create a drop down link , Vlookup

Resources