Google Sheets Calculate ROI in days - google-sheets

im trying to calculate the ROI in days for a specific case.
I start an investment amount with value X and every day i get different profits. All this separate profits get added everyday until the amount of the investment X is reached. The output should be the amount of sums which are equivalent to the days -> ROI in days
i googled already a bit but its very confusing for me.
do i need SUMIF or MATCH-function?
this seemed promising but it didnt work for me :(
https://www.extendoffice.com/documents/excel/3865-excel-count-cells-until-value-is-reached.html
maybe the syntax in google sheets is slightly different? i dont know :(
hope someone can help me out with this. it cant be that difficult

Related

Is there a simple way to look up, sum and subtract values from different entries?

Good day everyone,
I hope you're all doing great. I want to say that I am a novice in terms of excel and sheets formulas.
I have a similar table to this in google sheets. I am focusing on 3 things, the duration of the entire shift, the break duration and the lunch duration. The break and lunch duration need to be converted to minutes or use the duration in seconds column.
I need to sum both break and lunch times per agent and subtract that total by the duration of the whole shift.
I have been throwing myself at this for longer than I would like to accept. I've been looking for formulas that could help but I haven't really found much. I got to create a helper column joining both the name and the codes together to determine which code is from which agent, but that's as far as I got.
I've also tried some INDEX(MATCH, MATCH) but nothing really comes as expected. Also tried using ARRAYFORMULA but I don't know if that'll help. Any assistance with this would be much appreciated as I really want to get to the bottom of this. I feel as though this is difficult for a novice or I am just complicating things with such a simple solution being available.
Thanks again for the assistance.
Firstof all, complete the names in each row with, in G1
={"name";ArrayFormula(lookup(row(A2:A),row(A2:A)/if(A2:A<>"",1,0),A2:A))}
then work with pivot table.

Sum durations if they meet a criteria? (Google sheets)

I'm trying to create a dynamic dashboard for staff to track the total amount of time they've worked for our program. They fill out a form with start/end time and denote if it's work that's eligible for our program to pay them for it. I'm building a dashboard where they can see how many extended hours they've racked up over the course of the school year because we have limits on how many hours they can earn.
I'm including an editable
copy of my spreadsheet to show what I've got so far... I'd like to add up any durations in column E that have a "Yes" in Column F (which is all of them at the moment) and have that sum sit in cell C5. But all I can get it to do is sum up to zero, and I can visibly see that it should be more than zero. I've tried changing the format of the cell(s) too, but it's still zero.
Any help or ideas are greatly appreciated! And I'm always trying to learn and improve, so if you know how to do this and don't mind explaining to me how the solution works, I'd also really appreciate that so that I can keep getting better at Sheets. :)
Thanks in advance!
This is because the numbers in column J (in Data sheet) are stored as text. Either enter them instantly as numbers or use the helper column where they are converted by the formula e.g. =VALUE(J1)
Played around with it enough that I got it finally!
=SUM(ARRAYFORMULA(if(C8:C="Yes",E8:E-D8:D,0)))
Thanks for helping me troubleshoot and think it through!

Average of cell content based on day of month

I'm attempting to get an average number of calls/day based on yesterday's date.
My initial formula looks like this: =round(average(C24/3),2), where:
C24 = the total number of calls,
/3 = diving the contents of C24 by yesterday (assuming yesterday was the 3rd of the month),
,2 = rounding answer to 2 decimal places.
The formula itself works fine, but I have to go in daily to change the 'date' (/3, in my example).
Any suggestions as to how I can automate this formula so as to not have to go in to change the day of the month every day?
(for what it's worth, i tried using =round(average(C24/today()),2), but get a divide by zero error. Not sure what else to try. I also googled rolling averages/moving averages, but that didn't seem to help either.)
Use DAY and TODAY.
=DAY(TODAY()-1)
So
=ROUND(AVERAGE(C24/DAY(TODAY()-1)),2)

Sum Time (hh:mm) in MS Access Using SQL

Good Evening Everyone,
First, thank you to everyone who has taken the time to answer my questions. Your help has been amazing!!!
I have run into another issue to which I cannot find an answer. I need to sum the total hours that employees work in hh:mm. For the sake of clarity, I need to have a result that is not a decimal, but an exact sum expressed in hh:mm such as 3:43. Below is the table and query that I am using.
How do I get Access to return the needed format? Can someone point me in the correct direction, please?

Google Spreadsheets: Sum over multiple criteria constrained by timeframe

Hello Everyone (this is all in Google Spreadsheets),
I'm trying to make a report where I have to sum the product of the number of Apples and Bananas bought respectively within a certain time frame by different people. The price of the goods differs, depending on who is buying them. The people who buy it do so at different times and purchase a different number of items. The formula should be extendable to include additional people in the future.
For details see this Google Spreadsheet.
I would like to get the calculation without needing steps in-between. If it makes any difference, the number of items bought on specific dates are actually in different worksheets, so they're not on the same page as in the example. I named the ranges accordingly (even though I believe/hope it makes little difference in terms of what formula to use).
Finally, if it were possible to use one formula for the total expenditures, instead of the sum over the cells above that would be grand.
I use the DATEVALUE, because otherwise I wouldn't be able to find the first and the last date of the calendar weeks. There is a dedicated DATEVALUE column in every worksheet. (Additionally, I don't have to deal with the intricacies of the date format, which gets me every time.)
I hope I didn't miss an answer to my problem and provided enough information. I can't get my head around it, I am really looking forward to your answers.
Thank you everyone :)
Greg
P.S. A picture of the sheet, if required: Apples, Bananas & €
Credit to Sennsei from the Google Docs Help Forum (Link). I quote:
I won't be surprised if this isn't the best way to go about this, but regardless, here's my take on solving your problem. Result is based on this modified worksheet.
Apples:
=IFERROR(SUM(ARRAYFORMULA(ARRAYFORMULA(VLOOKUP(FILTER('Prices/Amounts'!$J$4:$J,'Prices/Amounts'!$K$4:$K>=B4,'Prices/Amounts'!$K$4:$K<=B5),FILTER('Prices/Amounts'!$J$4:$L,'Prices/Amounts'!$K$4:$K>=B4,'Prices/Amounts'!$K$4:$K<=B5),3,0))*ARRAYFORMULA(VLOOKUP(FILTER('Prices/Amounts'!$J$4:$J,'Prices/Amounts'!$K$4:$K>=B4,'Prices/Amounts'!$K$4:$K<=B5), 'Prices/Amounts'!$B$3:$D,3,0)))),0)
Bananas:
=IFERROR(SUM(ARRAYFORMULA(ARRAYFORMULA(VLOOKUP(FILTER('Prices/Amounts'!$F$4:$F,'Prices/Amounts'!$G$4:$G>=B4,'Prices/Amounts'!$G$4:$G<=B5),FILTER('Prices/Amounts'!$F$4:$H,'Prices/Amounts'!$G$4:$G>=B4,'Prices/Amounts'!$G$4:$G<=B5),3,0))*ARRAYFORMULA(VLOOKUP(FILTER('Prices/Amounts'!$F$4:$F,'Prices/Amounts'!$G$4:$G>=B4,'Prices/Amounts'!$G$4:$G<=B5), 'Prices/Amounts'!$B$3:$D,2,0)))),0)
Expenditure:
=B7+B8
The B4's and B5's refer to the date constraints. Since the formulae contain $ signs to ensure the cells stay the same, the formula can be dragged across to apply to other weeks without having to touch the formulae. As a plus side, these formulae allows a sheet to be infinitely expandable!
Sennsei

Resources