Add this line of code.
Set xray = Application.Union(xray.SpecialCells(xlCellTypeFormulas), xray.SpecialCells(xlCellTypeConstants))