Calc: search for a formula "IF contains then"
nesumi77
Posted messages
2
Status
Member
-
nesumi77 Posted messages 2 Status Member -
nesumi77 Posted messages 2 Status Member -
Hello everyone
I'm desperately looking for a formula to make my life easier, and after a lot of research, I'm still in the dark.
I have 2 columns in my file: one with dates (format DD/MM/YY) and one in which I want to extract the year from the previous column. For example, if A1 contains "19/04/14", I want B1 to display "2014".
I was thinking of a formula like "if A1 contains 2014 then 2014 in B1" (and be able to nest other conditions because obviously, I will need to do the same for 2011, 2012, 2013...).
Sure, I've spent so much time searching that entering them by hand would probably have been faster, but I would really like to know if this can work or not. I've found lots of examples with text, but none with dates.
Thanks
I'm desperately looking for a formula to make my life easier, and after a lot of research, I'm still in the dark.
I have 2 columns in my file: one with dates (format DD/MM/YY) and one in which I want to extract the year from the previous column. For example, if A1 contains "19/04/14", I want B1 to display "2014".
I was thinking of a formula like "if A1 contains 2014 then 2014 in B1" (and be able to nest other conditions because obviously, I will need to do the same for 2011, 2012, 2013...).
Sure, I've spent so much time searching that entering them by hand would probably have been faster, but I would really like to know if this can work or not. I've found lots of examples with text, but none with dates.
Thanks
3 answers
-
Hello,
=year(A1) right?
eric
--
By continually trying, one ultimately succeeds.
So the more it fails, the more chances there are that it will work. (the Shadoks)
In addition to the thank you (yes, it can be done!!!), remember to mark it as resolved. Thank you. -
Hello,
If in A1, I have "19/04/14", then "2014" should appear in B1.
In B1: =YEAR(A1) and drag down to the other cells in column B
Whatever the date in column A, you will have the year in column B:
A2: 01/12/2011 B2: 2011 -
Oh la la, it was so simple! I see that I still went looking for the complicated.
Thank you very much.