Unable to use TO_DATE with multiple columns merging in Google Sheets - google-sheets

Prior question:
ArrayFormula displays dates improperly. How can I fix this?
Modified formula:
=ArrayFormula(TO_DATE(trim('Form Responses 1'!AG2:AG&" "&'Form Responses 1'!AH2:AH)))
The solution doesn't work when there are multiple columns merging. Any idea how to make this work?

=ARRAYFORMULA(TRIM(IF('Form Responses 1'!AG2:AG=0,"",TEXT('Form Responses 1'!AG2:AG,"mm/dd/yyyy HH:MM "))&'Form Responses 1'!AH2:AH))
Adjust the date time format as you like (check help on TEXT function)

Related

Trying to get this spreadsheet to highlight cells based on todays date

So, I'm looking for a way to make the cell(s) highlight themselves based on todays date, nothing too fancy just so it's simpler to see the day. Pictured below is the graph I currently have.
What I've got
I know it'd be easier for the formula if I were to just format the date as mm/dd/yy or some form of that, but it works better visually for the purpose of the form if it is done this way. So is there a way I could make it work how it is now? If not then what would be best with the formatting done in a mm/dd/yy format? Thank you in advance :)
Use this custom CF formula rule-
=AND(A1=DAY(TODAY()),A$2=TEXT(TODAY(),"MMMM"))
try on range A2:Z:
=A$2&A3=TEXT(TODAY(); "mmmmd")

Formula parse error with AVERAGEIFS in Google Sheets

I want to calculate averages in a column but only on selected rows, depending on specific values in another column. I see that I should probably use AVERAGEIF or AVERAGEIFS, but somehow it does not work, not even if I copy and paste the example from Google's help. I did experience the same in multiple browsers and with both versions of the function. What can be the problem?
Do you need to adjust the formula for your locale?
=AVERAGEIFS(A1:A10;B1:B10;">20")

Dates standardization in Google sheets using formulas

I have some raw data coming from a system. the issue is that system exports the dates using the US formating to be as M/D/YYYY meanwhile all my sheets using dates as DD/MM/YYYY or D/M/YYYY. i tried using this formula
=text(TO_DATE(DATEVALUE('Row Data'!A2)),"M/D/YYYY")
and then the date changes from e.g. 6/1/2021 to 1/6/2021 (here for June 2021) but after the date is becoming 1/6/2021 i think the other formulas are still reading the date as if it is already the same as 6/1/2021.
Here is a sheet that has some data that I'm struggling with Dates Standardization
So any idea how to fix this mess?
Appreciate your help <3
Based on the formula you've already tried, does this work instead?
=date(regexextract(to_text('Row Data'!A2),".*\/(.*)"),regexreplace(to_text('Row Data'!A2),"\/.*",""),regexextract(regexextract(to_text('Row Data'!A2),"(.*)\/.*"),".*\/(.*)"))
Alternative:
=datevalue(regexreplace(to_text('Row Data'!A2),"(.|..)\/(.|..)\/(.*)","$2\/$1\/$3"))
Assuming you have US dates supplied in any of these formats:
M/D/YY
M/D/YYYY
MM/DD/YY
MM/DD/YYYY
M-D-YY
M-D-YYYY
MM-DD-YY
MM-DD-YYYY
M.D.YY
M.D.YYYY
MM.DD.YY
MM.DD.YYYY
To switch day with month, this will work relative to the example screengrab below:
=arrayformula(if(A1:A<>"", datevalue(regexreplace(to_text(A1:A),"(.|..)[\/\-\.](.|..)[\/\-\.](.*)","$2\/$1\/$3")),))

Google Sheets Formula cannot get the date from another cell

I want to get the price of bitcoin on exact date.
The dates are written in Column A and they are updated regularly from a Google form
This is an example of the working formula, but the date in it is written manually (2017-01-31):
=ARRAYFORMULA(IF(ISBLANK($B$2:$B),"",CRYPTOFINANCE("BTC/USD", "price",2017-01-31)))
But when I try to get the dates from Column A, mentioned with $C$2:$C - Google sheets do not understand it
=ARRAYFORMULA(IF(ISBLANK($B$2:$B),"",CRYPTOFINANCE("BTC/USD", "price",$C$2:$C)))
Click here to check The spreadsheet
Thank you in advance!
"Doctor, it hurts when I do this."
In the example spreadsheet you are converting the dates into text for the column C, using the explicit TEXT() function. Then you are wondering why they no longer work as dates?
Stop converting to text.

Apply conditional formatting to whole rows only if multiple rows render true?

I have an advertising campaign tracker that have rows for name, jobcode, startdate and endate. Multiple lines have the same job code, but each of them can have a different end date. I need to apply conditional formatting to all rows that have an enddate that has passed – but only if the end date has passed for all rows with the same jobcode. I have searched this forum and various places online without luck, I really would appreciate your advice on this.
I have created a sample sheet that you may look at. I have created a formatted sample of what I want to achieve at the bottom. Feel free to play on the top one.
Sample Spreadsheet
Thanks in advance!
This formula will work when applied to A3:G8 (or further down the spreadsheet):
=countifs($D$3:$D$8,$D3,$G$3:$G$8,">="&today())=0
the $D in $D3 is to keep the formatting formula locked on column D as it applied across columns A:G.
Use this in the Custom Formula option of the Conditional Formatting

Resources