Oprichnick
Board Regular
- Joined
- May 30, 2013
- Messages
- 69
Hy All,
I'm having trouble finding a way to find the last cell in column ignoring formulas.
Honestly I found some pieces of code in a already existing thread in this forum.
I tried this one I found, but returns error
Thanks in advance.
Regards
I'm having trouble finding a way to find the last cell in column ignoring formulas.
Honestly I found some pieces of code in a already existing thread in this forum.
I tried this one I found, but returns error
Code:
Dim oneArea As Range, finalCell As RangeSet finalCell = ActiveSheet.Range("a1")
For Each oneArea In ActiveSheet.Cells.SpecialCells(xlCellTypeConstants).Areas
With oneArea
If finalCell.Column < .Column + .Columns.Count - 1 Or _
finalCell.Row < .Row + .Rows.Count - 1 Then
Set finalCell = .Parent.Cells(.Row + .Rows.Count - 1, .Column + .Columns.Count - 1)
End If
End With
Next
Thanks in advance.
Regards