ImportXML Google Sheets picking price from websites [closed] - google-sheets

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 10 days ago.
Improve this question
Formula gives error:
Imported content is empty.
for both URLs 1 & 2. I want Import Price of these products.
https://paytmmall.com/led-night-light-wireless-tap-touch-night-lamp-light-battery-powered-wardrobe-kitchen-cabinet-closet-push-stick-on-lamps-HOMLED-NIGHT-LIGLOB317966D12FA2A-pdp
https://www.amazon.in/Endless-EL-8201-Steel-Bike-Black/dp/B07MFY169J
=IMPORTXML("https://www.amazon.in/Endless-EL-8201-Steel-Bike-Black/dp/B07MFY169J","//span[#class='currencyINR']/text()")

for the 2nd URL, it's not doable the way you are trying. Amazon implemented anti-scraping measurements so the only way is to use their API:
For automated access to price change or offer listing change events
please refer to the MWS Subscription API:
https://developer.amazonservices.com/gp/mws/api.html/277-5993977-7749460?ie=UTF8&section=subscriptions&group=subscriptions&version=latest
=REGEXREPLACE(REGEXEXTRACT(QUERY(IMPORTXML(
"https://paytmmall.com/led-night-light-wireless-tap-touch-night-lamp-light-battery-powered-wardrobe-kitchen-cabinet-closet-push-stick-on-lamps-HOMLED-NIGHT-LIGLOB317966D12FA2A-pdp",
"//*"), "where Col1 contains'""price"":' limit 1"),
"price"":(.*)""a"), ",$", "")

Related

Trying to nest a transpose formula inside an array formula [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed yesterday.
Improve this question
Here's the sheet: https://docs.google.com/spreadsheets/d/1TbPKehggzCGWy6LyEuzHZc5RouBHhyju35bqIGpInhM/edit#gid=14120435
I know how to transpose the data in colA (=Transpose(A2:A)). I know how to write an array formula to output the data i'd like (F1), but I'd like to nest the Transpose formula into the formula in F1 so that as items are added to colA, the table on the right populates with the header rows relying on the values in A2:A and the data as it is in ColF
You could try:
=ARRAYFORMULA(LET(header,TOROW(A2:A,1),{header;IF(D2:D="",,E2:E*VLOOKUP(header,A:B,2,))}))
Or:
=ARRAYFORMULA(LET(header,TRANSPOSE(FILTER(A2:A,A2:A<>"")),{header;IF(D2:D="",,E2:E*VLOOKUP(header,A:B,2,))}))

Scrape from website and save into different columns in a spreadsheet [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 11 months ago.
Improve this question
Suppose there's a website that has a list of details of some companies, for example, name, HQ area, turnover, etc. How do I scrape that data and fill it into different columns (like name, turnover) with each row having the details of a separate company?
Google Sheets allow you to import html tables or list with the IMPORTHTML(url, query, index) function.
For example, using the Wikipedia page List of largest companies by revenue as an example.
We want the data from the main table, so the first thing that we have to do, is to know what index it occupies in the page. To do this, we can use document.querySelectorAll('table') or $$('table'), as you can see from the result, the table that we want is in the position 5 of the array, so inside our google sheet we can use:
=IMPORTHTML("https://en.wikipedia.org/wiki/List_of_largest_companies_by_revenue","table",5)
From here, you should change the query parameter to list and find what index it occupies within the page using the method described above. In any case, you could always use IMPORTXML(url, xpath_query), and knowing the XPath of the information, you could come up with a similar solution.

google sheet vlookup a cell that do not contain multiple value [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 1 year ago.
Improve this question
How can I list all the buyer names who has not buy Prodct "Phone" or Brand"Sony" or Seller" Ebay". Thank you so much for your help.
Assuming your "Date" header is in A1:
=FILTER(B2:B10, C2:C10<>"Phone", D2:D10<>"Sony", E2:E10<>"Ebay")
It's a simple FILTER.

A formula to group timeslots? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I have a column in my Google Sheet that shows timeslots for appointments in the following format:
07:15-07:45
09:00-09:30
12:45-13:15
16:30-17:00
In a new column, I would like to condense these into groups so that for instance any timeslot between 07:00-10:00 would be "Early Morning" 10:00-13:00 would be "Late Morning/Early Afternoon" etc.
How would I be able to do this with a formula?
Please try the following
=ArrayFormula(IFERROR(IFS(
IFERROR(REGEXEXTRACT(A2:A11,"(.*)-")*1,"")<TIMEVALUE("10:00:00"),"Ear.Mor.",
IFERROR(REGEXEXTRACT(A2:A11,"(.*)-")*1,"")<TIMEVALUE("13:00:00"),"Lt.Mor.",
IFERROR(REGEXEXTRACT(A2:A11,"(.*)-")*1,"")<TIMEVALUE("16:00:00"),"Ear.Aft.",
IFERROR(REGEXEXTRACT(A2:A11,"(.*)-")*1,"")<TIMEVALUE("19:00:00"),"Lt.Aft.")))
OR
=ArrayFormula(IFERROR(IFS(
IFERROR(INDEX(SPLIT(A2:A11,"-"),0,1),"")<TIMEVALUE("10:00:00"),"Ear.Mor",
IFERROR(INDEX(SPLIT(A2:A11,"-"),0,1),"")<TIMEVALUE("13:00:00"),"Lt.Mor",
IFERROR(INDEX(SPLIT(A2:A11,"-"),0,1),"")<TIMEVALUE("16:00:00"),"Ear.Aft",
IFERROR(INDEX(SPLIT(A2:A11,"-"),0,1),"")<TIMEVALUE("19:00:00"),"Lt.Aft")))
(You can adjust ranges to your needs)
Functions used:
ArrayFormula
IFERROR
IFS
INDEX
TIMEVALUE
REGEXEXTRACT
SPLIT
Welcome to StackOverflow. Since I'm also the new member here like you, I would like to give you some advice and answer your question.
While asking a question there are some rules to follow:
you should give the important information about your question before putting your code
don't ask someone for a direct code. Try to handle it by yourself with doing a research about your question. Maybe there is already an answer to your question which can give you better idea than someone's answer in your post.
we all should understand that most of people here are busy with something. So we should respect their time and not ask already answered question or without having a code.
you can find more about how to ask a question here. I hope it'll help you to at least give an idea of what StackOverflow is.
For the answer to your question, I would suggest that to separate beginning time of appointment and end of it to different columns. Then you can write a formula using if statement like this: IF(AND(D2 > TIME(7,0,0), F2 < TIME(10,0,0)),"Early Morning"," another if statement ") Assume that D2 is beginning of appointment and F2 is the end. I might have made a mistake but overall idea is like that. Please refer to those links for more information about if statements and timeslots:
https://exceljet.net/excel-functions/excel-if-function
https://www.excelhow.net/how-to-compare-time-difference-with-certain-time-in-excel.html

VLOOKUP on continuous form [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
On K250 cell I've this put a formula so that when user submit data via form formula will work.
=VLOOKUP(F250,Available!$C$1:$E$72,3,false))
But problem is when someone submit a form, row K250 is getting down as K251 & submitted form taking palce K250. I've found some other guys are talking about using Array. I've tried this one but didn't work.
=arrayformula(VLOOKUP(F250,Available!$C$1:$E$72,3,false))
Whats the solution?
If i understood your problem correctly then do this:
Instead of giving a fixed range , use name ranges to avoid this problem.
To access name ranges you can use F3 key while typing vlookup.
Following are some screenshots to help you out.
It should work even your cells shift towards down, if the shifting is happening towards right then you might want to select the entire sheet to avoid confusion.
Hope this helps to solve your problem.
When a form submission is made in Google Sheets, a new row is inserted in the sheet receiving the form submissions, and yes, this will "push down" any formulae that were previously in that row.
And yes, one solution is to use an array formula. Something like this could be entered in row 1:
=ArrayFormula(IF(ROW(F:F)=1;"Column Header";IFERROR(VLOOKUP(F:F;Available!$C$1:$E$72;3*SIGN(ROW(F:F));0)))
Multivalue Parallel Lookup Solution
Note: if this answer is in the right ballpark, I will try and edit your question and tags accordingly.

Resources