I am trying to create a custom URL inside Google sheets that uses a predetermined URL + values from particular cells. What im trying to create is a formula to create urls with parameters at scale for an email campaign.
example
domain.net
data I have
A1 Email
B1 Fname
C1 Lname
This is the desired result
domain.net??Email=A1&Fname=B1&Lname=C1
domain.net??Email=emailaddress&Fname=firstname&Lname=lastname
I have a suspicion I am completely missing the point but offer:
=D$1&"??"&A$1&"="&A1&"&"&B$1&"="&B1&"&"&C$1&"="&C1
in case that helps to indicate what additional clarification may be useful.
Related
I am trying to create a search function across multiple sheets and using the filter command has been the best method so far but wanted to know if you could display all information across the sheets for one individual.
The current filter code that displays all information from the 2 sheets:
={filter(Sheet1!A2:C10, len(Sheet1!A2:A10)); filter(Sheet2!A2:C3, len(Sheet2!A2:A3))}
I am using cell B2 as the search box. A name will be entered into cell B2 that the user wants to search for. Can cell B2 be added into the code above so it displays all information only about the one name?
Try with query
=query({Sheet1!A2:C;Sheet2!A2:C},"select * where Col1 = '"&B2&"' ")
I'm trying add easy updating prices into a google sheet.
I need the market price from
//*[#id="app"]/div/section[2]/section/div[1]/section[3]/div/section[1]/ul/li[1]/span[2]
https://www.tcgplayer.com/product/242811/pokemon-celebrations-celebrations-elite-trainer-box?Language=English
I need it to display just the one number from the XPath to a cell, and I can't seem to figure out where I am going wrong. I've been using the IMPORTXML function and it won't return a value.
=IMPORTXML(A2,"//*[#id='app']/div/section[2]/section/div[1]/section[3]/div/section[1]/ul/li[1]/span[2]")
where A2 is the URL.
In your situation, it seems that the value of the market price cannot be directly retrieved from the URL of https://www.tcgplayer.com/product/242811/pokemon-celebrations-celebrations-elite-trainer-box?Language=English. But, fortunately, it seems that that value can be directly retrieved from the endpoint of API. So, how about the following sample formula?
Sample formula:
=REGEXEXTRACT(JOIN(",",IMPORTDATA(A1)),"marketPrice:(.+?),")*1
or
=REGEXEXTRACT(QUERY(TRANSPOSE(IMPORTDATA(A1)),"WHERE Col1 matches 'marketPrice.+'"),"marketPrice:(.+)")*1
The cell "A1" has the URL of https://mpapi.tcgplayer.com/v2/product/242811/details.
In the case of https://www.tcgplayer.com/product/242811/pokemon-celebrations-celebrations-elite-trainer-box?Language=English, please use 242811 from the URL to the endpoint of API like https://mpapi.tcgplayer.com/v2/product/242811/details.
Result:
Note:
The value from the URL is JSON data. In this case, the following custom function can be also used. In this case, please copy and paste the following script to the script editor of Spreadsheet and save the script. And please put a custom function of =SAMPLE("url") to a cell.
const SAMPLE = url => JSON.parse(UrlFetchApp.fetch(url).getContentText()).marketPrice;
References:
IMPORTDATA
REGEXEXTRACT
Custom Functions in Google Sheets
it's not possible to scrape JS content into google sheets:
Trying to pull data from one spreadsheet to another:
https://docs.google.com/spreadsheets/d/1LONz6rkyn4jM_aobSq1HIwjbeOXs2MhK6p_c_fNy8Wo/edit#gid=0
I need to pull data to the column Anchor from the Google sheet https://docs.google.com/spreadsheets/d/1H0g2FwZZbD6L33KOhuXakuRbWDsIWDNGburMZ3Tf4T4/edit#gid=0
Column C - Anchor
When using this formula =VLOOKUP(A2,IMPORTRANGE(“https://docs.google.com/spreadsheets/d/1H0g2FwZZbD6L33KOhuXakuRbWDsIWDNGburMZ3Tf4T4/edit#gid=0”,“Internal!$A$2:$E$1000”),3)
getting an error.
Will really appreciate your help
The problem is the quotes. Instead of “ ”, you should be using "".
Use the next formula
=VLOOKUP(A2,IMPORTRANGE("https://docs.google.com/spreadsheets/d/1H0g2FwZZbD6L33KOhuXakuRbWDsIWDNGburMZ3Tf4T4/edit#gid=0","Internal!$A$2:$E$1000"),3)
Or even shorter (You only need the ID)
=VLOOKUP(A2,IMPORTRANGE("1H0g2FwZZbD6L33KOhuXakuRbWDsIWDNGburMZ3Tf4T4","Internal!$A$2:$E$1000"),3)
Check columns J-K
I have 2 sheets 1st sheet contain email address and apps column A -> email and column B -> apps and the emails in column A are not unique they are repeated with different apps.
In 2nd sheet i am extracting the emails with unique formula and I want to have all the comments related to the email in single cell "," separated.
= =iferror(regexmatch(join(",",filter(Sheet1!$B$2:$B,Sheet1!$A$2:$A=$A2)),$C$1),"")This is how the table will look
But I have to manually drag the formula to the entire column and cannot use Ctrl+Shift+enter because the emails will be automatically be added. Thus want to use array formula. But I am not able to get the right array formula. Can anybody help.
What I'm basically doing is creating a whole column in a Google Form's answers Spreadsheet, with a formula within its cells such as this:
=hyperlink("https://docs.google.com/forms/d/e/FORM-ID/viewform?entry.ENTRY#1-ID&entry.ENTRY#2-ID="&A1&B1,"Update Data")
Where the:
FORM-ID is the identifier of the (parent) Google Form,
ENTRY#1-ID and ENTRY#2-ID are the items from the Google Form (accessed via the "Get pre-filled link"),
A1 and B1 are target fields within the Spreadsheet that contain the data to be pre-filled,
and "Update Data" is the displayed text within the Spreadsheet field.
Now, my problem is that A1 and B1 are both injected into ENTRY#2-ID, instead of A1 going into ENTRY#1-ID and B1 into ENTRY#2-ID respectively.
How can I explain to the hyperlink code to separate the entries? I cannot break the link into separate parts, and I cannot insert Spreadsheet field codes between the quotes.
Clever thought to pre-fill without script. I got it to work using the A1 & B1 references. The entry.835398034= and entry.2133553026 are from the prefill form url.
=hyperlink("https://docs.google.com/forms/d/e/1FAIpQLSdm6HaK-4qDEERngZh6Z6DH0_iT4uUjPMINVcBDu5pEiKH_Fw/viewform?entry.835398034="&A1&"&entry.2133553026="&B1,"Update Data")
Thanks for the idea.