+ Reply to Thread
Results 1 to 8 of 8

Missing Dates in two columns

  1. #1
    Registered User
    Join Date
    11-04-2014
    Location
    Rockville USA
    MS-Off Ver
    2010
    Posts
    4

    Lightbulb Missing Dates in two columns

    Hi,
    I am struggling with the below scenario. Your help is gonna save lot of manual work. Thanks in advance.
    Below are two sheets in my excel.
    Sheet1
    Col1(obj) Col2 (Trade Date)
    ob1 2014-20-01
    ob1 2014-21-01
    ob1 2014-24-01
    ob2 2014-20-01
    ob2 2014-22-01
    ob2 2014-23-01
    ob3 2014-24-01

    Sheet2
    Col1 1(All trade dates exceluding weekends and holidays)
    2014-01-20
    2014-01-21
    2014-01-22
    .....
    2014-12-29
    2014-12-30
    2014-12-31

    I want to find out for each object which all trade date is missing.(when compared to All trade dates in sheet2 )
    So I am expecting an output as below in new sheet.
    Sheet3
    Col1 (obj) Col2 (Missing Dates)
    obj1 2014-22-01
    obj1 2014-23-01
    obj2 2014-21-01
    obj2 2014-24-01
    Obj3 2014-20-01
    ...... ...........

    Please help me out.

    Thanks,
    Abhishek

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,945

    Re: Missing Dates in two columns

    Hi, welcome to the forum

    For future reference, it makes it easier for us if you upload a sample workbook, but based on the sample you provided...

    A
    B
    C
    1
    Obj Trade Date
    2
    ob1
    1/19/2014
    Not Found
    3
    ob1
    1/21/2014
    4
    ob1
    1/24/2014
    5
    ob2
    1/20/2014
    6
    ob2
    1/22/2014
    7
    ob2
    1/23/2014
    8
    ob3
    1/24/2014


    C2=IF(ISERROR(MATCH(B2,Sheet2!$A$1:$A$15,0)),"Not Found","")
    copied down
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    11-04-2014
    Location
    Rockville USA
    MS-Off Ver
    2010
    Posts
    4

    Lightbulb Re: Missing Dates in two columns

    Thanks Ford for the welocme and quick reply back.
    I tried the above query but it didnt fetch me the result.

    May be my explaination was not proper.
    I have attached the excel. and below is the sheet expalination

    Sheet1- Objects and Actual Dates
    Sheet2- Trade calendar of the whole year

    Sheet3- Expected output. For each object which all dates are missed out in sheet1 as per the trade calendar

    Apreciate your help.
    Abhishek
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Missing Dates in two columns

    u mean to say whatever the dates there in Sheet2 if any date not available in sheet1 of each Object then u want that date to be shown in sheet3 is it right ?
    Thanks - Naveed
    -----------------------------
    If the suggestion helps you, then Click * to Add Reputation
    To Attach File: Go Advanced>>Manage Attachments>>Add Files (In Top Right Corner)>>SelectFiles>>.........Locate Your File(s)>>Upload Files>>Done (In Bottom Right)
    1. Use [code] code tags [\code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    2. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

  5. #5
    Registered User
    Join Date
    11-04-2014
    Location
    Rockville USA
    MS-Off Ver
    2010
    Posts
    4

    Re: Missing Dates in two columns

    Yes Naveed, Bang on.

  6. #6
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Missing Dates in two columns

    Hi Abhishek

    Please find the attached file and i hope this will work as u want
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    11-04-2014
    Location
    Rockville USA
    MS-Off Ver
    2010
    Posts
    4

    Re: Missing Dates in two columns

    Quote Originally Posted by Naveed Raza View Post
    Hi Abhishek

    Please find the attached file and i hope this will work as u want
    Thanks NAveed for your prompt response.
    It works right for the data in sample excel.
    But when I copy some mopre objects and dates in sheet1, it gives me all dates as missing for all objects.
    Any change in the macro code which can resolve this issue?

  8. #8
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Missing Dates in two columns

    No, Before running a macro convert your date column in date format , because i seen your data it was in text format initially...

+ 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] Compare two columns on separate sheet, if missing, insert missing data
    By lilvictorians in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 04-03-2019, 11:44 PM
  2. Finding Missing Dates In a Column of Dates
    By ExcelStudent123 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-09-2014, 05:37 PM
  3. [SOLVED] Formula to find missing dates from a list of dates
    By PWinkz in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-22-2014, 08:11 AM
  4. Excel Macro to find missing dates and insert missing date as blank row
    By JevaMarie in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-26-2013, 11:08 AM
  5. [SOLVED] Missing Dates
    By mrsmirf in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-13-2013, 09:39 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