We help IT Professionals succeed at work.

Need proper Excel formula to display previous current year.

Need proper Excel formula to display previous current year.  As an example - this current year is 2020 - I need it to show 2019.
I keep trying various =TODAY( syntaxes but they all fail.)

And the searches take me on a long journey I have no time to drive!
Comment
Watch Question

Rob HensonFinance Analyst

Commented:
Try:

=YEAR(TODAY())-1

EDITED for placement of brackets.
Bill PrewTest your restores, not your backups...
Expert of the Year 2019
Top Expert 2016

Commented:
Rob, did you mean:

=YEAR(TODAY())-1


»bp
Rob HensonFinance Analyst

Commented:
@Bill, - yes and edited; comments passed each other in the ether.
Bill PrewTest your restores, not your backups...
Expert of the Year 2019
Top Expert 2016

Commented:
checkmark-128-1-.png
Rob HensonFinance Analyst

Commented:
@stephen - in case you need it explaining:

TODAY() gives today's date (as per system of PC)
YEAR(Date)  will extract the year element of the given date, in this case TODAY()
YEAR(Date)-1 will subtract 1 from year result.

Author

Commented:
When I copy and paste the above, it just displays =YEAR(TODAY())-1
but not 2019

can ya'll put that in  CODE BRACKETS???
Test your restores, not your backups...
Expert of the Year 2019
Top Expert 2016
Commented:
=YEAR(TODAY())-1

Open in new window


Sounds like you pasted it in as text rather than a formula.  You could always try pressing F2 on the cell to get in to edit mode, and then paste the formula here into the edit box just above the sheet data.


»bp
Rob HensonFinance Analyst
Commented:
Check the format of the cell as well, should be Number or General.

if not you'll need to change the format before pasting in the formula.

Author

Commented:
Thank you so much!
Roy CoxGroup Finance Manager

Commented:
Sometimes paste into Notepad first
Bill PrewTest your restores, not your backups...
Expert of the Year 2019
Top Expert 2016

Commented:
Welcome.


»bp
Rob HensonFinance Analyst

Commented:
Happy to help