On a monthly basis, I run several reports where the same editing formulas formatting and cross referrencing is required. So it makes sense that I would want to create macros to carry out these specific functions on a regular basis. I've done no VBA in the past so my preferred methodology would be to simply record a macro and have it be executable when I drop the new Data in. However, I seem to be running into the same problem when I attempt to do this. If I can figure out a simple way to correct this via VBA I could then significantly reduce my monthly tasks. The issue is that I get a sales report, and there are standard column headers but a varied number of Rows.
IE
Account number Sales Part Part Type
222222 $1.00 22 Router
What I want to do is insert a new column and every time router occurs insert the word "Network Product"
A simple =if($D2="Router","Network Product", "non-Network Related")
I would then double click the corner of that cell to have it fill in the rest of the Rows, with Network or non-Network Related.
If I take the same data and run the macro it has no issue doing this.
However when I run a different report that has 600 Rows rather then 588 the formula does not copy down Past 588, and in the interest of completly automated I wonder what the code string I could add in to the recorded macro via VBA to have it copy to the last row and no further.
Can anyone offer some suggestions? Or perhaps the way to go is have the macro only add one rows formula and then have to continue to copy the formula manually?
I appreciate any insight.
Jason
Bookmarks