Despite temporal changes in the quantities of molecules, the functioning of cells also depends on their distribution within cells and in their extracellular environment. The dynamics of molecules are often governed by diffusion in heterogeneous environments consisting of dynamically changing impenetrable barriers (excluded volumes). This provides a challenge for efficient simulations of cellular processes with large numbers of molecules. To model the diffusion of molecular mass in consideration of excluded volumes, we here present an explicit numerical scheme that approximates the diffusion equation by using cellular automata. Because this approach represents molecular diffusion at the macroscopic scale, it is more amenable for efficient simulations than comparable microscopic approaches that treat diffusing molecules individually. In contrast to implicit numerical schemes (macroscopic approach), our approach is capable of accounting for excluded volumes, even if those exhibit a dynamic of their own, without increasing computational costs. The presented approach can easily be integrated into certain types of spatio-temporal multiscale models, as demonstrated by an existing model investigating cancer progression. Thereby, it allows to take the spatial effects of a heterogeneous environment on diffusing molecules into account.