im2bz2p345
Board Regular
- Joined
- Mar 31, 2008
- Messages
- 229
Hello VBA Experts,
I had received some *excellent* help from daverunt & MrKowz regarding automating a process on a worksheet for a project at my job: http://www.mrexcel.com/forum/showthread.php?t=528448
I have a similar project, which I would like some VBA coding help with.
We have a bunch of ROIC calculation files for each business unit of my company. The path to the folder which contains all of these files is: O:\Shared Svcs Acctg\_Close 2011\All\03 Mar\ROIC Calculation. Here is a screenshot showing these files: http://ploader.net/files/95bcf8a341337872adc4e406035f654d.png
I want to be able to use these ROIC files and update columns AL-AO in my master file (called "ROIC Historical Payout Detail"). Here is a screenshot of my master file: http://ploader.net/files/f2f6fbc15e328ef4be11dcdcec763bc7.png
Notice that in my master file, there are business units in column A. I need to able to use each of these business units (i.e. 16122), then automatically look for a file with that specific business unit in it's name (ROIC_bonus_calc_16122_2011 2011-03-28 16122.xls). Once it's found, open it up, and calculate the following information. Here is an example of a source file: http://ploader.net/files/c6a256d09b0faebb5b07173b48487bee.png
2011 Pre Tax Cash Flow (Column AL in master file) = In source file: Pre-Tax Cash Flow/# of working days in the year. It would be nice if it could lookup the words "Pre-tax Cash Flow" in Column B and use the number in Column C associated with that row. For the # of working days, if it could lookup "S0998" in Column D and use the number in Column C associated with that row.
If I could just be shown how to do this for one of the calculations, I could probably figure out the rest on my own.
The biggest way this differs from my previous project is that I need to able to run this monthly on it's own. So in my master file, I want to able to change the date in column AM (right now it says 3/31/2011). The path where the ROIC files are being pulled from should automatically changed based on this date (I have highlighted the part that needs to change based on the month - O:\Shared Svcs Acctg\_Close 2011\All\03 Mar\ROIC Calculation). The "03" stands for March being the 3rd month and the month is always going to be abbreviated by the first 3 letters (i.e. April will be Apr).
I know this sounds like a lot, but it really not that bad, my biggest difficulty is figuring out how to open specific files based on the BU and the path issue that I described above.
Please let me know if any clarification is needed,
~ Im2bz2p345
I had received some *excellent* help from daverunt & MrKowz regarding automating a process on a worksheet for a project at my job: http://www.mrexcel.com/forum/showthread.php?t=528448
I have a similar project, which I would like some VBA coding help with.
We have a bunch of ROIC calculation files for each business unit of my company. The path to the folder which contains all of these files is: O:\Shared Svcs Acctg\_Close 2011\All\03 Mar\ROIC Calculation. Here is a screenshot showing these files: http://ploader.net/files/95bcf8a341337872adc4e406035f654d.png
I want to be able to use these ROIC files and update columns AL-AO in my master file (called "ROIC Historical Payout Detail"). Here is a screenshot of my master file: http://ploader.net/files/f2f6fbc15e328ef4be11dcdcec763bc7.png
Notice that in my master file, there are business units in column A. I need to able to use each of these business units (i.e. 16122), then automatically look for a file with that specific business unit in it's name (ROIC_bonus_calc_16122_2011 2011-03-28 16122.xls). Once it's found, open it up, and calculate the following information. Here is an example of a source file: http://ploader.net/files/c6a256d09b0faebb5b07173b48487bee.png
2011 Pre Tax Cash Flow (Column AL in master file) = In source file: Pre-Tax Cash Flow/# of working days in the year. It would be nice if it could lookup the words "Pre-tax Cash Flow" in Column B and use the number in Column C associated with that row. For the # of working days, if it could lookup "S0998" in Column D and use the number in Column C associated with that row.
If I could just be shown how to do this for one of the calculations, I could probably figure out the rest on my own.
The biggest way this differs from my previous project is that I need to able to run this monthly on it's own. So in my master file, I want to able to change the date in column AM (right now it says 3/31/2011). The path where the ROIC files are being pulled from should automatically changed based on this date (I have highlighted the part that needs to change based on the month - O:\Shared Svcs Acctg\_Close 2011\All\03 Mar\ROIC Calculation). The "03" stands for March being the 3rd month and the month is always going to be abbreviated by the first 3 letters (i.e. April will be Apr).
I know this sounds like a lot, but it really not that bad, my biggest difficulty is figuring out how to open specific files based on the BU and the path issue that I described above.
Please let me know if any clarification is needed,
~ Im2bz2p345