Hello Excel gurus,

I'm working a bit with recording macros. So, just simple "start recording->click away->stop recording" stuff.
I am trying to do the following:

1. Insert a formula in field. Let's say column C is the sum of column A+B. So I click on C1 and type in the formula =SUM(A1:B1)
2. I drag the formula from C1 all the way down to the end of the table. When I say end of the table, I mean "the last row that contains some data in columns A/B)"

The problem: When I record the macro with 10 lines in my sheet, and I execute the macro, I will get the formula copied for 10 lines. Fine. But.. the length of my table may vary. It may be 20, 30 or 1000 lines. So how do I tell the macro to "copy the formula in C1 all the way down till the last valid row?"

Thank you