+ Reply to Thread
Results 1 to 4 of 4

general programming question about "how to do somethings"

  1. #1
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,712

    general programming question about "how to do somethings"

    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.
    Last edited by welchs101; 05-29-2011 at 10:05 AM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,249

    Re: general programming question about "how to do somethings"

    I think you'll find, and should probably know after 316 posts, your thread title does not comply with the forum rules.

    Consequently, you can expect few responses other than from the moderators who are likely to fall on you like a ton of bricks.

    A sample workbook is generally the most effective way of describing your issues.

    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,712

    Re: general programming question about "how to do somethings"

    my appologies..........wont happen again! is there a way to delete this thread?

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,249

    Re: general programming question about "how to do somethings"

    Not AFAIK. You could ask the moderators.

    Regards

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1