Avoid #VALUE! on empty cells when using GOOGLETRANSLATE function - google-sheets-formula

The idea is to enter a date in USA format (MM/DD) and it will automatically show the day of the week in spanish in another cell using code =googletranslate(TEXT(B9, "dddd"),"en", "es")
The thing is that empty cells are showing #VALUE!. How do I avoid this?
When using code =TEXT(B15, "dddd"), that doesnt happen, but it shows day of the week in english.
Because im using googlesheets, using code =TEXT(B22, "[$-0C0A]dddd") doesnt work to translate language.

=if(B9="","", googletranslate(TEXT(B9, "dddd"),"en", "es"))

Related

User facing date field granularity control

I'm trying to give my users the option to select the date field granularity of their choice, such as day, week, month or year. This is normally controlled on each graph in the menu show below but this isn't available in a published dashboard:
My first idea was to create a calculated field that truncates my desired date based on a parameter that I expose through a control. This would like something like this, truncDate(${intervalParameter}, {dateColumn}). The problem with this is that the first argument of the truncDate function must one of valid string literals and will throw an error before saving if it isn't.
Does anyone know of any other ways of achieving this? Or maybe some sneaky way of getting around the error?
I figured out a work around using ifElse.
ifElse(
${intervalParameter} = 'Day', truncDate("DD", {dateColumn}),
${intervalParameter} = 'Week', truncDate("WK", {dateColumn}),
${intervalParameter} = 'Month', truncDate("MM", {dateColumn}),
truncDate("DD", {dateColumn})
)
There might be better solutions out there but this is what I've come up with.

Kendo DateTimePicker, after parsing the Date the Year is Incorrect

Good Afternoon Fellow Code Monkey's
I'm new to StackOverflow, and Kendo UI programming. My problem is as follows. When trying to parse the date, and everything seems to work correctly until I get to the year portion.
here is my Javascript Code
$('#datepicker').kendoDatePicker({
format: 'MM dd yyyy',
parseFormats:['M/d/yy', 'MM/d/yy', 'MM/dd/yy', 'M/dd/yy', 'M/d/yyyy', 'MM/d/yyyy', 'MM/dd/yyyy','M/dd/yyyy','Mdyy','MMdyy', 'MMddyy', 'Mdyyyy', 'Mddyyyy', 'MMddyyyy', 'M-d-yy', 'MM-d-yy', 'MM-dd-yy', 'M-dd-yy', 'M-d-yyyy', 'MM-d-yyyy', 'MM-dd-yyyy', 'M-dd-yyyy']
});
Basically I want the user to be able to type the date into the Datepicker in any format, from 05052012 to 5/5/2012, etc and then the box formats. The above code for instance when entering "05052012" returns in the box 05 05 2020. Is there something wrong with how I have the year set up?
Thanks in advance,
SithApprentice
I think I have it figured out, seems sort of silly now. Apparently it has to do with the order in which I'm passing the formats with which I will be paresing. those with yy must come at the end, and those with yyyy must come at the beginning. I really wishTelerik mentioned this in their API Reference section for the date picker. From theier examples they make it seem like the order does not matter.

ImportXML Xpath Query Return txt

I need to use Google Spreadsheet ImportXML return a value from this website...
http://www.e-go.com.au/calculatorAPI2?pickuppostcode=2000&pickupsuburb=SYDNEY+CITY&deliverypostcode=4000&deliverysuburb=BRISBANE&type=Carton&width=40&height=35&depth=65&weight=2&items=3
the website simply displays the below in text and code...
error=OK
eta=Overnight
price=64.69
I need to return the values after last line 'price=', being a newbee I'm struggling with xpath query (?) required to make this happens...
=importxml("url",?)
Your help is greatly appreciated.
Thank you in advance.
Regards
first of all, IMPORTXML() won't work because your webpage is not formatted correctly for XML, and google sheets doesn't like it.
All hope is not lost tho, as your output is so simple. you can simply load the whole output using IMPORTDATA() and then process within google sheets
have a look at the output of the following formulae (where the url is stored in A1)
=IMPORTDATA(A1)
=transpose(IMPORTDATA(A1))
=index(IMPORTDATA(A1),3,1) - IF there are always 3 results, and price will always be in the third one this will work
=filter(IMPORTDATA(A1),left(IMPORTDATA(A1),5)="price") - if the price can appear in any of the result lines, but always starting with "price"

Possible to have a simple formula within the [value_if] argument? - excel

I'm trying to use a relatively basic IF function but having no luck - i'm sure i just have brackets or parenthesis wrong or something. Reckon it will be childsplay for you guys....
The formula is intended to show how many days a date has passed by. Date is shown in T column.
Basically it was working fine as the following, both for pending and past dates:
=IF(T7<=TODAY(), (TODAY()-T7),-(T7-TODAY()))
But I got greedy and wanted it to return more of a statement when the date has passed, as to how much it has passed by. So I've tried to make this happen with:
=IF(T7<=TODAY(),"EffOut(TODAY()-T7) days ago",-(T7-TODAY()))
Hoping it would enter "EffOut 8 days ago" (when TODAY()-T7 is 8 days) for example.
But it doesnt - it shows the entire argument i.e "EffOut(TODAY()-T7) days ago" in the return cell.
Is it possible to have a kind of embedded formula in the 'value_if' fields, mixed with text in this sense?
Happy to share the document if that would help, but will need to clear the data first so just let me know.
Thanks in advance, any help is much appreciated! Having read other posts I think it will just be a simple fix but its well beyond me! (I only got this far by perusing forums...)
Maybe something like this...
=IF(T7<=TODAY(),"EffOut "&DAYS(TODAY(),T7)&" days ago",-(T7-TODAY()))
=IF(T7<=TODAY(),"EffOut "&(TODAY()-T7)&" days ago",-(T7-TODAY()))
You just need to be careful to put "" around any strings. This is how Excel knows that's not a part of the formula. Remember to out the spaces is to the string like I did above so it looks like a sentence. The & sign combines the results of the calculated parts and the strings.

Validate Start Time With Current Date In Sharepoint?

I have a column called Start Time (it's a SharePoint Default Calendar Column). I need to validate if the Start Time is less than today or not? Without using javascript? Is this possible?
I have tried this:
Created a column called Today type as Date and Time.
Default value is current date.
Then compared the Start Time and Today in validation settings like the following:
=[Start Time] < [Today]
it seems not working. help please?
Try this code instead of yours
=[Start Time]<NOW()
I use this to validate that Start Date must be less than or equal to Today:
=[Start Date]<=Today()
...and it works for me.

Resources