Adding inverse function to get local coordinates from cell number