Is your range always 1 - 5? Is there a set number of columns or will it be dynamic? Is is always rows 1 - 10 only?
Edit: A guess
Sub RunMe()
Dim ws As Worksheet: Set ws = Sheets("Sheet1") 'you may need to change this
Dim iFind As Range
Dim icol As Long, iCount As Long
Application.ScreenUpdating = False
For icol = 1 To 9 'to 9th column
iCount = 2
Set iFind = ws.Range(Cells(1, icol), Cells(10, icol)).Find(What:="1", LookIn:=xlValues, Lookat:=xlWhole)
If Not iFind Is Nothing Then
Do
iFind.Offset(iCount - 1, 0).Value = iCount
iCount = iCount + 1
Loop Until iCount = 6 Or iFind.Offset(iCount - 1, 0).Row = 11
End If
Next icol
Application.ScreenUpdating = True
End Sub
Bookmarks