Visar inlägg med etikett Formulas. Visa alla inlägg
Visar inlägg med etikett Formulas. Visa alla inlägg

torsdag 24 januari 2013

Language translation formula (Excel)

Excel formula that can translate From any language To any language.
Example: getGoogleTranslation("Do you speak English?";"en";"sv")

However this code has one limitation; it can only translate one sentence.


--
Public Function getGoogleTranslation(strSource As String, strSourceLang As String, strDestLang As String) As String
    Dim strURL As String, x As String

    strURL = "http://translate.google.com/translate_a/t?client=t&text=" & _
             Replace(strSource, " ", "%20") & _
             "&hl=en&sl=" & strSourceLang & _
             "&tl=" & strDestLang & "&multires=1&pc=0&rom=1&sc=1"

    With CreateObject("msxml2.xmlhttp")
        .Open "get", strURL, False
        .send
        x = .responseText
    End With

    getGoogleTranslation = Replace(Replace(Split(x, Chr(34) & "," & Chr(34))(0), "[", ""), """", "")

End Function
--

Source: link

tisdag 1 januari 2013

=N(OFFSET({array})) formula


Good to remember
Both N() and T() have other more important uses, they can be used to produce a usable array from Offset(Ref,{Array},0) that can be processed by other worksheet functions
Ex Assuming we have Text data from A1:A10
=Counta(Offset(A1,{1,5,6},0)) Array entered will give 1
However
=Counta(T(Offset(A1,{1,5,6},0))) will give 3
Like wise N() for numbers
Reference: link

söndag 3 augusti 2008

=Get.Cell() formula

The =GET.CELL() formula is an almost forgotten formula that still works.
It retrieves Cell properties, like Interior.CellColor, Has.Formula etc
This post explains how to use it.

UDF's (MyFormulas)

Tip:

AndrewsExcelTip.net has a Excel file full of simple UDF's. It is great for learning VBA.

For Common Forums questions: Toolbox of ExcelFormulas & UDF's