+ Reply to Thread
Results 1 to 4 of 4

Macro to Cross Reference Dates?

  1. #1
    Forum Contributor
    Join Date
    12-11-2012
    Location
    Guadalajara, Mexico
    MS-Off Ver
    Excel 2007 & 2013
    Posts
    101

    Macro to Cross Reference Dates?

    I have this file where I cross reference dates by employee id number: The first sheet “Raw Data” is the most important the dates here are the ones that need to be justified by sheet two “Approved Days”. Sheet three “Days Justified” is based on a combination of the first two sheets via a series of VLOOKUPS.

    The process for now is all manual and I would like to know if it is possible to make a macro to speed this up. Here is how it is done now.

    1. On the “Raw Data” and “Approved Days” sheets we arrange the Date column from “A –Z”

    2. Next we delete the rows in “Approved Days” tab until they match the first date in “Raw Data” in this case we delete rows 2 to 26 in “Approved Days” tab.

    3. In the “Approved Days” tab we filter and only show the first date 9/2/2013 from “Raw Data” tab and perform a VLOOKUP by filtered dates because if we do a VLOOKUP normally and just drag it down it will only return the first result it finds and an employee may have more than one day off that has been justified and we need to return all the dates justified for that employee.

    4. We just keep filtering until we get to the last date. Once the VLOOKUPs have been completed we filter only the dates found that match up and proceed to fill the Info on the columns in the “Days Justified” tab using the data from the first two tabs.

    NOTE: Columns “D” and “E” in the Raw Data tabs are ONLY there for reference to show how the report get done at the moment.

  2. #2
    Valued Forum Contributor
    Join Date
    03-22-2013
    Location
    Australia,NSW, Wirrimbi
    MS-Off Ver
    Excel 2013
    Posts
    1,057

    Re: Macro to Cross Reference Dates?

    Hi..

    Try this.. Click the "Go!" button on the "Raw Data" sheet..
    Please Login or Register  to view this content.
    Last edited by davesexcel; 11-04-2019 at 02:06 PM.

  3. #3
    Forum Contributor
    Join Date
    12-11-2012
    Location
    Guadalajara, Mexico
    MS-Off Ver
    Excel 2007 & 2013
    Posts
    101

    Question Re: Macro to Cross Reference Dates?

    Thanks for the response... I tried to run the macro but did not get a result at all. Was there anything I had to update or a reference to add?

  4. #4
    Valued Forum Contributor
    Join Date
    03-22-2013
    Location
    Australia,NSW, Wirrimbi
    MS-Off Ver
    Excel 2013
    Posts
    1,057

    Re: Macro to Cross Reference Dates?

    Try adding a Reference to the 'Microsoft Scripting Runtime'..

    In the Vb Editor.. go to Tools> References>

    Edit: Did you get an error of any kind?

    It runs fine here and yields the result your after.. so keep persisting..
    Last edited by apo; 10-14-2013 at 04:16 PM.

+ 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. Macro for quick cross reference / input
    By sloan122 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-06-2013, 10:58 AM
  2. [SOLVED] Cross reference with multiple instances in reference data
    By Nick F in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-08-2013, 10:31 AM
  3. Need a macro to cross reference several columns and grups of rows
    By mrswain in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-19-2013, 11:44 AM
  4. Excel 2007 : cross Reference
    By students101 in forum Excel General
    Replies: 8
    Last Post: 04-14-2011, 03:31 PM
  5. Cross reference?
    By soothsayer17 in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 04-07-2011, 11:22 AM

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