Range.Find can be used to return the last row whether or not there are hidden rows.
Function GetPrimeraFilaLibre(paramNombreHoja As String, paramColumnaReferencia As String) As Long
With Sheets(paramNombreHoja).Columns(paramColumnaReferencia)
GetPrimeraFilaLibre = .Find(What:="*", After:=.Cells(1, 1), LookAt:=xlPart, LookIn:=xlFormulas, SearchOrder:=xlByRows, SearchDirection:=xlPrevious, MatchCase:=False).Row
End With
End Function
Function GetLastRow(SheetName As String, ColumnNameOrIndex As String) As Long
With Sheets(SheetName).Columns(ColumnNameOrIndex)
GetLastRow = .Find(What:="*", After:=.Cells(1, 1), LookAt:=xlPart, LookIn:=xlFormulas, SearchOrder:=xlByRows, SearchDirection:=xlPrevious, MatchCase:=False).Row
End With
End Function
Addendum
As VBasic2008 pointed out, we would need to make an adjustment to handle MergedCells.
Function GetLastRow(SheetName As String, ColumnNameOrIndex As String) As Long
Dim Target As Range
With Sheets(SheetName).Columns(ColumnNameOrIndex)
Set Target = .Find(What:="*", After:=.Cells(1, 1), LookAt:=xlPart, LookIn:=xlFormulas, SearchOrder:=xlByRows, SearchDirection:=xlPrevious, MatchCase:=False)
End With
GetLastRow = Target.MergeArea.Rows.Count + Target.Row - 1
End Function