# Weather app with just Google Sheet Formula!

So I came across here various topics about a weather app, but all of the cases use the script magic or Zapier, I been searching the web and found a way to make it work fetching the info from a website using pure formulas .

Iâ€™m new to glide, so im reaching to you to make it work in any place, country, city.

Hope it helpâ€™s others in then community.

All you need its the city and the date and it will give you weather, temperature, comfort feels, wind and humidity.

=Query(IMPORTHTML(â€śhttps://www.timeanddate.com/weather/usa/"&If(Counta(split(A1," â€ś))=2,lower(split(A1,â€ť â€ś))&â€ť-â€ť&index(lower(split(A1," â€ś)),1,2),lower(split(A1,â€ť â€ś)))&â€ť/ext",â€śtableâ€ť,1)," select Col3,Col4,Col5,Col6,Col8 where Col1=â€™"&text(A2,â€śDDDâ€ť)&Char(10)&text(A2,â€śMMMâ€ť)&" â€ś&INDEX(split(A2,â€ť/"),1,2)&"â€™ ",2)

result:

2 Likes

Wow! Thank you for sharing this with us!

1 Like

Just trying to create one for my self but this surpasses my knowledge. Looking forward to see how this works for your multiple feature apps!

2 Likes

Actually, this I could just paste in a column next to the addressesâ€¦You have given me ideas!

2 Likes

the formula is missing a bracket

It work it for me. Let me check and edit!

I also received an error regarding number of argumentsâ€¦ Where do you put the location in the above formula?

check the picture, You put in A1 city and A2 the date, it works for me
but need it for other country!

the formula is in A3 as in the picture

Thanks. Itâ€™s giving me a parse error for some reason. I even put your City and Date in. Iâ€™ll look more at it later. Have some ideas!

Iâ€™ll make a public copy later to everyone check it out! Maybe somebody can make it work for what Iâ€™m aiming for!

1 Like

problem solved

As Iâ€™m reading if you need to fetch info from another city you need to first check in the webpage if it does exist and how the page get it. Iâ€™ll be working on this for today! Hopefully some body can give a hand! Cheers mate

found a way to fetch from a zip code, same rows in the sheet as in first way I shared!

=Query(IMPORTHTML(â€śhttps://www.timeanddate.com/weather/@z-us-"&A1&"/ext",â€śtableâ€ť,1)," select Col3,Col4,Col5,Col6,Col8 where Col1=â€™â€ť&text(A2,â€śDDDâ€ť)&Char(10)&text(A2,â€śMMMâ€ť)&" â€ś&INDEX(split(A2,â€ť/"),1,2)&"â€™ ",2)

2 Likes

found a way to change from Celsius to Fahrenheit or kelvin!

at the end of the URL higligthed like this you need to change it for the unit you need

?fut=1 for C

?fut=2 for F

?fut=3 for kelvin

=Query(IMPORTHTML(â€śhttps://www.timeanddate.com/weather/canada/"&If(Counta(split(A1," â€ś))=2,lower(split(A1,â€ť â€ś))&â€ť-â€ť&index(lower(split(A1," â€ś)),1,2),lower(split(A1,â€ť â€ś)))&â€ť/ext ?fut=1 â€ś,â€śtableâ€ť,1),â€ť select Col3,Col4,Col5,Col6,Col8 where Col1=â€™"&text(A2,â€śDDDâ€ť)&Char(10)&text(A2,â€śMMMâ€ť)&" â€ś&index(split(A2,â€ť/"),1,2)&"â€™ ",2)

2 Likes

I tried your formulaâ€¦couldnâ€™t get it to workâ€¦Im sure I messed it up somewhere when I did the copy/pasteâ€¦Im going to try it again later.

1 Like

I am still getting the PARSE error.

And this is the formula I put in.
=Query(IMPORTHTML(â€śhttps://www.timeanddate.com/weather/usa/"&If(Counta(split(A1," 2 â€ś))=2,lower(split(A1,â€ť â€ś))&â€ť-â€ť&index(lower(split(A1," â€ś)),1,2),lower(split(A1,â€ť â€ś)))&â€ť/ext",â€śtableâ€ť,1)," select Col3,Col4,Col5,Col6,Col8 where Col1=â€™"&text(A2,â€śDDDâ€ť)&Char(10)&text(A2,â€śMMMâ€ť)&" â€ś&INDEX(split(A2,â€ť/"),1,2)&"â€™ ",2)

Thoughts?

1 Like

Sorry!, here is the shared sheet to copy I will add the other examples 2

2 Likes

Here its the shared sheet to see it in action!
errors fixed

1 Like

Thank you!!!

Thank you for the share, I see you have solved the problem.

However I had so many problems using Google Sheetâ€™s import functions whether it be HTML, Feed or XML. It can break down any time and the update time is slow as well, especially for feeds so I donâ€™t use them anymore.

2 Likes