What are the columns in the sheet for this calculation?
I tried it again with just the signed up date, the age at onboarding and age now with an input that is today.
What are the columns in the sheet for this calculation?
I tried it again with just the signed up date, the age at onboarding and age now with an input that is today.
Here is my sheet: https://docs.google.com/spreadsheets/d/1jHcupLt5MoSTD2jSa80cUfUQLRH1AXyJYIbWG_L_dCM/edit?usp=sharing
I added an IFERROR logic so that when the date is today, it returns 0.
Wow, thanks! You’re a true hero
Hi @ThinhDinh, thanks again for this tutorial.
If we use arrayformula with a “script” (that I copied-pasted without understanding anything to it ), it does not seem to work.
I found a complement to add to the original script, but it does not seem to work either: is it the proper way to go or do you recommend something else? (for instance, your “When arrayformula doesn’t work” part)
function companylogosite(companyname) {
if (companyname.map) { // Test whether input is an array.
return companyname.map(companylogosite); // Recurse over array if so.
} else {
var url = “https://autocomplete.clearbit.com/v1/companies/suggest?query=” +
var response = UrlFetchApp.fetch(url);
var json = response.getContentText();
var data = JSON.parse(json);
return [[data[0].domain, data[0].logo]];
}
}
Thanks.
So you’re trying to fetch JSON data?
Yes I suppose that it’s the tech word.
I’m trying to collect automatically “www” + “logo” from a company name entered in G-Sheet.
For this, I will use: https://autocomplete.clearbit.com/v1/companies/suggest?query=
It works well, but not with ‘Arrayformula’… hence the piece of code I’ve been proposed to add to the code above:
if (companyname.map) { // Test whether input is an array.
return companyname.map(companylogosite); // Recurse over array if so.
} else
What error did it throw back when you use it?
Hi @ThinhDinh, thanks for this tutorial.
My pleasure, let me know if I can help more.
When I launch the function “companylogosite” alone, it works.
When I try to put it in arrayformula, it fails:
To make it clearer, the script I used was for copying the formulas down when array doesn’t work. Seems like you’re trying to use arrayformula with a custom function, which won’t work as well.
OK thanks, so if I understand well, there is no approach to simulate an arrayformula for ‘custom functions’ (script)?
Thanks
The way to do it is to call your custom function in row 2, then use the script in the post to copy it down when there’s a new row.
Of course! (with a column value, is that it?)
You must do it all in your sheets, set up the script and create a trigger for it.
Thank you for this!!!
Hope it helps, do let me know if you need any assistance for this.
You made my day with this script @ThinhDinh. I had worked on it for hours before I saw this. Thank you!
My absolute pleasure to help. Do let me know if you need more assistance.