Need to calculate X and Y co-ordinates in show in a table

Emmar01

Board Regular
Joined
Nov 27, 2003
Messages
76
Picture this - I want to be able to create a (...non-VBA solution would be preferred...) table of X- and Y-coordinates based on user input for up to a 5x5 grid. The user enters the number of rows (say 2) and then the spacing between each. They do the same thing for number of columns (say 3) with the required spacing. I already set up data validation so that the number of rows and columns do not exceed 5. So in theory there can be a 1x1 or a 5x5 and everything in between.

My question is this - how can I then use that input to create a table of X- and Y-co-ordinates for the full ranges of values? Assume that the first point (row 1, column 1) starts at 0,0. For example if the user inputs:
Number of rows = 2
Number of columns = 3
Spacing between rows = 125mm
Spacing between columns = 150mm, I would expect the table to return these values:

X Y
0 0
150 0
300 0
0 125
150 125
300 125

Bonus for 20 points - how could I then plot these as discrete points on a chart?
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.

Forum statistics

Threads
1,215,069
Messages
6,122,951
Members
449,095
Latest member
nmaske

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top