does anybody have a formula that will allow me to get the Y and X of a location in a 2d array based on its number counting along through the elements, so in a 5x5 array count at 3, 4 is 19, at 2, 2 count is 12 etc.
i made up the below one but i found it only works with square areas, rectangles give lots of - X coordinate numbers and incorrect Y coordinate ones, strangely the chart output still comes out ok..?
i am rubbish at maths as you can see
i have done a formula to give me the element number from the co-ordinates but i cant reverse it properlyCode:Ycoord = element_number / Y_Range; Xcoord = element_number - X_Range * Ycoord;