I have code that I use to check the first column length and then check the last column length and then set the finalrow to the length of the longer of the two:

[VBA]finalRow = Cells(Rows.Count, "A").End(xlUp).Row
finalColumn = Cells(1, 100).End(xlToLeft).Column
finalRowLast = Cells(Rows.Count, finalColumn).End(x1up).Row
If finalRowLast > finalRow Then finalRow = finalRowLast[/VBA]

However, I can't get it to work. It seems so simple but I can't figure it out.