+ Reply to Thread
Results 1 to 23 of 23

Search for due/overdue dates

  1. #1
    Registered User
    Join Date
    01-13-2021
    Location
    United States
    MS-Off Ver
    2016
    Posts
    12

    Search for due/overdue dates

    Hello!

    Being that I am not well versed in coding, I'm looking for assistance.

    I need a macro that will search all rows and 1 column across multiple sheets--2 through 13 in this case--for dates that are within 30 days and those that are less than zero days, then copy those rows to sheet 1. Mind you, the dates are produced through formulas, if that makes any difference. This will also help me understand how to properly write these types of macros. I can't attach the excel as it is on a work computer, so if anyone needs any more details, please let me know. Thank you for any and all help, in advance!

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

    Re: Search for due/overdue dates

    Please read the yellow banner at the top of this page on how to attach a file.
    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
    01-13-2021
    Location
    United States
    MS-Off Ver
    2016
    Posts
    12

    Re: Search for due/overdue dates

    I'm aware of that. The document cannot be posted from my work computer, as it is a disabled feature.

  4. #4
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,304

    Re: Search for due/overdue dates

    nobody is going to second guess the structure of your workbook - that requires a very powerful crystal ball
    help us to help you - we do not need the ACTUAL workbook - just a replica with dummy info but with actual structure.
    otherwise this could be a long and drawn out guessing game for those that get involved.
    torachan.

  5. #5
    Registered User
    Join Date
    01-13-2021
    Location
    United States
    MS-Off Ver
    2016
    Posts
    12

    Re: Search for due/overdue dates

    I'm very sorry, I misunderstood. x_x Took a little guessing, but I'm sure it's very similar to this. Except for longer columns,
    certainly. As you will see, some of the dates are yellow (due within 30 days) and red (overdue). I need those dates from all
    the other sheets to populate as a list on the "Sorted" sheet, at the click of a button.

    On a separate note, what did you guys use to learn this?
    Attached Files Attached Files

  6. #6
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,304

    Re: Search for due/overdue dates

    Am I missing the point ? - the data appears to be the same in all 12 sheets ???
    I presume 12 sheets equate to 12 months but I cannot see the purpose to justify the effort.

    Separate note, Perseverance & lots of time.

  7. #7
    Registered User
    Join Date
    01-13-2021
    Location
    United States
    MS-Off Ver
    2016
    Posts
    12

    Re: Search for due/overdue dates

    What you see is a very watered down duplicate. The original has the same number of sheets with 200+ rows per. Each sheet tracks a different element of my job.
    It may seem rather moot, but I cannot stress how huge of a help that macro would be for the range of information that we have.

  8. #8
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: Search for due/overdue dates

    Try this code, I assume all your pages are the same for the sake of simplifying the creation of an example workbook. This code clears the Sorted worksheet before re-populating the sheet.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by maniacb; 01-14-2021 at 06:35 PM. Reason: correction to code

  9. #9
    Registered User
    Join Date
    01-13-2021
    Location
    United States
    MS-Off Ver
    2016
    Posts
    12

    Re: Search for due/overdue dates

    Sorry for the wait. I tried your command and received this error:
    Attached Images Attached Images

  10. #10
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: Search for due/overdue dates

    Code now corrected in the workbook below

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by maniacb; 01-14-2021 at 06:46 PM. Reason: Updating code and message

  11. #11
    Registered User
    Join Date
    01-13-2021
    Location
    United States
    MS-Off Ver
    2016
    Posts
    12

    Re: Search for due/overdue dates

    I'll return with results. Thank you!

  12. #12
    Registered User
    Join Date
    01-13-2021
    Location
    United States
    MS-Off Ver
    2016
    Posts
    12

    Re: Search for due/overdue dates

    As you probably already know, it worked perfectly in the sample. However, when I attempt to apply it to the original,
    it tells me to debug the line "If cl.Value <= 30 + Date Then." I imagine this may be unique to whatever extra is in
    the original so I've attached it, excluding sensitive information.

    It succeeded in moving some of the items, just not all. I cannot figure out where/how it failed. The modified code is
    included in the doc.
    Attached Files Attached Files

  13. #13
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: Search for due/overdue dates

    Here is the updated code. The hidden column I and formula errors in J had not been accounted for. Should be good to go. Let us know

    Please Login or Register  to view this content.

  14. #14
    Registered User
    Join Date
    01-13-2021
    Location
    United States
    MS-Off Ver
    2016
    Posts
    12

    Re: Search for due/overdue dates

    Ever just feel dense, sometimes? I showed this to my supervisor and she reminded me that the blue sheets are tracked based on "PASS/FAIL."
    My plan is to have them appear in the J column, as well. With that, would be easier for you modify the code yourself or to just tell me how to do
    it? This would be the last change in parameters, but I don't want to take too much of your time, and I am more than willing to learn.

    Edit: Save for my blunder, your code worked perfectly and I deeply appreciate it! Thank you so much!

  15. #15
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: Search for due/overdue dates

    No problem on the assist. But I'm unsure of your new requirement. In the blue sheets, you want to track something other than dates? Please explain how you want to see the code process the blue sheets.

  16. #16
    Registered User
    Join Date
    01-13-2021
    Location
    United States
    MS-Off Ver
    2016
    Posts
    12

    Re: Search for due/overdue dates

    I'll build the excel and post it, to make it clear.

  17. #17
    Registered User
    Join Date
    01-13-2021
    Location
    United States
    MS-Off Ver
    2016
    Posts
    12

    Re: Search for due/overdue dates

    Sorry for the delay. I put everything under "J," to make things easier; however, if it would be easier to have these under a different column, "H" would be ideal.
    Attached Files Attached Files

  18. #18
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: Search for due/overdue dates

    Is it the "incomplete" and the "not attempted" rows in the blue tabs that you want to show up in the slides tab?

  19. #19
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: Search for due/overdue dates

    Try this code. It will look for the "incomplete" and the "not attempted" in the blue sheets. It also collects rows from the other sheets as before. Let me know if this is what you were expecting.

    Please Login or Register  to view this content.
    Last edited by maniacb; 01-19-2021 at 09:51 PM.

  20. #20
    Registered User
    Join Date
    01-13-2021
    Location
    United States
    MS-Off Ver
    2016
    Posts
    12

    Re: Search for due/overdue dates

    Perfect! Very last thing, I promise: Is there any way to have these sort based off the sheet from which they were pulled? Pretty much as a list using the name of each sheet. I'm sorry i didn't consider this sooner.

    Edit: This part is half educational, as I could just add the name of the sheets to the individual rows. I'll understand if it can't be done or if it's too much.
    Last edited by ColonelKidd; 01-20-2021 at 12:51 AM.

  21. #21
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: Search for due/overdue dates

    What column do want to use to place the sheet name. The next one over?

  22. #22
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: Search for due/overdue dates

    I chose column L for you. Here is the code.

    Please Login or Register  to view this content.

  23. #23
    Registered User
    Join Date
    01-13-2021
    Location
    United States
    MS-Off Ver
    2016
    Posts
    12

    Re: Search for due/overdue dates

    Exactly how I needed it. Thank you!

    This has been extremely helpful! I cannot thank you enough!

+ 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] Formatting Overdue Dates etc.
    By eskimosmurf in forum Excel General
    Replies: 4
    Last Post: 05-05-2016, 07:10 AM
  2. Logical Dates - OVERDUE
    By kjmosp in forum Excel General
    Replies: 1
    Last Post: 06-20-2015, 06:43 AM
  3. [SOLVED] Help with displaying if dates are overdue
    By rhysp in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-05-2013, 04:53 AM
  4. Replies: 3
    Last Post: 02-09-2012, 06:57 PM
  5. Flagging overdue dates
    By weeksy in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 08-06-2011, 05:51 AM
  6. Overdue dates with Criteria
    By rickyilas in forum Excel General
    Replies: 2
    Last Post: 09-14-2010, 12:25 PM
  7. Problem overdue dates
    By crombes in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-22-2005, 03:44 AM

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