+ Reply to Thread
Results 1 to 4 of 4

Code for adding 2 numbers from another WB

  1. #1
    Registered User
    Join Date
    07-03-2013
    Location
    Norway
    MS-Off Ver
    Excel 2010
    Posts
    89

    Code for adding 2 numbers from another WB

    Hi,
    I have a code that opens another WB, and gather data from it. most of the lines look like this
    HTML Code: 
    However i need it to gather the sum: M49+M50, how can i do this without importing both values and then adding them in a 3rd column, like i am currently doing

  2. #2
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,527

    Re: Code for adding 2 numbers from another WB

    Hi siggisigg,

    This will put the result in a message box - use the dblMyVal variable for whatever purpose you need:

    Please Login or Register  to view this content.
    HTH

    Robert
    ____________________________________________
    Please ensure you mark your thread as Solved once it is. Click here to see how
    If this post helps, please don't forget to say thanks by clicking the star icon in the bottom left-hand corner of my post

  3. #3
    Registered User
    Join Date
    07-03-2013
    Location
    Norway
    MS-Off Ver
    Excel 2010
    Posts
    89

    Re: Code for adding 2 numbers from another WB

    I just need it to be put in the first row without data in column K. Do i need to make a variable as a temp. holder to do it ?

  4. #4
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,527

    Re: Code for adding 2 numbers from another WB

    Try this:

    Please Login or Register  to view this content.
    Or via my variable method:

    Please Login or Register  to view this content.
    Robert

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Adding Text to another cell VB code (Help Tweeking code) (Excel 2007)
    By Excelnoub in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-06-2012, 11:37 AM
  2. [SOLVED] Adding XML kind of code in Exce; VBA Code module
    By karthisankaran in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-05-2012, 11:17 PM
  3. Replies: 2
    Last Post: 03-17-2011, 08:55 PM
  4. Code writes decimal numbers next to each other instead of adding
    By ppataki in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-04-2009, 10:25 AM
  5. adding area code to phone numbers
    By djarcadian in forum Excel General
    Replies: 6
    Last Post: 04-09-2008, 03:18 PM

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