I am using QGIS 3.8.1.
The intervals of my grid are 1.2cm and the labels are set at a 0.6cm offset so they are placed in the middle. I used the draw coordinates custom option to enter my own coordinates rather than from a coordinate reference system. The code I used is as follows and the problem I am encountering can be seen in the image below.
CASE
WHEN @grid_axis = 'y'
THEN substr('ONMLKJIHGFEDCBA', (@grid_number + 0.6 ) / 1.2 , 1)
WHEN @grid_axis = 'x'
THEN (@grid_number + 0.6) / 1.2
END