Forum Discussion

sophiekatchu's avatar
sophiekatchu
Copper Contributor
Apr 01, 2022
Solved

is there a fast way to match my "cell content" to the "row number"

Hello guys, please help me 😞 is there a fast way to match my "cell content" to the "row number"? TT_TT Ex: the ones with the yellow Highlight my "cell content" 326 matches with the "row numb...
  • OliverScheurich's avatar
    Apr 01, 2022

    sophiekatchu 

    In the attached file you can click the button in cell H2 to start the macro. Maybe this is what you are looking for.

     

    Sub rownumber()
    
    Dim i As Integer
    Dim z As Integer
    
    For i = 1 To 1000
    
    If Cells(i, 1).Value > 0 Then
    
    z = Cells(i, 1).Value
    
    Cells(z, 5).Value = Cells(i, 1).Value
    Cells(z, 6).Value = Cells(i, 2).Value
    
    Else
    End If
    
    Next i
    
    End Sub

Resources