Date formatting in a formula

Occasional Contributor

Hi All,


I'm trying to figure out a way in which comparison of a specific date must return a certain text based on defined parameters such as a person has certain date as 7/1/2021 (US date format) and until completion of his/her first year it must show as "current" the next year must show it as "Previous" and the following one as "Prior". 


Tried with below formula but does not help much




Any insight is much appreciated.


Thank you.


8 Replies
Can you post just a sample data where you show the result you expect?



Hi Juliano, appreciate your response. Attached is the sample data. So, my intent is to have the column F % auto-populate in column D based on the formula in column C corresponding to column B & system date.


Please feel free to reach out for any additional information.


Appecriate your time & expertise.


Thank you.

best response confirmed by rockstar_sprt (Occasional Contributor)



I must say, I don't see the connection between your first question and the data shown in the sheet you attached in your second post!!


For starters, there's nothing there that remotely resembles the desire to show "Current," "Previous," or "Prior" based on the date shown.


So the attached file and formula below refer to your "presenting question."


This uses the new function LET, which does require the most current version of Excel in order to operate, and it presumes you're talking one full (or two full, etc) years after the date posted in E4. 


Here's the formula:












What LET does is enable you to name a value (or set of values) that then get used in a formula, with the formula itself being a bit shorter and easier to read as a result.

So endyr is the end of the month a year after the start date, endy2 is two years later, endy3, three.

And the IFS function picks "Current" so long as TODAY() returns a value less than the end of the month a year after start date, and so forth. IFS stops considering conditions once it encounters the first that is met.

That's how I interpreted what you wanted to do with your first post. It's possible I misinterpreted. But you can still see how such a formula could work. It can be tweaked, of course, if you intended something else.



As variant


            {"Current","First Anniversary Gift","Second Anniversary Gift","Third Anniversary Gift"} ),



            {0,0.15,0.1,0.05} ),
 0 ) * D2
@mathetes thank you so much. You nailed it
I apologise for the delayed reply
Thank you, will try this version as well.