group by a date range in google spreadsheet - google-sheets

I'm making a sheet in google Spreadsheet and I'd like some help with you. I want to group some values based on a date range (from 25/12/2015 to 25/01/2015, for example). The interval will be always from 25 of one month to 25 of the another. Is there anyway I could do this automatically? I already did it grouping by month, but could't in a date range.
This is an example sheet I'm working:
https://docs.google.com/spreadsheets/d/1jFEAalIo378Q3DVZ4aJKGCADy3dzjs8nJr5fm55eNvg/pubhtml
Tks!
Rafael.

This spreadsheet groups data by date range:
https://docs.google.com/spreadsheets/d/1SriUMoTOEHnyFDdG3DJHrzBZzLntShgeaGTQDhKTrfI/edit?usp=sharing
Just a simple filter command:
=FILTER(A2:B, B2:B>=E$1, B2:B<=E$2)
A2:B = the data
B2:B = the date column
E1 = the begin date
E2 = the end date
It looks like you are doing one long formula in your spreadsheet. I would suggest breaking it up into smaller pieces (at least for testing), if possible.

Related

Need Google Sheets formula for Number of Days with AND without end dates

I need a google sheet formula to calculate number of days on the market with my start date but my secondary cell data either has a end date assigned (no issue there) and others with no date (meaning this should default to current date). The issue I have is sheets doesn't recognize cells without an end date and I would like Sheets to recognize no cell data as current date so I get the number of current days until I enter a true end date. Please advise how to configure a simple date formula rule if possible.
I've tried =C1-D1 formula where C1 is start date and D1 is end date. This works fine for cells with end dates entered. The formula however doesn't work if I have yet to apply an end date (empty cell) and would like Sheets to recognize this empty cell as current date. In other words 0 = current date
Something like this?
=IF(D1="",TODAY(),D1)-C1

Google Sheets - How to Extract dates list in new column from start date and end date

i need to extract dates (for each day) between 2 dates (start & end) in new column in google sheet.
The data is:
The result should be like this:
i now that it can be done with EXCEL + POWER QUERY
with google sheets i did not find anything
i will be glad if someone will help with that.
Thanks.
Depending on your locale settings, try:
=arrayformula({A1:C1,"DAY";split(query(flatten(array_constrain(if(split(rept(10,C2:C-B2:B+1),0)=1,A2:A&char(9999)&B2:B&char(9999)&C2:C&char(9999)&B2:B+transpose(row(A:A))-1&char(9999),),counta(B2:B),max(C2:C-B2:B)+1)),"where Col1 is not null",0),char(9999))})

Google Sheets date calculation

Is there a way to take a date in one row and auto calculate another date in another column 10 days out?
ex: (column a) 12/11/20 -auto calculate the date 10 days from then
and put in (column d) 12/21/20.
So anytime I enter a date and need the 10 day out date it just auto calculates so I don't have to keep entering the date over and over again.
This is possible by using ARRAYFORMULA().
ARRAYFORMULA enables the display of values returned from an array formula into multiple rows and/or columns and the use of non-array functions with arrays.
Try this: =Arrayformula(TO_DATE(IF(A1:A="","", A1:A+10))).
Example:
Reference
Arrayformula()

Google Sheets - Add range of dates based on string

Is it possible in Google sheets to have a formula which looks at a certain date and creates a range of dates based on it?
I have this google sheet:
https://drive.google.com/open?id=1ccLwh_ExEtE2zxYUor9hxi1hMyADQtuUgyCyOKASxIk
Is it possible to have formulas in the left column rows to just look at the date string "august" and automatically fill in the dates down each row? Preferably with this format I have in this sheet? Like:
monday
1
Tuesday
2
Wednesday
3
I know it's possible to format a date so it ways monday 1 e.g, but for some reason, google sheets doesn't text wrap dates and I want a line break between the day and number, if possible.
Any help truly appreciated!
Since tagged [excel-formula]:
=TEXT(WEEKDAY(DATEVALUE(1&"August"&2016)+ROW()-1),"dddd")&CHAR(10)&ROW()
in Row1 and copied down to suit should work. (For just Google Sheets this Q probably belongs on Web Applications.)
The month selection is hard-coded into the formula but could be parameterized.

How to split datestamp in Google Sheets

I have a datestamp in this format on A2:
18.11.2015 15:37:13
How can I split this into date and time so that I have date in A3 and time in A4?
I want to do this because datestamp does not sort properly as a number.
I found several answers to this question with various answers but none of them worked for me.
Wouldn't a simple split() be enough ? In B2:
=split(A2, " ")
Alternatively, in B2:
={INT(A2), timevalue(A2)}
Make sure to format col B as DATE and col C as TIME and see if that works?
To get the date and time in those cells you can do the following:
A3: =DATE(MID(A2,7,4),MID(A2,4,2),LEFT(A2,2))
A4: =TIMEVALUE(RIGHT(A2,8))
It's essentially extracting the essential parts for year/month/day from the string in A2 to get the needed order for date. The time is already properly formatted and can be used with Timevalue, we just need to extract the substring.
The date and time values can then be formatted in any way you want them.

Resources