Search code examples
exceldateexcel-formulaformula

Excel - RIGHT formula not working as expected


RIGHT formula

I am trying to get the last 4 characters (the year in this case) from one column to be displayed in a new column. As far as I am aware, the formula I am doing is correct but the column isn't displaying the correct values (should be 2016, 2015 etc)


Solution

  • So first, use right() for each cell:

    =right(H2,4)
    

    Then get excel to recognize the result as a number not text (text is left and numbers right formatted in the cell):

    =right(H2,4)*1 or =value(right(H2,4))
    

    But, as others have pointed out, dates are represented in Excel with a serial number - try changing the formatting and you will see.