surlybiker
New Member
- Joined
- Jul 1, 2011
- Messages
- 14
I'm not even sure if this is possible, but here goes.
Here is my particular need in a nutshell: Is there a way for a macro to look at a worksheet (entitled "Sheet1" which is the first sheet in a workbook entitled "Sheet_1.xls"), find the last row of data, and then replace three particular numbers in the VBA code of another workbook (entitled "Sample.xlsm") with the sum of that "last row of data" number and 17.
An example: if the last row of data on Sheet1 is 350, the macro would look within existing macro code (of the Sample.xlsm workbook) and find the numbers 4997, 4998, and 5008 and replace them with 367, 368, and 378, respectively. If the last row was 3,100, it would find and replace those numbers (4997, 4998, and 5008) with 3117, 3118, and 3128.
It is likely that, being an amateur, my existing code is extremely poorly written. However, in the event my request is even possible, I thought I'd throw it out there.
Thanks so much for the help!
Here is my particular need in a nutshell: Is there a way for a macro to look at a worksheet (entitled "Sheet1" which is the first sheet in a workbook entitled "Sheet_1.xls"), find the last row of data, and then replace three particular numbers in the VBA code of another workbook (entitled "Sample.xlsm") with the sum of that "last row of data" number and 17.
An example: if the last row of data on Sheet1 is 350, the macro would look within existing macro code (of the Sample.xlsm workbook) and find the numbers 4997, 4998, and 5008 and replace them with 367, 368, and 378, respectively. If the last row was 3,100, it would find and replace those numbers (4997, 4998, and 5008) with 3117, 3118, and 3128.
It is likely that, being an amateur, my existing code is extremely poorly written. However, in the event my request is even possible, I thought I'd throw it out there.
Thanks so much for the help!