Adding a number of years to a date

OK, I am really struggling with this one!

In column A “Course date” I have a course date (easy so far right)

In column B “Qualification duration” I have a number of years (this varies according the course) and is looked up from another table

In column C “Expiry” I want it to add “Qualification duration” to “Course date” in order to get a new date but I just cannot get it to work. The formula I have is:

  • DATEADD({Course date},{Qualification duration},‘years’) but this just returns the same date

If I just enter a number into the formula instead of a cell reference it works fine but as i said earlier, this varies by each qualification so needs to looked up.

What am I doing wrong?

Any help greatly appreciated

Hi @Unicorn_F_SS_Trainin - you are getting an error because a lookup field returns an array and an array can’t be used in the DATEADD function. Instead convert it to a string by concatenating it with an empty string like this:

DATEADD({Course Date}, Duration & '', 'years')

and you should find it works OK.

As an aside, I did not expect a string to work and thought I would have to put VALUE() around this, but it appears that string works OK in this scenario (assuming, I guess, that the string can be converted to a number).


Thankyou, worked a treat!

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.