Hi,
I would like to create a table in excel that contains data that would represent a grid of boxes.
The table below represents the first 4 boxes in a 10 by 10 grid.
I would like to use a nested do loops to create this 10 by 10 grid.
The final cell would have a reference point of J10
If I say that each square has length and width of 100 I believe I can created a nested
do loop and starting at x=0, y=0 create a table that would present 100 squares each with 4 X,Y coordinates
for a total of 100 rows and 400 total X,Y points.
using counters and running total I should be able to build this table in a worksheet incrementally.
This is only a basic structure I am looking for, my final code would have a starting point that could be 5,4 (x,y) as initial point for example
Also depending on a variable the y value may dynamically change
That detail is not necessary for this exericse, however I believe it is important to capture the last known value for x, y to create the next row instead of just multiplying by progressively larger counters
as my final code will be dependent on changing y values.
a simple generic strategy or working code would be greatly appreciated.
Please see the graphic below and the table of data to generate below.
coordinate_grid1.GIF
thank you
Chris
top left X top left Y top right X top right Y bottom left X bottom left Y bottom right X bottom right Y cell name 0 0 100 0 0 100 100 100 A1 101 0 200 0 101 100 200 100 B1 0 101 100 101 0 200 100 200 A2 101 101 200 101 101 200 200 200 B2
Bookmarks