What formula can I use in Google Sheets to achieve this?
December 26, 2018
December 24, 2018
to
December 26, 2018
December 26, 2018
December 24, 2018
December 24, 2018
try like this:
=ARRAYFORMULA(TRANSPOSE(TEXT(TO_DATE(SPLIT(QUERY(REPT(
TO_TEXT(INDIRECT("A1:A"&COUNTA(A1:A))&"♠"), 2), , 999^99), "♠")), "mmmm dd, yyyy")))
Related
I'm trying to find a way to aggregate average values in a Google sheet in a pivot table using calculated fields.
Here's my data:
Close Date
Amount
March 2020
£60,000.00
April 2020
£15,000.00
April 2020
£90,000.00
April 2020
£220,000.00
April 2020
£50,000.00
May 2020
£100,000.00
May 2020
£440,000.00
May 2020
£15,999.00
May 2020
£85,000.00
May 2020
£500,000.00
June 2020
£270,000.00
June 2020
£210,000.00
July 2020
£60,000.00
July 2020
£35,000.00
July 2020
£75,000.00
By using the following calculated field, I can calculated each month's average:
=AVERAGEIFS(B2:B17,A2:A17,">="&Date,A2:A17,"<="&EOMONTH(Date,0))
Close Date
Average Result
March 2020
£60,000.00
April 2020
£93,750.00
May 2020
£228,000.00
June 2020
£240,000.00
July 2020
£56,666.67
However, what I want to do is cumulate the average values like so:
Close Date
Cumulated Average Result
March 2020
£60,000.00
April 2020
£153,750.00
May 2020
£381,750.00
June 2020
£621,750.00
July 2020
£678,416.67
I realise I could add an additional formula column in the sheet itself, but I'd much prefer to do this via a calculated field if possible.
Many Thanks
Since you have tagged both Excel and Sheets, the solution in Excel is to merely select to show the values of the Average column as a Running total (in the Value Field Settings tab).
cumulative running average:
=ARRAYFORMULA({UNIQUE(TEXT(FILTER(A1:A, A1:A<>""), "mmmm e")), MMULT(TRANSPOSE((
SEQUENCE( COUNTUNIQUE(TEXT(FILTER(A1:A, A1:A<>""), "e-m")))<=
SEQUENCE(1, COUNTUNIQUE(TEXT(FILTER(A1:A, A1:A<>""), "e-m"))))*
QUERY({TEXT(A1:A, "e-m"), B1:B},
"select avg(Col2) where Col2 is not null group by Col1 label avg(Col2)''")),
SEQUENCE( COUNTUNIQUE(TEXT(FILTER(A1:A, A1:A<>""), "e-m")), 1, 1, 0))})
I have a table that looks like this:
Year
Month
Customers
Country
2022
January
12
Argentina
2022
January
4
Australia
2022
January
6
Brazil
2021
December
8
Argentina
2021
December
4
Australia
2021
December
2
Brazil
2021
November
12
Argentina
2021
November
4
Australia
2021
November
14
Brazil
I want to consolidate the year and month columns, and transpose the rest of the data for a result that looks like this:
Year
Month
Argentina
Australia
Brazil
2022
January
12
4
6
2021
December
8
4
2
2021
November
12
4
14
Is there any way to do this in Google Sheets?
Try below QUERY() function.
=QUERY(A1:D10,"select A, B, min(C) group by A,B pivot D order by A DESC")
Use this formula
=QUERY(QUERY({A1:D}, " Select * Where Col1 is not null "),
"Select Col1, Col2, min(Col3) group by Col1,Col2 pivot Col4 order by Col1 Desc")
Trying to extract the date from the written string Thursday, Aug 25, 2022 2:00 PM-2:30 PM which should result in a date value of Thursday, Aug 25, 2022 2:00PM (or any date & time format).
Assuming the string is located in cell G2, I tried =TRIM(MID(G2,FIND(" ",G2),FIND(" ",G2,FIND(" ",G2)+1)-FIND(" ",G2))) and all I get is: Aug.
try:
=REGEXEXTRACT(A1, "\b[A-z]{3} \d+. \d+\b")
I'm trying to count all apples, oranges and mango of a specific month and year, but the formula doesn't work right now. Is there anything obvious that I'm doing wrong here?
=SUMPRODUCT(--(TEXT(A:A,"MMYYYY")="052020"), --(B:B={"apple","orange","mango"}))
Link to the sample sheet
Colum A Column B
May 2020 apple
May 2020 apple
May 2020 banana
May 2020 orange
May 2020 mango
Jun 2020 papaya
Jun 2020 mango
Aug 2020 apple
Oct 2020 apple
Oct 2020 orange
Oct 2020 banana
try:
=COUNTA(IFNA(QUERY(B7:C,
"select B
where month(B)+1 = 5
and year(B) = 2020
and C matches 'banana|mango|apple'"))
or:
=COUNTA(IFNA(FILTER(B7:B,
TEXT(B7:B, "mmyyyy")="052020",
REGEXMATCH(C7:C, "banana|mango|apple"))
I found it :)
=SUMPRODUCT( (TEXT(B9:B19,"MMYYYY")="052020")* ISNUMBER(MATCH(C9:C19,
{"apple","orange","mango"},0)))
I maintain a Google Sheets based release calendar for my website, where we publish new content 5 days a week (sometimes 4, sometimes 6 or 7).
In order to make viewing the release calendar easier for my team I go through and manually stripe every other week a different color. Starting with Monday, ending on Sunday. I'd like to create a formula which will do this for me, so that I can save a bit of time. Given the dates below I've indicated what color I'd like a row to be. Could someone tell me if this is possible, and if so provide some pointers as to how to accomplish it?
Mon, January 4, 2021 <-- light grey
Tue, January 5, 2021 <-- light grey
Wed, January 6, 2021 <-- light grey
Thu, January 7, 2021 <-- light grey
Fri, January 8, 2021 <-- light grey
Mon, January 11, 2021 <-- default color
Tue, January 12, 2021 <-- default color
Wed, January 13, 2021 <-- default color
Thu, January 14, 2021 <-- default color
Thu, January 14, 2021 <-- default color
Fri, January 15, 2021 <-- default color
Mon, January 18, 2021 <-- light grey
Tue, January 19, 2021 <-- light grey
Tue, January 19, 2021 <-- light grey
Wed, January 20, 2021 <-- light grey
Thu, January 21, 2021 <-- light grey
Fri, January 22, 2021 <-- light grey
Sat, January 23, 2021 <-- light grey
use in CF:
=ISEVEN(WEEKNUM(A1, 2))