As I learn more about vba programming and learn more about excel in general I find better ways of doing things. But I did have a series of questions regarding excel vba programming approach.
I have a file. I need to append to this file 4 columns. In these 4 cols I add formulas to help me calculate things. Now I am doing all of this via vba and what I am finding is that if I want to make the formula I add “robust” its taking me a long time to code.
For example: Lets say that in the first col I add I want to calculate the difference between A2-B2. Also, I have a programming requirement that the header in col A can be anywhere in the file it just so happens that in this file its “A” so I have to do a search for the exact col header and the same is true for data in col B………….it just so happens that in this input file its in colB but could be anywhere in the next file.
Whats the best way to handle this?
Another scenario is the ranges? For one file the range of the data may be A1:Z15 and in another file the range maybe A1:z100. Now again I am adding formulas and at the end of the file in cols and like the header example above I have to input these ranges into the formula and its taking a long time.
Whats the best way?
I know I have not given an example file here to show you guys what I mean and I may actually do this if needed but any advice you guys can give would be appreciated.
Again, I am learning excel and exce-vba more and more the more I do it but I am NOT an expert….slightly above a novice.
Bookmarks