The following snipet code utility works in English according to the Excel version, but when you try to run this code in the same book in the Portuguese version of Excel, this leads to errors.
' Add color bars on every other row - attempt to make list ' easier to read. ' "PlaceAt" is a worksheet range passed into the function With Range(PlaceAt.offset(1, 0), PlaceAt.offset(i + 1, 7)) .FormatConditions.Add Type:=xlExpression, Formula1:="=MOD(ROW(),2)=1" .FormatConditions(1).Interior.ColorIndex = 20 End With
I believe the problem is that in Portuguese, the ROW function is written LIN (not sure what the MOD function will be), and that since the function is inserted using vba, the Excel translation function is not able to translate function names, as usual, when opening a document.
Any ideas?
vba excel-vba excel
David showalter
source share