>>>I don't know, I get them by simple using MsgBox(xlByRows) in Excel Macro Editor :o)
>>>I'am just working for search and fromat row when found. When I finish, I'll let you know. After that I'll try Cetin's code. I am sure it is working somehow :o)
>>
>>I don't know, this conditional formatting was not saved for me. E.g. when I made Excel visible I saw the formatting for that column, but after I closed the file the formatting was gone. The REPLACE works fine, e.g. it changes formatting of the TOTALS word just fine. May be it's an easier approach?
>
>I was s sure that Catin's code shoud works :o) and voila it works:
>He just has a little typo in his code:
>
>oExcel.Range([A1], oExcel.Selection.SpecialCells(xlLastCell)).Select
>oExcel.Selection.FormatConditions.Delete
>oExcel.Selection.FormatConditions.Add(xlExpression,, '=UPPER(Right($A1;6))="TOTAL:"')
>
>With oExcel.Selection.FormatConditions(1)
> .Font.Bold = .T.
> .Interior.ColorIndex = 4
>Endwith
>
This doesn't work for me. Returns an error about parameter is incorrect.
If it's not broken, fix it until it is.
My Blog