View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Help finding the length of two different columns

contemplating that you could have data in the very last row of column A or B

Sub test()
With Sheet1
If .Cells(.Rows.Count, 1).Value < "" Then
RowA = .Rows.Count
Else: RowA = .Cells(.Rows.Count, 1).End(xlUp).Row
End If
If .Cells(.Rows.Count, 2).Value < "" Then
RowB = .Rows.Count
Else: RowB = .Cells(.Rows.Count, 2).End(xlUp).Row
End If
End With
End Sub




"willz99ta via OfficeKB.com" wrote:

Howdy,

Im trying to load two different dynamic arrays with two different column's
data.

One column could be different in size than the other and either column could
be as large as 60000 or as small as one.

What could I use to find the last row of column 1 and then use to find the
last row of column 2. I am trying to fill out the array ranges.

Thanks,

Will

--
Message posted via http://www.officekb.com