+ Reply to Thread
Results 1 to 5 of 5

find name and copy amounts between 2 workbooks

  1. #1
    Valued Forum Contributor
    Join Date
    12-01-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2016
    Posts
    949

    find name and copy amounts between 2 workbooks

    hi,

    Starting at A4 of “weeks to month” workbook are a list of names
    Find name in column J of “source month” workbook in all of the sheets

    If a name is found in a sheet, from the name:

    Go to (5 down, 6 left),copy the value, after searching the sheets, put the total amount(amounts from the sheets) to column B of “weeks to month” workbook

    Go to (6 down, 6 left), copy the value (negative numbers convert to positive numbers), after searching the sheets, put the total amount(amounts from the sheets) to column E of “weeks to month” workbook

    Go to (7 down, 6 left), copy the value, after searching the sheets, put the total amount(amounts from the sheets) to column C of “weeks to month” workbook

    Go to (8 down, 6 left) to (10 down, 6 left), copy the values, after searching the sheets, put the total amount(amounts from the sheets) to column D of “weeks to month” workbook

    Go to (5 down, 2 left),copy the value, after searching the sheets, put the total amount(amounts from the sheets) to column H of “weeks to month” workbook

    Go to (6 down, 2 left),copy the value, after searching the sheets, put the total amount(amounts from the sheets) to column M of “weeks to month” workbook

    Go to (7 down, 2 left),copy the value, after searching the sheets, put the total amount(amounts from the sheets) to column K of “weeks to month” workbook

    Go to (8 down, 2 left),copy the value, after searching the sheets, put the total amount(amounts from the sheets) to column N of “weeks to month” workbook

    Go to (9 down, 2 left),copy the value, after searching the sheets, put the total amount(amounts from the sheets) to column O of “weeks to month” workbook

    Go to (10 down, 2 left),copy the value, after searching the sheets, put the total amount(amounts from the sheets) to column P of “weeks to month” workbook

    Go to (12 down, 4 left) to (16 down, 4 left)
    also Go to (12 down, 8 left) to (16 down, 8 left)
    for every cell check value if “CA”
    if value is "CA" store the amount (if negative numbers convert to positive numbers) from the "CA" value located 2 cells to the right to (values of CA)
    if value is not "CA" store the amount (if negative numbers convert to positive numbers) from the not "CA" value located 2 cells to the right to (values of not CA)
    after checking the sheets put the total of (values of CA) to column Q of “weeks to month” workbook
    and put the total of (values of not CA) to column R of “weeks to month” workbook

    attached workbooks and ive shown the desired result for the firs name "NAME1"

    below is the inital code i made
    hope someone can check if its correct im confused with using FOR and WITH

    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,481

    Re: find name and copy amounts between 2 workbooks

    Here is a code I came up with, it did get a bit confusing especially where you wanted the results in different columns, I wrote the code up so you can easily change where the results should be.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  3. #3
    Valued Forum Contributor
    Join Date
    12-01-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2016
    Posts
    949

    Re: find name and copy amounts between 2 workbooks

    hi,

    thanks for the code

    i tried to add a code to copy the total amount for CA and NOTdCA but cant get the correct amount for each

    Please Login or Register  to view this content.

  4. #4
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,481

    Re: find name and copy amounts between 2 workbooks

    Try this,
    Please Login or Register  to view this content.

  5. #5
    Valued Forum Contributor
    Join Date
    12-01-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2016
    Posts
    949

    Re: find name and copy amounts between 2 workbooks

    works great thanks!

    last question how do i modify the code if i want it to retrieve per sheet instead of combination of the 4 sheets

    ill just add "1st week", "2nd week", "3rd week", "4th week" next to "Sheet1" of "WEEKS TO MONTH" workbook

+ 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] find name and copy amounts
    By k1dr0ck in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 03-10-2017, 01:15 AM
  2. To find in all the worksheets of all the workbooks in a directory/ Drive and copy
    By tameen42 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-03-2013, 05:02 AM
  3. Find most recent matching row and copy subsequent rows between workbooks
    By HRDFCE in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-13-2012, 09:02 AM
  4. [SOLVED] find and copy between 2 workbooks
    By k1dr0ck in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 12-09-2012, 07:23 PM
  5. Copy\Find\Copy\Paste Multiple Workbooks
    By JMcClane in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-05-2010, 10:23 AM
  6. Replies: 8
    Last Post: 07-05-2010, 01:00 PM
  7. Match amounts from 2 separate workbooks
    By carlav60 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-08-2007, 03:03 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