Start Date Calculation in google sheets - google-sheets

Recently Google analytics became available as an add on for google sheets.
It is fairly intuitive however I need a way to auto calculate the start date of a month starting with todays date eg today is the 11/02/15 so I would like it to return the 01/02/15 utilising the available date functions.
My purpose is to run a report for this months data only which can be updated as the month continues. In the next month it would need to start again.
I have an absolute fix but this is not scalable, If you have a function based solution please help.

=eomonth(today(),-1)+1
is a formula that takes the date for today, finds the end of the preceeding month and then adds one day.

Related

How do I find a finish time by using a start time and hours per day in google sheets/ excell?

I am trying to create rosters on google sheets but the only information I get is a start time and the hours worked that day, example: 7am, 2.36h worked, is there a formula I can use to calculate the finish time from these?
I know I can convert the 2.63h to minutes in a separate column and then use
=TIME(HOUR(D2),MINUTE(D2)+P2,SECOND(D2))
but I want to cut out the extra column.
try:
=D2+TEXT(P2/1440*60, "hh:mm")

Select Firebase database on today date and month range

Hello. I am working on Ionic and Firebase as backend. I want to list items based on current date and also based on date range (upto a month, 3 months etc). Additionally, I also want to generate 'Total' of incomeAmount on that specific date as well as total quantity of items added on the same day.
I tried using firebase query but I am unable to retrieve the data as per the specific date range
Any help shall be super awesome!
Finally solved it by using Moment. changed the date format to moment().format('YYYY-MM-DD') and saved the data on firebase under that date. Further looping with forEach to get the total
Hope it helps someone else too

Add numbers in Column B based and on Day of the Week in Column A and display highest/lowest resulting Day

I have a sheet that lists every day of the year and is updated on a daily basis. Next to each day is a percentage. I would like to display the day of the week that has the highest (and lowest) percentage when adding all relative days throughout the year. (i.e.: all Thursdays)
I am using this formula, which only partially works. It displays the day of the week, but seems to only reference the latest occurrence instead of all in Column A.
B2:
=iferror(INDEX($A4:$A,MATCH(MAX(B4:B),B4:B,0)),"")
B3:
=iferror(INDEX($A4:$A,MATCH(MIN(B4:B),B4:B,0)),"")
Link to a sample book: https://docs.google.com/spreadsheets/d/1_LP5MmmgW3i0zM6ziud9YrWfH5SvuHFbZH3OmRj9W6E/edit#gid=0
I hope this is enough information to understand what I am hoping to accomplish.. Is this possible in Google Sheets?
If I can get this to work my second goal would be to show the highest/lowest for the current month (or a specific month) in addition to the whole year.
Thanks!
Take a look at the shared spreadsheet and see if it does what you want.
https://docs.google.com/spreadsheets/d/1LL4Mgn_IWa-8W6Q0TythdMhBieVFt8ZiKI_UeO9ciTI/edit?usp=sharing
Added col L,O,R,and U for numeric day of week, current month,
current year, and month number. You can hide these columns.
I added some data for testing.

How to calculate average calls "timestamps" per day on Google Sheets

I need help calculating the average number of calls I receive per day on Google Sheets. I can use your help.
Specifically, I want to calculate average calls per day [count: timestamps] for weekdays and weekends, respectively.
Here is the link to the Google Sheet: https://docs.google.com/spreadsheets/d/1UnHxSuQeFcKWIYrZxHrKQFJQ0TNekNAGrlvY-CyfYdU/edit?usp=sharing
I have found several links that come close to the solution but nothing that solves it, e.g. http://yogi--anand-consulting.blogspot.com/2013/05/yogifrom-timestamp-column-compute.html
Thank you in advance!
The question has not been asked very well, it important to show your attempts and specifically what you're look for. But none the less:
Create a separate column in call sheet E:E with the formula =weekday(a1) this will convert your date into a day of week number (1 through 7). From that, use sum if =SUMIF(F:F,"<=5") for your weekday, and=SUMIF(F:F,">=6")` for weekwend

Calculating days to next birthday in Google Spreadsheet

I have the date of birth of a person and want to calculate the days until his/her next birthday. How to do this in a way to deal with leapyears and other "odd" things?
Using google spreadsheet internal functions:
=IF(DATE(YEAR(TODAY()),MONTH(A2),DAY(A2))>TODAY(),
DATE(YEAR(TODAY()),MONTH(A2),DAY(A2)),
DATE(YEAR(TODAY())+1,MONTH(A2),DAY(A2)))
-TODAY()
where A2 is the cell with the birthday of the person.
The IF at the beginning is for testing if the next birthday is this year or next year.
A slightly shorter neater version using pure sheets functions is:
=DATE(YEAR(A2)+DATEDIF(A2,TODAY(),"y")+1,MONTH(A2),DAY(A2))-TODAY()
This simpler, and uses the DATEDIF(...,"y") to get complete years that have passed and adds one, rather than needing an If around the entire calculation.
Having figured this out working on the problem myself, I then came across the same solution on this site, which includes some more explanation.
following the nice and short version that Jon Egerton posted, here is a small change that returns 0 when the birthday is on the current day (instead of returning 365), and also handles future dates
=DATE(YEAR(A2)+IF(A2<TODAY(),DATEDIF(A2+1,TODAY(),"y")+1,-DATEDIF(TODAY(),A2,"y")),MONTH(A2),DAY(A2))-TODAY()
I found that using WolframAlpha for calculating the days is the most "simple" way to do it. Use the following code:
REGEXEXTRACT(JOIN("";ImportXML(JOIN("";"http://www.wolframalpha.com/input/?i=birthday+";YEAR(A2);"-";MONTH(A2);"-";DAY(A2);"&asynchronous=false&equal=Submit"); "//script")); "(\d+) days until next")
Where A2 is the cell with the birthday of the person.

Resources