Separating Dates Using IF Function [Closed]

Report
-
Posts
1914
Registration date
Monday August 16, 2010
Status
Contributor
Last seen
April 7, 2021
-
Hello,

I'm trying to set up an IF function, I believe...I have a spreadsheet that lists dates back to 2013 as MM/DD/YYYY. I'm trying to create a formula that would read that date (specifically the year) and then assign a number to it. For example 2014 =1, 2015 = 2, etc. I'm new to the intricacies of Excel and don't know what I'm doing.


1 reply

Posts
1914
Registration date
Monday August 16, 2010
Status
Contributor
Last seen
April 7, 2021
142
ajohnson, Good afternoon.

Excel have a lot of possibilities to do the same job always.

As you said that the older year is 2013, Try to do:

Supposing:

A1 --> DATE

B1 --> =IF(YEAR(A1)=2013,1, IF(YEAR(A1)=2014,2, IF(YEAR(A1)=2015,3, IF(YEAR(A1)=2016,4, IF(YEAR(A1)=2017,5,"")))))

OR

B1 --> =YEAR(A1)-2012

Remember to format B column as number.

Is that what you want?
I hope it helps.
--
Belo Horizonte, Brasil.
Marcílio Lobão

Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!