Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
translating formulas
I am using the code below to translate worksheet formulas to the locale
language. For some formulas this works fine (e.g. SUM), but for others it doesn't (e.g. MOD). Can anybody explain me why?? Using Excel XP. Thanks for any responses. Luc ********* start of sample code ****************** Public Sub Test_Successful() ActiveSheet.Range("A1").Formula = TranslateFunction("=SUM(B1:B2)") End Sub Public Sub Test_Fails() ActiveSheet.Range("A1").Formula = Translate("=MOD(ROW(),2)=0") End Sub Private Function Translate(funcUS As Variant, Optional wb As Workbook) As Variant Dim sheet As Worksheet If wb Is Nothing Then Set wb = ActiveWorkbook End If Set sheet = wb.Sheets.Add sheet.Visible = False sheet.Range("A1").Formula = funcUS TranslateFunction = sheet.Range("A1").FormulaLocal Application.DisplayAlerts = False sheet.Delete Application.DisplayAlerts = True Set sheet = Nothing End Function |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Translating | Excel Discussion (Misc queries) | |||
translating lotus 123 formulas into excel | Excel Worksheet Functions | |||
Translating formulas | Excel Discussion (Misc queries) | |||
Translating spreadsheet formula to VBA | Excel Programming | |||
Overflow when translating from C++ HELP!! | Excel Programming |