+ Reply to Thread
Results 1 to 5 of 5

Return upcoming/past date based on date

  1. #1
    Registered User
    Join Date
    10-08-2018
    Location
    Frankfurt, Germany
    MS-Off Ver
    10
    Posts
    3

    Return upcoming/past date based on date

    Good morning,

    I have a column with date, which I would like to assign to new columns: "attended" and "upcoming", based on past 5 working days and upcoming 5 working days. Report will be updated on a weekly basis (Mondays).
    If in a past then should turn in column "attended" with number 1, if not then 0. Same rule applies for column "upcoming".

    I tried to solve it via conditional formatting, but this is not giving me the result I am looking for.


    Thank you very much for the support.

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

    Re: Return upcoming/past date based on date

    Attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    Alan


    Have you debugged your code?
    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
    10-08-2018
    Location
    Frankfurt, Germany
    MS-Off Ver
    10
    Posts
    3

    Re: Return upcoming/past date based on date

    Hi Alan,

    Please see the attachment.

    Hope it explains want I am looking for.

    Thank you, regards,

    AS
    Attached Files Attached Files

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

    Re: Return upcoming/past date based on date

    1. Remove Data Validation from columns B & C.
    2. Set Format to General
    3. In B2 =IF(A2<TODAY(),1,0) and copy down
    4. In C2 =IF(A2>TODAY(),1,0) and copy down

  5. #5
    Registered User
    Join Date
    10-08-2018
    Location
    Frankfurt, Germany
    MS-Off Ver
    10
    Posts
    3

    Re: Return upcoming/past date based on date

    Hi Alan,

    thank you very much! it works.

    Have a great day,

    regards,

    AS

+ 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] VBA - Userform - Return the upcoming April as Date
    By Quasis in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-14-2017, 08:03 AM
  2. [SOLVED] Auto fill a column based on date and color a column if past that date
    By thegunder in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-29-2013, 03:06 PM
  3. Replies: 1
    Last Post: 09-30-2012, 03:01 PM
  4. [SOLVED] Generate future date based on past date and day
    By bd528 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-14-2012, 04:23 PM
  5. Date & time input interface and show upcoming events based on urgency
    By Alheksi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-04-2010, 08:26 AM
  6. Replies: 0
    Last Post: 02-11-2010, 05:43 PM
  7. Upcoming Date Notification
    By jgurgen in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 10-16-2007, 12:18 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