Formula in macro
Posted by sean tobin on July 27, 2001 4:45 PM
I've got a macro that needs to sum a varying amount of rows. By "varying" I mean, the macro is used once a month but each month there are a different number of rows. I need the formula to be in the cell below the last row of data. I.e., this month there are, say, 400 rows. The formula in this case needs to sum D1:D400 and place the result in D401. Next month there might be 300 rows. How do I get the formula to sum just the rows that are there. It keeps wanting to hard-code the cells to be summed.