Djblois
02-13-2007, 09:55 AM
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:
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
However, I can't get it to work. It seems so simple but I can't figure it out.
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
However, I can't get it to work. It seems so simple but I can't figure it out.