Jan 25 2022 08:31 PM
hello
i have a question, like i want to find last row number in a used range so when i use this code
Debug.Print ActiveSheet.UsedRange.Cells(rows.count, 5).End(xlUp).Row
it gives an error, although rows.count should give 1048576
but when i use
Debug.Print ActiveSheet.UsedRange.Cells(1000000, 5).End(xlUp).Row it works fine and gives a number
why is that? please advise
Jan 25 2022 09:04 PM
SolutionJan 25 2022 09:04 PM
Solution