Finding the last nonblank cell in a column in VBA or VSTO
Folks,
In VBA I have frequently used the formula:
last_row = ActiveWorkbook.Sheets("Sheet1").Range("A65534").En d(xlUp).Row
to find the last cell with data in it in column A of Sheet1.
In Visual Studio Tools for Office (C#) the equivalent expression I have just
discovered is:
Sheet1.get_Range("A65534", Type.Missing).get_End(Excel.XlDirection.xlUp).Row
--
Bob Sullentrup
|