I'm writing a macro to apply some simple functions (copy, paste, sort, etc) to a sheet of data. My problem is that the number of rows in this sheet will vary for each occassion I want to apply the macro. Can someone please tell me how to instruct a function to first calculate the number of rows of data present, and then to use that value (e.g. 20,000 rows) to set the range upon which the function willl operate (e.g. A1:G20000 in this case)?
Thanks very much!
Thanks very much!