Difference in value of two same time google Sheets [duplicate] - google-sheets

This question already has an answer here:
Google Sheet yields infinitesimal number as remainder of an integer/whole number
(1 answer)
Closed 3 months ago.
Why the values of two identical times are different from each other, unable to use vlookup due to this
Note: Times are taken from two different sources, one is generated as CSV from a website and the other was manually entered.
Example:
Time Values
10:00 AM 0.416666666666666
10:00 AM 0.416666666666667
FALSE
How to Solve this ? Thanks in advance.

this happens due to a "rounding error" more on that here: https://stackoverflow.com/a/72230592/5632629
in your case, you just need to trim/round it 12-digit decimal:

Related

How can I write a function in google sheets that gives me the group of 15 consecutive cells with the highest average? [duplicate]

This question already has answers here:
Google Sheets: Moving daily, weekly, monthly, and yearly averages
(2 answers)
Closed 24 days ago.
I've got a data set of 365 cells about the wave height per day, I want to figure out how to find when the highest average over 15 days is during the year. I am limited to using google sheets and have beginer to intermediate knowledge of google sheets which makes it hard to figure out how to write the function.
I have no clue how to get there, all i could figure out online is using the function to find the highest 10 values in a dataset, but not consecutive values.
With the use of SCAN, SEQUENCE and INDEX, you can navigate through the range, choosing ranges of 15 cells; and returning the average:
=SCAN("",SEQUENCE(COUNTA(A1:A)-14),LAMBDA(a,v,AVERAGE(INDEX(A:A,v):INDEX(A:A,v+14))))
Just by wrapping that into MAX would give you only the value. If you need also the range, can do something like this:
=SCAN("",SEQUENCE(COUNTA(A1:A)-14),LAMBDA(a,v,{"Rows: "&v&" to "&v+14,AVERAGE(INDEX(A:A,v):INDEX(A:A,v+14))}))
That would return:
With the help of SORTN you'll be able to find the highest value (or values, just change the first 1 after the closure of SCAN with the value you want):
=SORTN(SCAN("",SEQUENCE(COUNTA(A1:A)-14),LAMBDA(a,v,{"Rows: "&v&" to "&v+14,AVERAGE(INDEX(A:A,v):INDEX(A:A,v+14))})),1,1,2,0)
To have the actual values, use:
=LAMBDA(ind,FILTER(A:A,ROW(A:A)>=C1,ROW(A:A)<(C1+15)))(INDEX(SORTN(SCAN("",SEQUENCE(COUNTA(A1:A)-14),LAMBDA(a,v,{v,AVERAGE(INDEX(A:A,v):INDEX(A:A,v+14))})),1,1,2,0),,1))

How to Query a column where numbers are mixed with text (GOOGLE SHEET) [duplicate]

This question already has answers here:
Query is ignoring string (non numeric) value
(2 answers)
Closed 5 months ago.
I'm using a query to pull data from a multi-sheets in Google Spreadsheet that is populated by a Google Form. If the form has only numbers, there is no problem. However, if there's a mixed of text and number then it did not work.
=QUERY({Sheet1!A:S;Sheet2!A:S},"SELECT* WHERE Col4<>''",0)
EDIT: Added the second one here:
=QUERY(Sheet2!A:S,"SELECT A,C,D,E,F,G,H,I,J,K,L,R WHERE G IS NOT NULL ORDER BY G LABEL R 'FRUIT'",TRUE)
Regards,
Yes, this is how QUERY works. It only pulls the most frequent data type per column. To pull mixed data types, you can use FILTER:
=FILTER({Sheet1!A:S;Sheet2!A:S},{Sheet1!D:D;Sheet2!D:D}<>"")

referencing another sheet using indirect formula [duplicate]

This question already has an answer here:
Dynamically referencing different sheets by changing sheet range argument depending on another cell's value
(1 answer)
Closed 5 months ago.
I am trying to referencing another sheet using this indirect formula
=indirect("'"&L2&"'!"&B74)
it works with simple name sheet like: m
but doesn't work with the name I want:
animated ad units 10rd of Feb
I have been desperately trying for the whole day but got no success.
Please help me
all you need is:
=INDIRECT(L2&"!B74")

How to calculate the difference between two "elapsed" times with Google Sheets

I have two columns in Google Sheets, column 1 is a list of my times around a track in the format "01:23.456" or "minutes:seconds.milliseconds". Column 2 is a list of someone else's times around a track in the same format. I'm looking for a way to calculate the difference between my time and the other person's time to see how far behind I currently am.
I have already tried multiple different different date and time formats and even attempted to make a custom number format. I am kind of new to Google Sheets so I may have been going at this problem incorrectly.
For example, if my time around the track was "01:00.00" and the other person's time was "00:50.500" then the third column should display "00:09.500". Currently all of my attempts give me the same error which is "is a text and cannot be coerced to a number".
=TEXT(MINUS(LEFT(A1, 2)*60*1000+MID(A1, 4, 2)*1000+RIGHT(A1, 3),
LEFT(B1, 2)*60*1000+MID(B1, 4, 2)*1000+RIGHT(B1, 3))*0.001, "00:00.000")

Gather values from a range to a single column? [duplicate]

This question already has answers here:
Stacking multiple columns on to one?
(8 answers)
Closed 7 years ago.
Does anyone know how to gather values from a range to a single column?
for exempele...
i have information in cells A1:C5
and I want those cell to be copied to Column H (H1, H2 and so on....)
I believe your question is pretty much answered here: Stacking multiple columns on to one?
=TRANSPOSE(SPLIT(JOIN(";",A:A,B:B,C:C),";"))
Note that you could equally well just do from row 1 through 5 like this:
=UNIQUE(TRANSPOSE(SPLIT(JOIN(";",A1:A5,B1:B5,C1:C5),";")))
As mentionned by Adam, this will work with the new Google Docs, and is more simple:
={A1:A5;B1:B5;C1:C5}
From the same question Jonathan linked to, I think this answer is now the better one (it is supported in the newest version of Sheets, which wasn't around when that question was first asked).
={A1:A5;B1:B5;C1:C5}

Resources