Hello all....

I'm not sure if I'm posting this question in the right forum. My apologies, if I am in error.

Do I use VBA, or create a function (to be called by an event), to do the following:

I have a worksheet that has formulas in (A6:AD200). The formulas populate the worksheet with data from a hidden worksheet. Currently, the worksheet contains data down to row 120. I wanted the worksheet to be expandable, in the event that data was added to the hidden worksheet. Therefore, the formulas were copied down to row 200...(plenty of room for potential expansion). The worksheet is also formulated and conditionally formatted to handle any reduction in data on the hidden worksheet...(i.e.: If data only extends to row 100...then formatting will be removed from rows 101 to 120).

Here is what I need to do:

I need to determine the Last Row in the Range, and place a THICK BLACK BORDER at the bottom of each cell in that row.
At the same time...I would like the print area of the worksheet to be set to (A1:AD"?")...(the ?, obviously, representing the LAST ROW).

I would like this procedure executed upon opening of the workbook.

My problem, as you might have guessed, is that Excel defines LAST USED CELL CONTAINING DATA as any cell containing HARD data, FORMULA-DERIVED data, or even FORMULAS alone. How do I get Excel to ignore formulas when determining the last used cell in a range?

Do I create a FUNCTION to get the Row Number...and then CALL that function in a subroutine that applies the bottom border and sets the print area?? Or...is there a subroutine that I can create that will be performed when the workbook is opened??