To make CELL function always refer to the worksheet in which the formula resides you need to use a cell reference in each CELL
function (any cell reference, but A1 is the default option), i.e.
=DATE(RIGHT(CELL("filename",A1),4),LEFT(RIGHT(CELL("filename",A1),8),2),MID(RIGHT(CELL("filename",A1),8),3,2))
If you don't do that then it refers to the last worksheet changed - which clearly isn't what you want