Dear all,
I am new to this forum so excuse me if this question is already solved..
So, here's my problem..
I am working on a project to clear festival events with simulation.
Therefore I need a grid of Excel cells (the field), let's say 11x11 (B2:L12).
And the exit is in cell A7.
I am looking for an algorithm which fills this field with distances to the exit.
For horizontal and vertical movements the distance is 1,
and for diagonal movements the distance is 1.5
Say I made a class Coordinate which has two points, X & Y
I declare a variable point, as the location I am in (the active cell) and a constant exit (the coordinate of the exit)
And then I would like a function in VBA which does:
Please Login or Register to view this content.
Does anyone has an idea how to approach this??
Many thanks!
Greetings,
Bas
Bookmarks