I have this GoogleSheets,
With a import range query : =IMPORTRANGE("1Z76YA8","'Sales'!1:1")
Is it possible to divide the results of my import range with "row 1 (currency euro) "?
=ARRAYFORMULA(IMPORTRANGE("1Z76YA8","'Sales'!1:1")/B1:1)
If you do not want to output when row 1 is blank:
=ARRAYFORMULA(IF(B1:B="",,IMPORTRANGE("1Z76YA8","'Sales'!1:1")/B1:1))
Related
I have a question regarding the importxml function. At this moment I'm fetching the price of some of our travel pages to a Google Sheets list so we can track the price development of our packages (travel product, so prices are chaning all the time).
Now I'm facing the next problem. When I'm importing the price of a package that has a price higher than 999 euros (for example 1060 euros) the value I get in my Google Sheets is 1.06 (due to the use of a dot in between the 1 and the 0 (1.060 euros).
Is there a possiblility to import the full price in Google Sheets? Without the dot seperating the numbers?
Formula I use: =importxml(A2, "/html/body/div[7]/div[1]/section[1]/div[2]/div[1]/div/div[1]/div[1]/div/span[3]/span"))
Result I get:
€1.09
Result I should get:
€1090
Example sheet: https://docs.google.com/spreadsheets/d/1uzpLEhpjpVcZI8QTLx_Pz4EFL0YJMPHJU6WR1CVbZ-w/edit?usp=sharing
try:
=SUBSTITUTE(TO_TEXT(IMPORTXML(A2, "/html/body/div[7]/div[1]/section[1]/div[2]/div[1]/div/div[1]/div[1]/div/span[3]/span"))), ".", )
I have the following table
and am using the following formula to sum a range per month using sumif in Google Sheets
=sumif($B:$B,$B1,$C:$C)
I would like the total value to be displayed in column C, which is the range I am summing.
I would like the total to be display in the same column as the sub entries. How do I exclude the cell containing the total value so the formula doesn't become self-referencing?
If the total is in cell C1, then:
=sumif($B2:$B2000,$B1,$C2:$C2000)
Or you could name the ranges:
sales = $B2:$B2000
prices = $C2:$C2000
then:
=sumif(sales,$B1,prices)
Edit: As per the comment from pgSystemTester, Googlesheets allows the following construction:
=sumif($B2:$B,$B1,$C2:$C)
All,
I have been trying to import a range from a different sheet and concatenate two row/columns into one on import and I am failing at it horribly.
Here is the code I am using:
=IMPORTRANGE(("14ZDhy0VE-u0srsp1EZG6KaxMOusF8TzCcD2yWxPoxM0", "Aluminum!B1:H"),CONCATENATE(D:D,"","x","",E:E))
The image below shows the two columns and rows highlighted that need to be combined.
Column Highlight
Best,
D
try:
=INDEX(SUBSTITUTE(FLATTEN(QUERY(TRANSPOSE(IMPORTRANGE(
"14ZDhy0VE-u0srsp1EZG6KaxMOusF8TzCcD2yWxPoxM0", "Aluminum!D1:E")),, 9^9)), " ", " x "))
I was trying to create a column with cumulative count per day from a column in google sheet but I was unable to do so.
How to get the cumulative counts?
Public spreadsheet: https://docs.google.com/spreadsheets/d/10NzbtJhQj4hQBnZXcmwise3bLBIAWrE0qwSus_bz7a0/edit#gid=1126759670
Question
Find cumulative number per day. Eg for May 7 start from 1,2,3 and for May 8 again start from 1,2,3 and so on.
Required
I need the cumulative count for each day as shown in the figure.
In J2 I entered
=Arrayformula(IF(LEN(A2:A), ROW(C2:C)-MATCH(C2:C, C2:C,0),))
See if that works for you?
Also
=ArrayFormula(if(C2:C<>"",countifs(C2:C,C2:C,row(C2:C),"<="&row(C2:C)),))
If you are interested using gspread module, you can get the new column as follows:
import os
import glob
import numpy as np
import pandas as pd
import gspread
path_creds = os.path.expanduser('~/.config/gspread/credentials.json')
gc = gspread.service_account(filename=path_creds) # google service
url = "https://docs.google.com/spreadsheets/d/10NzbtJhQj4hQBnZXcmwise3bLBIAWrE0qwSus_bz7a0/edit#gid=1126759670"
parts = url.split('/edit')
url = parts[0]
sh = gc.open_by_url(url)
ws = sh.sheet1
res = ws.get_all_records()
df = pd.DataFrame(res)
df['answer'] = df.groupby('Date')['Company'].transform('cumcount')+1
df
output
I want to import the TOP LOOSERS table from this page to a Google Spreadsheet but I have no idea whatsoever how to do it.
You can import data by this way, i.e in D2
=IMPORTHTML("https://www.coingecko.com/fr","table",1)
but it is difficult to order the result since values are in string format including %. You can then compute in A3, with % format in column B
=query(arrayformula({F3:F,1*(J3:J)}),"select * order by Col2 limit 10")
https://docs.google.com/spreadsheets/d/1ZSonplM0DqXBaggACVo906AYz1ys9k_xrDzogb-k0sQ/copy