Consulting

Results 1 to 11 of 11

Thread: VBA Macros to Copy Data to Another Workbook

  1. #1
    VBAX Regular
    Joined
    Oct 2019
    Posts
    14
    Location

    VBA Macros to Copy Data to Another Workbook

    Hi Guys,

    I need help with transfering data from one Multi sheet Workbook with "not fixed" Sheet name (change each time) using Macro


    Steps:

    1. I need to add date from cell G6 (will stay fixed for all sheets) from Workbook A to Workbook B column A
    2. Payment method from Column E from Workbook A will go to Column B Workbook B
    3. Then to add doc_num from cell G5 (will stay fixed for all sheets) from Workbook A to Workbook B column C
    4. Most complicated part is transferring amount first of all column A B C of Worksheet A need to be combined in this format A-B-C (example 1-4111-702) and then match against row 2 in Workbook B and add Amount from column H of Workbook A under relevant cell
    5. If same code repeated few times it is better to add total value as in highlighted in cell F3
    6. If Payment method is different new line needs to be created as in example row 5 and 6
    7. This is continuous process file need to be updated (next info need to be added to new row under pervious data) each week for reconciliation so every week new Workbook will be received with new multiple sheet
    8. Amount in column F workbook A need to be ignored
    9. Sort new data upload by date Ascending order


    Note files are attached.

    Thanks in advance
    Sophia
    Attached Files Attached Files
    Last edited by Sophia; 10-17-2019 at 02:46 PM.

  2. #2
    VBAX Mentor 大灰狼1976's Avatar
    Joined
    Dec 2018
    Location
    SuZhou China
    Posts
    479
    Location
    There are two questions:
    1. Is the data of E1:Q2 range of workbookB original or generated in the process.
    2. Why "2-4440-901" appears twice (K2 and O2).

  3. #3
    VBAX Regular
    Joined
    Oct 2019
    Posts
    14
    Location
    Quote Originally Posted by 大灰狼1976 View Post
    There are two questions:
    1. Is the data of E1:Q2 range of workbookB original or generated in the process.
    2. Why "2-4440-901" appears twice (K2 and O2).
    Hi thank you for your question

    1. no I adjusted it manually this is not system report.
    2. It is mistake should be one time only, just consider it like one.

  4. #4
    VBAX Mentor 大灰狼1976's Avatar
    Joined
    Dec 2018
    Location
    SuZhou China
    Posts
    479
    Location
    Hi Sophia!
    I'm sorry to be off work. Wait until I have time.

  5. #5
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,724
    Location
    Off this weekend sitting the grandkids -- I'll check this when I get back
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

  6. #6
    VBAX Regular
    Joined
    Oct 2019
    Posts
    14
    Location
    Mornig,

    Thank you Paul
    I need to close this case today, please help me who are able today.
    Happy Friday

  7. #7
    VBAX Master paulked's Avatar
    Joined
    Apr 2006
    Posts
    1,007
    Location
    Demand not met, me thinks!
    Semper in excretia sumus; solum profundum variat.

  8. #8
    VBAX Mentor 大灰狼1976's Avatar
    Joined
    Dec 2018
    Location
    SuZhou China
    Posts
    479
    Location
    Hi Sophia!
    Please refer to the attachment. Macro in Workbook B.
    Attached Files Attached Files
    Last edited by 大灰狼1976; 10-20-2019 at 07:54 PM.

  9. #9
    VBAX Regular
    Joined
    Oct 2019
    Posts
    14
    Location
    Hi VBAX Mentor,

    Could you check please there is no Macro in Workbook B

  10. #10
    VBAX Master paulked's Avatar
    Joined
    Apr 2006
    Posts
    1,007
    Location
    There is, in Sheet1 module!
    Semper in excretia sumus; solum profundum variat.

  11. #11
    VBAX Regular
    Joined
    Oct 2019
    Posts
    14
    Location
    I think problem is that I have protected view

Posting Permissions

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