Hello.
In Excel 2016 I have a Sheet with a range of cells with data and others cells with no data.
I have a code which works well in a cell with data.
However, I need to write the code into a loop to apply the code in all cells with data.
I've searched the web trying to find help on how to complete my script, but I just can't seem to get how to do it.
Any help is welcome
![]()
Sub lenInstrMid() Dim Z As String Dim X, y as Integer Z= Sheets(1).Cells(1,11) x= Len(Z) Y= Instr(Z, "_") Z= Mid(Z,1, y-1) Sheets(1).Cells(2,11) = Z End Sub
Bookmarks