Extract Invoice Year
As a Construction Accountant, I frequently deal with invoice reference numbers that include the year at the end (e.g., 'INV-PROJ123-2023', 'PO-SITEA-456-2024'). I need a quick and reliable way to extract just the last four characters, which represent the invoice year, into a separate column for reporting and analysis purposes. This will help in filtering invoices by year, reconciling accounts, and preparing year-end reports more efficiently.
=RIGHT(A2,4) How it works: The RIGHT function extracts a specified number of characters from the end (right side) of a text string. In this scenario, `RIGHT(A2,4)` tells Excel to look at the text in cell A2 and return the last 4 characters, which correspond to the year in the invoice reference number. This is perfect for isolating the year when it consistently appears at the end of your invoice references.
Data Setup
| Invoice Reference |
|---|
| INV-PROJ123-2023 |
| PO-SITEA-456-2024 |
| REF-BLDG-789-2023 |
| PAY-SUPP-001-2022 |
Step-by-Step Guide
Select the cell where you want the extracted year to appear (e.g., B2).
Type `=RIGHT(`.
Click on the cell containing the invoice reference number (e.g., A2).
Type `,4)`.
Press Enter.
Drag the fill handle (the small square at the bottom-right of the selected cell) down to apply the formula to other cells in your column.