+ Reply to Thread
Results 1 to 5 of 5

Find all dates between two dates and then find if there is missing data

  1. #1
    Registered User
    Join Date
    05-13-2013
    Location
    Savannan, TN
    MS-Off Ver
    Excel 2007
    Posts
    14

    Find all dates between two dates and then find if there is missing data

    What I want to do may not be simple but I was hoping someone can help me out.

    I have a "Print & Save" macro on a spreadsheet. When the user pushes the button it also checks to make sure they have completed the "inspection" section of one of the work book. That was easy to do because it is the same area each time that I have named.

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    I have now been asked to see if I can achieve the same thing on the data entry page.

    Column A - Dates (there will be no missed days)
    Column B - has other data below but it also houses the "Period Start and End" dates. I have another sheets looking at this piece of data to do an index-match to fill in the reports.
    Column H through M - Houses the required information. Now, if one is left blank that is okay, what I need to do is if all 5 are blank for the print macro to stop and prompt the user to go back and fill in the missing data.

    So, I guess I need to do some type of find by row and search for all cells for the particular day in the date range and 5 one day which has all 5 cell blank....

    Here is the rest of my big mess of code...maybe someone can even clean it up for me

    Please Login or Register  to view this content.

  2. #2
    Registered User
    Join Date
    05-13-2013
    Location
    Savannan, TN
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Find all dates between two dates and then find if there is missing data

    To make my question simpler - I am looking for a way, using VBA in excel, to look up a piece of data in one row (in my case a range of dates starting in row A7) and then check to see if rows H:M are all blank.

    All my dates will always be in order (12/1, 12/2, 12/3...,12/31)

    The start date is kept in B2 and the end date in B3.

    I found a piece of code which can find the dates but then searching for the blanks in between that date range AND reporting which dates are missing data... well. Help?

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    05-13-2013
    Location
    Savannan, TN
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Search for missing data within date rage - display msgbox

    Bump, anyone?

  4. #4
    Registered User
    Join Date
    11-20-2012
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Search for missing data within date rage - display msgbox

    I'm not sure I get what you're asking. Is it that if start date is January 1, 2015 and end date is January 31, 2015 that all dates between these two are in order in the cells between? (A1 = Jan 1, A2 = Jan 2, etc.)? If so, maybe something like this:

    Please Login or Register  to view this content.
    This code will check to ensure that each cell is only one day apart from the next cell down.

  5. #5
    Registered User
    Join Date
    05-13-2013
    Location
    Savannan, TN
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Search for missing data within date rage - display msgbox

    Thanks for your reply but no, that is not what I am asking.

    I want a VBA code that looks at data in a separate column to check to see if it's empty, blank, zero, etc. but only if it falls between two dates.

    If C2 = 0 (which is in the same row as 12/15/14) & Is between the dates 12/1/14 & 12/31/14 (which it is because it is in the same row as 12/15/14) then stop and notify operator that on 12/15/15 there was nothing entered.

    On the flip side:

    If C2 = 0 (which is in the same row as 8/7/13) & Is between the dates 12/1/14 & 12/31/14 (which it is not because it is in the same row as 8/7/13) then continue code to next thing.

    This topic is now also located on Ozgrid http://www.ozgrid.com/forum/showthread.php?t=192901 to see if I can get anymore help, which so far I haven't.

+ 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] 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
  2. 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
  3. How can I find if there are missing dates
    By Lynneth in forum Excel General
    Replies: 7
    Last Post: 08-24-2010, 03:35 AM
  4. Find Missing Dates
    By jackt05 in forum Excel General
    Replies: 2
    Last Post: 03-20-2009, 10:00 AM
  5. [SOLVED] find missing dates
    By Wally in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-20-2005, 02:06 PM

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