=HOUR formula not working in Google Sheets - google-sheets

im trying to get only the hour from the time but when i try to do it i get 0:00:00
ScreenShot
i tried to change time Locale to United Kingdom but still i get the same error
ScreenShot 2
the same formula work in excel just fine but i don't know why i get this problem in google sheets.
Please any help

try:
=LEFT(TO_TEXT(G2); 2)
or:
=TEXT(G2; "hh")

Related

How to use SUMIFS on several lines, using dates

I am trying to sum values using sumifs but I am getting an error. Went throught several website but I guess I don't have a good understanding of how SUMIF works.
Right now I have a sheet with a registry date(C), a price per weeek(G) and a end date(D).
I would want to calculate the earning every week.
So I created another sheet with every week of the year.
=SUMIFS(Clients!G2:G;A5;>=Clients!C2:C;A5;<=Clients!D2:D)
I am not using coma as a separator as my google sheet is not in english.
I am trying to sum the incomes if the date on the second sheet is between the starting date and the end date. But I keep getting errors and I don't really unerstand why.
Thanks
I found an formula which look to be working.
=SUMIFS(Clients!G2:G;Clients!C2:C;"<="&A5;Clients!D2:D;">="&A5)
I guess that it was not working because I was letting A5 to incremente.
Problem solved.
Thanks for your help.
Find out more here on Google's post about =SUMIFS().
Sample usage
SUMIFS(A1:A10, B1:B10, ">20")
SUMIFS(A1:A10, B1:B10, ">20", C1:C10, "<30")
SUMIFS(C1:C100, E1:E100, "Yes")
Syntax
SUMIFS(sum_range, criteria_range1, criterion1, [criteria_range2, criterion2, ...])
sum_range – The range to be summed.
criteria_range1 – The range to be checked against criterion1.
criterion1 – The pattern or test to apply to criteria_range1.
criteria_range2, criterion2, … (OPTIONAL) – Additional ranges and criteria to be checked.

Need to convert an Excel formula to a Google Sheet formula

I created a formula that works in Excel but cannot get it to work in Google Sheets. Can someone please help?
=IF(ISNUMBER(SEARCH("amp",$A2)), "AMP", IF(ISNUMBER(SEARCH("feed",$A2)), "Feed", "Other"))
Thanks!
try perhaps:
=IF(ISNUMBER(SEARCH("amp"; A2)); "AMP",
IF(ISNUMBER(SEARCH("feed"; A2)); "Feed"; "Other"))

Google Sheets' IMPORTXML breaks randomly

I'm writing since I'm experiencing some issues with the following IMPORTXML formula in Google Sheets:
=IMPORTXML("http://xmltestmagicplan.000webhostapp.com/xml_test.xml","/catalog/book[2]")
The formula works fine most of the times but approximately once a day it breaks, showing an error in loading the formula and giving #N/A as a result.
The workaround is changing anything in the URL (i.e. http -> https or 000webhostapp.com -> 000webhostapp.org) and then changing it back. Basically I think the workaround is forcing Google Sheets to reload the formula.
The same thing happens if I use this formula:
=IMPORTXML("http://xmltestmagicplan.000webhostapp.com/xml_test.xml")
No problem instead with the following formulas:
=IMPORTXML("https://gist.githubusercontent.com/Ram-N/5189462/raw/46db0b43ad7bf9cbd32a8932f3ab981bd4b4da7c/books.xml","/catalog/book[2]")
=IMPORTXML("https://gist.githubusercontent.com/Ram-N/5189462/raw/46db0b43ad7bf9cbd32a8932f3ab981bd4b4da7c/books.xml")
I think the issue is due to the hosting (000webhostapp.com) I'm using but I can't figure why. Any ideas?
you can try to trick it like this:
=IFERROR(
IMPORTXML("http://xmltestmagicplan.000webhostapp.com/xml_test.xml", "/catalog/book[2]"),
IMPORTXML("http://xmltestmagicplan.000webhostapp.com/xml_test.xml", "/catalog/book[2]"))
or if the switch is too fast add 1 fake switch between like:
=IFERROR(IFERROR(
IMPORTXML("http://xmltestmagicplan.000webhostapp.com/xml_test.xml", "/catalog/book[2]"),
IMPORTXML("http://xmltestmagicplan.000webhostapp.ORG/xml_test.xml", "/catalog/book[2]")),
IMPORTXML("http://xmltestmagicplan.000webhostapp.com/xml_test.xml", "/catalog/book[2]"))

Google spreadsheet googlefinance get specific attribute does not work

The googlefinance integration, documented here, in google spreadsheets does not seem to work for me:
Example:
GOOGLEFINANCE("GOOG","price",TODAY()-30,TODAY())
Google spreadsheets gives the cell a red corner and prints the following message:
Fel i formeltolkning. which in english means something along the lines of Error in formatting.
The following does however work: =GOOGLEFINANCE("GOOG").
Also I can open other spreadsheets from links where the exakt same syntax seem to work. What can cause this?
Change comma to a semicolon.
GOOGLEFINANCE("GOOG";"price";TODAY()-30;TODAY())
Some regions (Norway!) use a comma for decimals. The other option is to change settings:
File > Spreadsheet Settings > Locale...

This array formula is not working

Hi following formula is working, but array formula is not working.
Working EQ:
=IF(V2:V=1,INDEX($E$2:$E,MATCH(T2&B2&"Delivered Time (Today)",$T$2:$T&$B$2:$B&$C$2:$C,0)),"")
I wonder, but this formula is not working:
=ARRAYFORMULA(IF(V2:V=1,INDEX($E$2:$E,MATCH(T2&B2&"Delivered Time (Today)",$T$2:$T&$B$2:$B&$C$2:$C,0)),""))
Can someone educate me to fix this?
Example details:
Example Sheet is here
Unfortunately not all Sheets functions work within an arrayformula, and INDEX and MATCH are two that do not
Instead, you can use VLOOKUP and construct an array to do the job of INDEX/MATCH:
=ArrayFormula(IF(V2:V=1,VLOOKUP(T2:T&B2:B&"Delivered Time (Today)",{T2:T&B2:B&C2:C,E2:E},2,0),))
You can it working in this copy of your example sheet:
https://docs.google.com/spreadsheets/d/1dFVNfPn0R9goQaLjRvZEwggRthbkEY3nC3aqC2joPcw/edit?usp=sharing

Resources