I am new to excel programming and macros...I am trying to create a macro that will extract data in certain fields and cells, into another sheet. Right now, my approach has been using the recorder functionality to record the steps required to carry out the task. However, I have run into a snag...I have data for different months in the year and each one of them has a different number of rows, to correspond with the number of days in each month. Right now, when I do the recorder for a month that has 31 days, I record 31 rows, but when i try to run the macro for a month that is less than 31 days, i get extra data from the last 31 one day month...filling in the extra days up to 31. As an example, when I run the macro for march data, I get the complete 31 rows. When I then run it for Aprils' data, I still get the extra 31st row with the data from march on there. Rows 1 through 30 will have Aprils' data, but row 31 still shows up...with the data for march.
I guess my question is this...is there a way to program this to auto detect how many rows are available on the sheet that holds the raw data? That way, it can always grab the right number of rows for each month...and only those days for that particular month?
I guess my question is this...is there a way to program this to auto detect how many rows are available on the sheet that holds the raw data? That way, it can always grab the right number of rows for each month...and only those days for that particular month?