+ Reply to Thread
Results 1 to 14 of 14

Based on Date I need Current and Previous name

  1. #1
    Registered User
    Join Date
    11-02-2022
    Location
    Pakistan
    MS-Off Ver
    Office 365
    Posts
    10

    Post Based on Date I need Current and Previous name

    Hi all,
    I have two dates in column A and I need a formula to give me result like this in Column B.


    Column A Column B
    7/09/2022 Past Week
    7/15/2022 Current Week
    Attached Files Attached Files
    Last edited by Rosellina; 11-22-2022 at 06:08 AM.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,724

    Re: Date formula

    Are those proper Excel dates, formatted as m/dd/yyyy, or text values which look like dates?

    Which day of the week is used for the start of a week - Sunday, or Monday?

    It would help if you attached a sample Excel workbook, by following the instructions in the yellow banner at the top of the screen.

    Pete

  3. #3
    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,780

    Re: Date formula

    Try this:

    =IF(ISOWEEKNUM(A1)=ISOWEEKNUM(TODAY()),"CURRENT ","PAST ")&"WEEK"

    In future, please make your thread titles MORE DESCRIPTIVE (see the forum rules).
    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.

  4. #4
    Forum Expert dosydos's Avatar
    Join Date
    12-09-2015
    Location
    Massachusetts
    MS-Off Ver
    365(PC) V:2308
    Posts
    1,472

    Re: Date formula

    basing this off the criteria that of the two dates the most recent to today is Current and the oldest is past then:

    In B1 and drag down
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    <----- If you are happy with your solution please click on the "* Add Reputation" as a way to say thank you.

  5. #5
    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,780

    Re: Date formula

    There might be multiple dates in the current week, though ...

  6. #6
    Registered User
    Join Date
    11-02-2022
    Location
    Pakistan
    MS-Off Ver
    Office 365
    Posts
    10

    Re: Date formula

    Hi,
    Thanks for your reply. I have attached excel sheet for you, please help me how i get column B based on Column A dates.
    Attached Files Attached Files

  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,780

    Re: Date formula

    Please update your thread title to properly explain what you want help with. Do this NOW.

  8. #8
    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,780

    Re: Date formula

    Did you try my suggestion?

    =IF(ISOWEEKNUM(A2)=ISOWEEKNUM(TODAY()),"CURRENT ","PAST ")&"WEEK"

    Why should 13/11/2022 be the current week when it clearly isn't the current week???
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    11-02-2022
    Location
    Pakistan
    MS-Off Ver
    Office 365
    Posts
    10

    Re: Date formula

    Thanks, I have tried this, it is perfectly fine.
    But What if, If I had two different dates ( like one of July and another is of August) and I want to name them as Current for (August) and previous for (July).
    Can you please guide me on this ?

  10. #10
    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,780

    Re: Based on Date I need Current and Previous name

    So what you really want is the current MONTH, not WEEK?

    Try this:

    =IF(A2<=EOMONTH(TODAY(),-1),"Past","Current")&" Month"

  11. #11
    Registered User
    Join Date
    11-02-2022
    Location
    Pakistan
    MS-Off Ver
    Office 365
    Posts
    10

    Re: Based on Date I need Current and Previous name

    Thanks, resolved!

  12. #12
    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,780

    Re: Based on Date I need Current and Previous name

    Glad to have helped.

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

    Also, if you have not already done so, you may not be aware that you can thank anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.

  13. #13
    Registered User
    Join Date
    11-02-2022
    Location
    Pakistan
    MS-Off Ver
    Office 365
    Posts
    10

    Re: Based on Date I need Current and Previous name

    Thanks, done :-)

  14. #14
    Registered User
    Join Date
    11-13-2022
    Location
    Amman - Jordan
    MS-Off Ver
    2016 Use at work 365 at Home
    Posts
    27

    Re: Date formula

    Many Thanks, very helpful

+ 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 help please. date-date but if cell blank then today-date
    By BKRiley in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-06-2022, 01:55 PM
  2. Replies: 4
    Last Post: 03-21-2018, 09:25 AM
  3. Replies: 7
    Last Post: 02-02-2017, 02:41 PM
  4. Replies: 5
    Last Post: 12-01-2015, 02:36 PM
  5. [SOLVED] Formula to compare date (including month and year) from a listed date to today's date
    By mhewitson15 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-11-2014, 05:31 PM
  6. Replies: 2
    Last Post: 11-03-2014, 10:29 AM
  7. Replies: 1
    Last Post: 04-18-2012, 05:49 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