Results 1 to 12 of 12

Macro To Import Specific Data By Matching Data Between 2 Workbooks After User Picks File

Threaded View

  1. #1
    Registered User
    Join Date
    02-13-2014
    Location
    FL, United States
    MS-Off Ver
    Excel 2007
    Posts
    33

    Macro To Import Specific Data By Matching Data Between 2 Workbooks After User Picks File

    Good afternoon,

    I hope everyone in the community is doing well and enjoying 2016 so far. I'm in need of 2 macros to perform specific functions and was hoping someone could help. I will be as descriptive as possible in order to avoid confusion and make the task simpler to understand. They are as follows:

    1. The first macro runs in workbook "OT TRACK" and prompts the user to pick a file. Once the file is picked, the macro displays the pay date located in cell "C3" of the picked work book (e.g. OT HOURS) in cell "B5" of "OT TRACK" and matches the locations in cells A7, A28, A44, A60, A76, A92, A108 and A124 with the sheets named the same in workbook "OT HOURS". When each sheet is found, it imports the employee name, current payroll OT and YTD OT for those employees into the first 3 columns of the respective tables (by location) in "OT TRACK". I'd also be obliged if the values displayed in column B for current OT are added to the existing value in the monthly actual for that row (JAN '16 ACT, FEB '16 ACT, etc.) based on the pay date. For example, if the pay date is 29th JANUARY 2016, then the value in column B against a name is incremented to the value in the JAN '16 ACT for that row. If the pay date is 9th FEBRUARY 2016, then it's incremented to FEB '16 ACT. I'm not sure if this is possible, but any help you can provide is greatly appreciated.

    2. The second macro (also inside "OT TRACK") uses the names in the tables (that have already been imported by the previous macro) and compares the names with a file that the user picks. If a match is found in the sheets of this workbook (e.g. PAYROLL BUDGET 1), then the macro imports the budgeted hours for each month for that name (beginning from column G), subtracts 160 from it and displays it (only if positive) in JAN '16 BUD, FEB '16 BUD, etc. In the event that the name is found twice in the work book on different sheets, the budgeted hours should be added (column G of both sheets), 160 subtracted from it and displayed in JAN '16 BUD, etc. (Reference PAYROLL BUDGET 2 for this case)

    I hope the explanation provided is clear and I sincerely appreciate and value all the help offered. I have attached the excel files in question for reference and aid.

    Best wishes,
    Hackboss
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. VBA to fill in cell data after the user picks from drop down box.
    By Zimmerman in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-03-2015, 03:03 PM
  2. Excel Macro to Import Specific Data from Txt File
    By Niklasfirst in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-22-2013, 12:41 PM
  3. Export/ Retrieve specific data from multiple workbooks and Import into Master workbook
    By SerenitynWisdom in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-29-2013, 10:41 PM
  4. I need to copy data from various workbooks into one master file, specific data
    By madhumith13 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-21-2013, 09:14 AM
  5. Import xml data by letting the user choose from file dialog box
    By victor.enbom in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-19-2012, 03:13 AM
  6. import data from .txt file selected by user
    By ahartman in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-29-2008, 03:34 AM
  7. [SOLVED] User picks a text file, macro defining the array
    By melric in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-14-2005, 03:06 PM

Tags for this Thread

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