Pulling data from CRM System with Inputrange - mismatched lines - google-sheets

I have built a CRM System on Google Sheets and I am currently facing an issue with the mastersheet. The mastersheet is pulling data from other spreadsheets within the same document. The issue I am facing is that I would like the data to go on to the next available line at the bottom of the mastersheet page, instead of being put underneath the last entry from that particular sheet.
You can find the code I have used below:
={FILTER(IMPORTRANGE("1c47hRszG3jZf7SPj5pxtabmsw3tmR11ETx3hcEKue2w","'Customer Data'!B:B"),LEN(IMPORTRANGE("1c47hRszG3jZf7SPj5pxtabmsw3tmR11ETx3hcEKue2w","'Customer Data'!B:B")));FILTER(IMPORTRANGE("1c47hRszG3jZf7SPj5pxtabmsw3tmR11ETx3hcEKue2w","'17 June 2017 M&G Bookings'!B2:B"),LEN(IMPORTRANGE("1c47hRszG3jZf7SPj5pxtabmsw3tmR11ETx3hcEKue2w","'17 June 2017 M&G Bookings'!B2:B")));FILTER(IMPORTRANGE("1c47hRszG3jZf7SPj5pxtabmsw3tmR11ETx3hcEKue2w","'Talent Agency - General Details Request form'!Q2:Q"),LEN(IMPORTRANGE("1c47hRszG3jZf7SPj5pxtabmsw3tmR11ETx3hcEKue2w","'Talent Agency - General Details Request form'!Q2:Q")));FILTER(IMPORTRANGE("1c47hRszG3jZf7SPj5pxtabmsw3tmR11ETx3hcEKue2w","'Performer Database'!P2:P"),LEN(IMPORTRANGE("1c47hRszG3jZf7SPj5pxtabmsw3tmR11ETx3hcEKue2w","'Performer Database'!P2:P")))}
Can anyone please help me with this?
Timestamp goes to column A

QUERY and it's ORDER BY clause could be helpful but you should add the timestamp column to your formula in order to use it to sort.

Related

How to auto-fill reports like this (google sheets)

i need to filter a report generated by a time tracking software. However the format delivered is not the best to filter.
What i want as result is a list of employees (firstname, last name, department, sum(presence.Corona))
My plan was to use google docs and our HR department should paste this report each month in a new sheet. Then the first sheet generates the overview for each month-sheet. i could do this IF the firstname and last name would be in every line. Unfortunately it isnt. So i need to somehow automate that this is pasted in every line or i need to select all data and then group from (including) firstname 1 until (excluding) firstname 2 and so on.
At the moment i have no clue on how to do this. any ideas on maybe doing this with google sheets query feature?
Thank you for your ideas :)
I tried using google sheets query feature but i think i first need to fill the data

Google Sheets Function Autofill

I'm looking for a solution to a problem that seems minor at first, but if you end up having spreadsheets with 1000's of rows, it involves a lot of dragging. I need an autofill for a formula for a column that pulls information from the first sheet.
Here is what I have so far.
=if(SUMPRODUCT(--(Magento!A2:A<>""))=0,"",Magento!A2)
I suppose I could do the same thing with =(Magento!A2).. but I was trying to get it to detect and auto-fill based on what is input into the first sheet.
Basically, if there are 29 SKUs in the first sheet which is the master, I'd like it to populate the information in the second sheet. At the same time if there ended up being 2000 skus on the first sheet, I'd like the 2000 skus to be populated on the second sheet column A without having to drag and drag the autofill.
It sounds to me like you just want to bring in a copy of whatever is in Magento!A2:A, exchanging any zeros for nulls. If that is the case:
=ArrayFormula(IF(Magento!A2:A=0,,Magento!A2:A))
If that isn't what you had in mind, please share a direct link to your sheet (or a copy of it), using File > Share.
Addendum (after comment clarification)
You just needed this:
=ArrayFormula(Magento!A2:A)

Google Sheets - Finding the most recent date based on a value

I have a table showing the name of everyone who has received feedback and when they received the feedback, however, some people received feedback on multiple dates so I need a formula to find the most recent date and copy it across to a seperate sheet.
I have attached the google sheets below. For example, the second tab shows the name of each person in the table but I need to know the most recent date they received feedback based on the data from sheet 1.
https://docs.google.com/spreadsheets/d/1n3c6F97-10mzZ8g3VYroRgl5ullXz_dDJrpdV5SQRLg/edit#gid=1526292532
Any help is most appreciated
Use the following formula
=maxifs(B:B,A:A,F2)
where f2 contains the name of the person you need the information. I've also edited your sheet. Note that i had to rewrite some of your dates, as they were being recognized by sheets as text, not dates.
Use this to create a list names
=UNIQUE(A1:A29)
Then as Oren just posted, this will give you the highest date, but you may need to fix your data formatting for it work.
=maxifs(B:B, A:A, D2)

Google Sheets: How do I look up multiple values in another sheet?

The scenario I am faced with is kind of an odd one. Basically, I am designing a Google Sheet for work that will allow the employees to log their tech support phone calls and then a report will automatically update on another page, keeping a collective tally of sorts of all the activity on a particular day.
What I am trying to do is write a function that searches another sheet for a particular date and, if that date is found, sum a particular column of values for that day only. There are pictures attached that should help explain the problem.
Basically, I am trying to write a general equation in the cell reading "FALSE" that will look up the date of that row (in this case 1/1/2017) in the "Spendgo Minutes" sheet. If that date were to be found somewhere on that sheet (not necessarily at the top of the sheet), the "Minutes Gained" column would be summed up, but for that date only (not the entire column). Here is my running formula right now that has errors:
=IF(COUNTIF('Spendgo Tally'!$A$3:$A,$B7),'Spendgo Tally'!$G3)
Does anyone know how this might be possible? Feel free to ask any clarifying questions.
You're looking for SUMIF
= SUMIF('Spendgo Tally'!$A$3:$A,$B7,'Spendgo Tally'!$G3:$G)

Google Sheet: IMPORTXML from Yahoo Finance [duplicate]

This question already has answers here:
Scraping data to Google Sheets from a website that uses JavaScript
(2 answers)
Closed last month.
I'm trying to import current stock price from yahoo finance. I used a formula from some website and it partially work. I only know how to tell it to look for a specific query and it worked fine for some other data point I need but the price change query changes from
"Fw(500) Pstart(10px) Fz(24px) C($dataRed)"
to
"Fw(500) Pstart(10px) Fz(24px) C($dataGreen)"
depending if the price is up or down for the day.
How do I modify the formula I'm using below to use the "or" operator in this case? so that it will pull the price down whether the stock is up or down for the day. Thanks!
Formula I'm using:
=IMPORTXML("https://finance.yahoo.com/quote/IBM","//span[#class='Fw(500) Pstart(10px) Fz(24px) C($dataRed)']")
I noticed the other answers did not work for me (they may have worked in the past), so I decided to post this solution. Just put the ticker in cell A1 and one or both of the below formulas somewhere else.
Price:
=IFNA(VALUE(IMPORTXML("https://finance.yahoo.com/quote/" & A1, "//*[#class=""D(ib) Mend(20px)""]/span[1]")))
Change:
=IFNA(VALUE(REGEXEXTRACT(IMPORTXML("https://finance.yahoo.com/quote/" & A1,"//*[#class=""D(ib) Mend(20px)""]/span[2]"), "^.*?\s")))
Currently using googlefinance but find it does not update often enough even when updates set to every minute so currently testing if below will allow updates at least with an F5 press within the sheet
This brings in the price and other information (dated 2022/09/27)
=IMPORTXML("https://finance.yahoo.com/quote/SAVA/", "//*[#id=""quote-header-info""]/div[3]/div[1]/div[1]")
If you just want the price: =IFNA(VALUE(IMPORTXML("https://finance.yahoo.com/quote/" & $A1, "//*[#class=""D(ib) Mend(20px)""]/span[1]")))
You could use a more dynamic/generic xpath that doesnt require such specific paths such as this:
This one pulls in both the price and the change:
=ARRAY_CONSTRAIN(transpose(IMPORTXML("https://finance.yahoo.com/quote/IBM:,"//*[#class='Mt(6px)']//span")),1,2)
If you just want the price:
=trim(IMPORTXML("https://finance.yahoo.com/quote/IBM","//*[#class='Mt(6px)']//span"))
If you just want the change:
=IMPORTXML("https://finance.yahoo.com/quote/IBM","//*[#class='Mt(6px)']//span[2]")
Sadly Yahoo Finance changes the XML/HTML structure of its website quite often. The one that works for now is:
=IMPORTXML("https://finance.yahoo.com/quote/IBM/", "//*[#id=""quote-header-info""]/div[3]/div[1]/div/span[1]")
You may always open the HTML structure and use the developer tools to find and copy the X-path.
P.S.1. Though there seem to be a bug and the function can't retrieve data from URLs where there is a dot/point/period "." in the name.
P.S.2. The IMPORTHTML() function can't also fetch the latest price from Yahoo Finance because the information is neither in a table nor a list. You can try the scripts from this page and this page to list all the tables and lists.

Resources