ich würde folgendes gerne lösen ich will von meiner aktiven Zelle aus gehend die zeile nach rechts durchsuchen bis ich auf die erste zelle treffe bei der eine 0 eingetrage ist
danke
Dim lloCol As Long
With ActiveCell
For lloCol = .Column To Cells(.Row, Columns.Count).End(xlToLeft).Column
If Cells(.Row, lloCol).Value "" And _
Cells(.Row, lloCol).Value = 0 Then
Application.Goto Cells(.Row, lloCol)
Exit For
End If
Next
End With
Hilfts?
Option Explicit
Sub test()
Dim i, objCell As Range
Const MATCH_VALUE = 0 ' Suchwert
i = Application.Match(MATCH_VALUE, ActiveCell.Resize(, ActiveSheet.Columns.Count - _
ActiveCell.Column), 0)
If IsError(i) Then MsgBox MATCH_VALUE & " wurde nicht gefunden": End
Set objCell = ActiveCell.Offset(, i - 1)
Application.Goto objCell
End Sub
Grüße