versuche das mal so.
cu, Bernd
--
Code: Alles auswählen
REM ***** BASIC *****
Option Explicit
Sub Main
dim oSheet as Object
dim i as Long, iMax as Long
oSheet = ThisComponent.currentController.ActiveSheet
iMax = getLastRowInColumn(oSheet, 2) ' 0 = A, 1 = B, 2 = C
for i = 0 to iMax
if oSheet.getCellByPosition(2, i).String Like "*10*" then
oSheet.getCellByPosition(0, i).string = "Änderung"
endif
next
End Sub
Function getLastRowInColumn(oSheet as Object, iColumn as integer) as Long
dim oUsedCells as Object
oUsedCells = oSheet.Columns(iColumn).queryContentCells(23)
getLastRowInColumn = oUsedCells.RangeAddresses(oUsedCells.Count-1).endRow
End Function