Pages

Monday, 30 December 2024

Concatenating a year date format

I use Excel to manage my course marking, attendance and student information. I have master spreadsheets set up where I try to automate background information as much as possible, so that use is pretty much a no-brainer. I would much rather throw some effort at working out how to enter a formula for an auto-updating date once, to that then the next time I roll over a spreadsheet for a new year, I don't have to remember to update a static date.

But one thing I had never managed to work out was how to get a date to update when it was formatted as a year, and concatenated into a page title. This was so a page title in a results spreadsheet would auto-update with the current year. I wanted this to show as:

Title of the paper, Semester 1 [current year]

The unbracketed elements of the title were easy, as this never changed. But I could never get the current year part to update: I either had to remember to update the four digits of the year manually, or I could get a full dd mmm yyyy date. But then I found myself with an hour spare, and found someone who had solved a similar problem (Bobbitt, 2023), which led me to how to format the title to suit me. Using a simple concatenate function, we enter the static text, then put in text([the cell location], "[and the date format we want])", as follows:

=CONCATENATE("Title of the paper: Semester 1", ",TEXT(N1, "YYYY"))

So easy once someone has shown us the way!


Sam

References:

Bobbitt, Z. (2023, May 23). How to Concatenate Text & Date in Excel (With Example). Statology. https://www.statology.org/excel-concatenate-text-and-date/

No comments :

Post a Comment

Thanks for your feedback. The elves will post it shortly.