+ Reply to Thread
Results 1 to 13 of 13

Using Date ranges to update Status Reports

  1. #1
    Registered User
    Join Date
    07-08-2019
    Location
    United States
    MS-Off Ver
    2019
    Posts
    29

    Question Using Date ranges to update Status Reports

    Hello!!!! I could use some help on solving this issue.

    Overview: Attached is an example excel file. The objective of this file is to fill the "Period" column value with the correct and respective status report. We have an assortment of jobs that have scheduled "Start" and "Finish" dates. For this particular data set, I want to update the "Period" column to represent if the job is supposed to: (1) Start Next 2 Weeks (2) Start Next 2-4 Weeks (3) Finish Next 2 Weeks (4) Finish 2-4 Weeks.

    Challenge: To easily explain everything, I entered a "Period Date" which is the date that will be used to determine if the Job start or finish dates fall within the next 2 or 2-4 weeks. The "Period Date" can change depending on when you want to update the report. Without having the "Period Date" filled in "A2", is there a way to write VBA code or a formula to let the user select the "Period Date" and have the "Period" column update based on the selected "Period Date"?

    Clarification: Assuming there is no column or area to manually input the period date (such as "Period Date") and you only have the table attached. Can you and how do you give the user a way to select the Period Date and based on the selection, update the "Period Column" respectively??

    Any help if appreciated. Please let me know if I can provide additional information. Thank you!
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2013
    Posts
    1,669

    Re: Using Date ranges to update Status Reports

    See attached file.
    Formula entered in F2 and dragged own.

    =IF(($E2-$A$2) <=14,$J$1,IF(($E2-$A$2) <=28,$J$2,IF($D2-$A$2 <=14,$J$3,IF($D2-$A$2 <=28,$J$4,""))))
    Attached Files Attached Files
    1. Click on the * Add Reputation if you think this helped you
    2. Mark your thread as SOLVED when question is resolved

    Modytrane

  3. #3
    Forum Expert
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2013
    Posts
    1,669

    Re: Using Date ranges to update Status Reports

    In A2 you can put =Toady() and it will show today's date.
    So your Period column will use today's date as reference.

  4. #4
    Registered User
    Join Date
    07-08-2019
    Location
    United States
    MS-Off Ver
    2019
    Posts
    29

    Re: Using Date ranges to update Status Reports

    Thank you for the replies!

    Definitely helpful information.

    Is there a way to set the Period Date to the upcoming Friday? Ex., If =Today() returns today's date. Is there a manipulation of this formula that could return the next upcoming Friday?

    Thanks!!

  5. #5
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Using Date ranges to update Status Reports

    Modytrane is not logged on at the moment.

    Try this to get the following Friday
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    or
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Dave

  6. #6
    Registered User
    Join Date
    07-08-2019
    Location
    United States
    MS-Off Ver
    2019
    Posts
    29

    Re: Using Date ranges to update Status Reports

    FlameRetired,

    Thank you for your information! I am nearly all the way to the solution I need thanks to Modytrane and yourself.

    The formula to get the next Friday works perfectly. However, the only issue I am running into is: When the date is a Friday, I need that Friday date to stay. Ex., if I use the formula given above =WORKDAY.INTL(TODAY(),1,'1111011') and today's date is Friday, 2/21/2020. I need the formula to return 2/21/2020. However, the formula recognizes it is Friday's date and returns the next Friday 2/28/2020. I only need the next Friday's date to return when Saturday starts.

    Is there a solution for this? Thank you again for the help!

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,916

    Re: Using Date ranges to update Status Reports

    Maybe this?

    =IF(WEEKDAY(TODAY())=6,TODAY(),WORKDAY.INTL(TODAY(),1,'1111011'))
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  8. #8
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Using Date ranges to update Status Reports

    Similarly

    =WORKDAY.INTL(TODAY(),--(WEEKDAY(TODAY())<>6),"1111011")

  9. #9
    Registered User
    Join Date
    07-08-2019
    Location
    United States
    MS-Off Ver
    2019
    Posts
    29

    Re: Using Date ranges to update Status Reports

    Thank you! This worked perfectly. The only thing that needed to be manipulated was the ' ' to " " for the workdays.

  10. #10
    Registered User
    Join Date
    07-08-2019
    Location
    United States
    MS-Off Ver
    2019
    Posts
    29

    Re: Using Date ranges to update Status Reports

    Thank you FlameRetired. With everyone's help I was able to get the result I needed.

  11. #11
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,916

    Re: Using Date ranges to update Status Reports

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  12. #12
    Registered User
    Join Date
    07-08-2019
    Location
    United States
    MS-Off Ver
    2019
    Posts
    29

    Re: Using Date ranges to update Status Reports

    I wanted to say thank you to everyone for helping with my problem. I do have one more thing I could use help on that is similar to this problem.

    Using the excel document attached in the original problem. Assume, the "Job Start" and "Job Finish" columns are filtered to show dates that fall within the next 2/2-4 weeks of the selected "Period Date". So in the document, the 5 jobs are 5 of many but met the criteria of the filters.

    The goal: Is there a way to use any of the stuff from above to automate the process of filtering the "Job Start" and Job Finish" columns. Currently, we have to go in and manually select the dates within 4 weeks of the determined "Period Date" to get the jobs meeting the criteria. Is there a better way to do this? Thank you again!!

  13. #13
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,916

    Re: Using Date ranges to update Status Reports

    This is a new and separate query. Please mark this thread as solved and start a new one (with an appropriately descriptive title) for the new query. Thanks.

+ 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. VBA to Update status Column based on recent date
    By edkawy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-17-2017, 10:06 AM
  2. Update Values based on status update
    By JDobbsy1987 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-03-2017, 02:11 PM
  3. Select custom date ranges and update line graph (Macro?)
    By Keelin in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 01-03-2017, 04:30 PM
  4. Macro to select custom date ranges and update line graph
    By Keelin in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-03-2017, 08:01 AM
  5. Macro to Track Prospect Status and Date of Status Change
    By zainfidel in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-24-2016, 02:16 PM
  6. auto update weekly table basis status update
    By JJJ_1812 in forum Excel General
    Replies: 3
    Last Post: 04-28-2016, 03:38 AM
  7. [SOLVED] Populate Name and Date for one status only from a list of different status
    By suchetherrah in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-30-2015, 07:31 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