+ Reply to Thread
Results 1 to 5 of 5

Macro To Compare Two Dates

  1. #1
    Registered User
    Join Date
    05-04-2014
    Location
    United Kingdom
    MS-Off Ver
    Excel Professional Plus 2010
    Posts
    3

    Exclamation Macro To Compare Two Dates

    example.xlsHi all,

    I'm new here but have heard this is a great place to get Excel help.

    Just a quick question - What sort of Macro would I need to create to be able to compare two dates that are always in the same columns and show only rows that have a "Closed Date" that was after a "Due Date".

    Here's what I'm working with:
    1st.png

    Here's what I'm hoping to achieve, preferably in Macro form because I have many spreadsheets come out everyday that would need this comparison:
    2nd.png

    Many thanks!
    Dylan

    Please see attached example.
    Last edited by DylanP93; 05-04-2014 at 12:52 PM. Reason: Attached wrong images.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,865

    Re: Macro To Compare Two Dates

    Picture:

    Hi and welcome to the forum

    Please do not upload a picture of your file...rather, upload a sample of your workbook, showing what data you are working with, a few samples of your expected outcome (manually entered is ok) and how you arrived at that. (Exclude sensitive info). Pictures are pretty much impossible to edit, and no-one wants to re-type your data for you. Also, not all members can upload picture files (Company firewalls, etc.)

    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    05-04-2014
    Location
    United Kingdom
    MS-Off Ver
    Excel Professional Plus 2010
    Posts
    3

    Re: Macro To Compare Two Dates

    Hi Alan,

    Thanks, apologies for that. For some reason the attached files are different to the ones that I reference in the post. I have updated them but the box below the post hasn't updated the original images that I uploaded by accident.

    Please see
    http://www.excelforum.com/attachment...-dates-1st.png
    http://www.excelforum.com/attachment...-dates-2nd.png

    Which are referenced in the post.

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,865

    Re: Macro To Compare Two Dates

    These are still pictures that are uneditable.

  5. #5
    Registered User
    Join Date
    05-04-2014
    Location
    United Kingdom
    MS-Off Ver
    Excel Professional Plus 2010
    Posts
    3

    Re: Macro To Compare Two Dates

    I have no data that I can upload, the ones in these screenshots were just 7 lines I threw together. The actual data I use I can't upload.
    Last edited by DylanP93; 05-04-2014 at 12:53 PM. Reason: Just uploaded example.

+ 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. Help!! Compare dates from two workbooks and copy macro
    By gruittbm in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-21-2012, 02:36 PM
  2. Compare Dates
    By siva1218 in forum Excel General
    Replies: 2
    Last Post: 03-08-2012, 10:47 PM
  3. Macro to compare multiple columns then delete rows with older dates
    By azurememories in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-23-2011, 05:43 PM
  4. Compare two dates in excel macro
    By Sakuntala in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-29-2009, 05:51 AM
  5. Compare dates to ranges of dates
    By Santed593 in forum ExcelTip.com Feedback / Comments / Suggestions
    Replies: 1
    Last Post: 08-05-2005, 12:22 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