Results 1 to 4 of 4

Thread: Calculating in Excel with VB

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2004
    Posts
    5

    Question Calculating in Excel with VB

    It has been a while since i used VB, i need to create a code which helps in calculating number of rows in Excel and copy that number to a formula and then to do the calculation. The calculated number should be pasted in different excel file and then the formula which exists need to have this number for calculation, could u please advice on this..

    Thanks

  2. #2
    Addicted Member
    Join Date
    Aug 2002
    Location
    Luton, UK
    Posts
    178
    To calculate rows, choose a column that has something in the last row and use something like :=
    MyRowCount = ActiveSheet.Range("A65536").End(xlUp).Row

    As for the rest, I suggest you use the macro recorder to get some code and copy/paste to a new message with a note of any problems you get running it.
    Regards
    BrianB
    -------------------------------

  3. #3

    Thread Starter
    New Member
    Join Date
    Jan 2004
    Posts
    5
    Hello Brian,

    Thanks for the information, but what I wanted to know was that even though if I donno the range (b'coz i don't wnat to open the excel sheet)it automatically calculate the range where the data is present and put that range in VLookup formula which can be used for calculation..

    Thanks

  4. #4
    I don't do your homework! opus's Avatar
    Join Date
    Jun 2000
    Location
    Good Old Europe
    Posts
    3,863
    If you don't open to file, you don't have the data, and you don't have the VBA-code (since it would be part of a EXCEL-file).
    You're welcome to rate this post!
    If your problem is solved, please use the Mark thread as resolved button


    Wait, I'm too old to hurry!

Posting Permissions

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



Click Here to Expand Forum to Full Width