ich habe eine Bsp.: Datei mit meinem Problem angehängt
https://www.herber.de/bbs/user/93063.xls
Für jede Hilfestellung würde ich mich sehr freuen.
Vielen Dank im Voraus!
MFG Andre
Sub t()
If WorksheetFunction.CountIf(Columns(3), Range("AT1")) = 0 Then
MsgBox "Suchkriterium aus Zelle AT1 ist nicht vorhanden"
Else
Dim lZeile As Long
lZeile = Application.Match(Range("AT1"), Columns(3))
If Cells(lZeile, 46) 0 Then
Range(Cells(lZeile, 46)) = "x"
Cells(lZeile, 46) = 0
Else
Range(Cells(lZeile, 25), Cells(lZeile, 44)).ClearContents
Cells(lZeile, 46) = "AA1"
End If
End If
End Sub
Sub xSchreiben()
With Sheets("Test")
.Cells(ZE, Columns.Count).End(xlToLeft).Offset(0, 1) = "x" '
If .Cells(ZE, 26) = "0" Then
.Range(.Cells(ZE, 27), .Cells(ZE, 46)).ClearContents
End If
End With
End Sub