1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: Excel Macro - Upload Workbook value from Another Workbook based on ID

Discussion in 'Business Applications' started by zr3cool, Aug 16, 2013.

Thread Status:
Not open for further replies.
Advertisement
  1. zr3cool

    zr3cool Thread Starter

    Joined:
    Jun 11, 2010
    Messages:
    73
    Hello Everyone

    I am having some difficulties finding a solution to my problem. I am hoping someone can help or lead me to the right direction.

    I have a workbook called Data.xlsm, below is a sample:

    ID, Name, commission
    1 john 1000
    2 eric 2000
    3 ryan 3000

    Now I have another excel file called Temp.xls which looks pretty much the same as Data.xlsm.

    ID, Name, Commission
    1 john 200
    2 eric 300

    I need a macro that will read the Temp.xls and grab the commissions and bring them to Data.xlsm. The commissions need to be summed based on ID.

    The final Result on Data.xlsm should be as follows:
    1 john 1200
    2 eric 2300
    3 ryan 3000

    Any help would be greatly appreciated.

    Thank you
     

    Attached Files:

  2. Keebellah

    Keebellah Trusted Advisor

    Joined:
    Mar 27, 2008
    Messages:
    6,580
    First Name:
    Hans
    Just a quick and dirty solution

    Make sure you place this in the same folder as your Temp.xlsm file and press the button

    It will open Temp
    update the data, if a new Id is in Temp it will add the data and set the commission values in Temp to 0 to avoid running it twice.

    I hope the code explains itsefl.

    Think of a macro of a step by step instrcution as you would say it out loud.
     

    Attached Files:

  3. zr3cool

    zr3cool Thread Starter

    Joined:
    Jun 11, 2010
    Messages:
    73
    Keebellah,

    This is exactly what I needed. I thank you very much, you are great :)
     
  4. Keebellah

    Keebellah Trusted Advisor

    Joined:
    Mar 27, 2008
    Messages:
    6,580
    First Name:
    Hans
    You're welcome,, please use the 'Mark Solved'button to close the post :)
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1106168

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice