Hello everybody,
I am working on a very big excel sheet, which has more than 8000 columns. I managed to write a macro that copies a function on a column (skipping a protected cell).
Sub CopyToUnlocked()
Dim cell As Range, MyRange As Range, SelRange As Range
Set MyRange = Range("MY5:MY8539")
For Each cell In MyRange.Cells
If Not cell.Locked Then
If Not SelRange Is Nothing Then
Set SelRange = Union(cell, SelRange)
Else
Set SelRange = cell
End If
End If
Next cell
Range("MY4").Copy SelRange
End Sub
This macro is ok for me, however I would like to create a loop that repeats the function from colmumn MY to column LPJ keeping the row numbers constant.
Could someone help me? Thank you!
Bookmarks