+ Reply to Thread
Results 1 to 12 of 12

Writing a macro to capture values on one spreadsheet and add them to totals on another

  1. #1
    Registered User
    Join Date
    08-31-2017
    Location
    Greeley Colorado, United States
    MS-Off Ver
    Office 365
    Posts
    14

    Writing a macro to capture values on one spreadsheet and add them to totals on another

    Production Sheet dropbox link:
    https://www.dropbox.com/s/vi2zpdo86e...T%29.xlsm?dl=0
    Extrusion Tracking Dropbox link:
    https://www.dropbox.com/s/5rn7wcsy62...TEST.xlsx?dl=0
    On the Production Sheet, cells K3 through K5 will contain scrap values. Cells I3 through I5 contain operators names in drop down menus.
    I need totals from K3:K5 combined with values in column P on the Extrusion Tracking sheet. I need the total to go to the row with the corresponding name from the Production Sheet cells I3:I5.
    The Extrusion tracking spreadsheet lives out on our server and is usually not open. The pathway is:
    "\\RWCAD\Dashboards\Extrusion Tracking TEST.xlxs"

    I'm still new to VBA and don't know how to pull this one off.

    Here's what I tried, but not working.

    Please Login or Register  to view this content.
    Last edited by ghostbroker2; 09-05-2017 at 10:18 AM.

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Writing a macro to capture values on one spreadsheet and add them to totals on another

    Well - I've shortened the code - but, what isn't working?

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Writing a macro to capture values on one spreadsheet and add them to totals on another

    BTW:

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Click on Edit to open your thread, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

  4. #4
    Registered User
    Join Date
    08-31-2017
    Location
    Greeley Colorado, United States
    MS-Off Ver
    Office 365
    Posts
    14

    Re: Writing a macro to capture values on one spreadsheet and add them to totals on another

    It seems to be successful in capturing the value in K3 and moving the total to the appropriate place.
    Is there a way to expand this functionality to cells K:4 and K:5, if there is a value there, and an Operator name in I:4 and/or I:5?

  5. #5
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Writing a macro to capture values on one spreadsheet and add them to totals on another

    You should be getting the sum of K3-K5 if you're getting one you should get them all

  6. #6
    Registered User
    Join Date
    08-31-2017
    Location
    Greeley Colorado, United States
    MS-Off Ver
    Office 365
    Posts
    14

    Re: Writing a macro to capture values on one spreadsheet and add them to totals on another

    I don't think the sum is where we want to go...
    As each of those cells (k3-k5) need to have their total go to the operator in the dropdown menus... cells I3, I4 & I5

    Of course, I can't thank you enough for helping me through this.

  7. #7
    Registered User
    Join Date
    08-31-2017
    Location
    Greeley Colorado, United States
    MS-Off Ver
    Office 365
    Posts
    14

    Re: Writing a macro to capture values on one spreadsheet and add them to totals on another

    But using what you've shown me here, I applied a little brute force and copied this twice, once for I4 and once for I5 (and their corresponding totals). It is doing what I want, just a little clunky... takes a while, lots of screen flicker.

  8. #8
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Writing a macro to capture values on one spreadsheet and add them to totals on another

    Hi ghostbroker,

    You're welcome and thanks for the rep!

    Maybe:

    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    08-31-2017
    Location
    Greeley Colorado, United States
    MS-Off Ver
    Office 365
    Posts
    14

    Re: Writing a macro to capture values on one spreadsheet and add them to totals on another

    This is performing as advertised from my office.
    I'm going to try it out on the floor.
    I'll throw some more rep your way if it will let me.
    Thanks again man

  10. #10
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Writing a macro to capture values on one spreadsheet and add them to totals on another

    You're welcome - glad it's working - let me know - thanks for the vicarious rep!

  11. #11
    Registered User
    Join Date
    08-31-2017
    Location
    Greeley Colorado, United States
    MS-Off Ver
    Office 365
    Posts
    14

    Re: Writing a macro to capture values on one spreadsheet and add them to totals on another

    Touchdown!

  12. #12
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Writing a macro to capture values on one spreadsheet and add them to totals on another

    Let's go for two!

+ 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. [SOLVED] vlookup to capture asset purchase totals and depreciation
    By equplay in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 08-24-2015, 01:06 PM
  2. Capture values from macro to a excel file
    By var in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-31-2012, 06:39 PM
  3. Macro to capture values from web
    By Rockafella in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-14-2012, 09:28 AM
  4. Searching for BOLD values in spreadsheet and writing to .csv file
    By tonyp01 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-05-2012, 10:43 AM
  5. count rows and capture totals while condition is true
    By ajay1967 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-20-2011, 01:33 AM
  6. Writing a macro that will exit a spreadsheet
    By Dave Doc in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 01-26-2006, 09:45 AM
  7. [SOLVED] Need help writing Excel macro to solve a cell in each row of a spreadsheet
    By Chris in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-09-2005, 09:05 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