excel - Generate x, y coordinates from input parameters -


i trying overlay patient data on top of optical image. need assign x,y coordinates each patient file in bunch of designated boxes in optical image.

i doing hand wanted try , automatically giving excel starting coordinate (for upper left corner pixel of each box), number of rows , columns box spacing between each pixel. need x , y coordinates in separate cells.

for instance, box 3 rows, 4 columns, pixel spacing of 20 , starting coordinates of (20,50), output should like:

x    y   20   50   40   50   60   50   80   50   20   70   40   70   60   70   80   70   20   90   40   90   60   90   80   90   

according description maybe:

enter image description here

formulas:

a8:

=if(row(1:1)<=$b$1*$b$2,$b$4+mod(row(1:1)-1,$b$2)*$b$3) 

b8:

=if(a8,$b$5+$b$3*int((row(1:1)-1)/$b$2)) 

both formulas copied downwards needed.

transposed version:

enter image description here

formulas:

b7:

=if(column(a:a)<=$b$1*$b$2,$b$4+mod(column(a:a)-1,$b$2)*$b$3) 

b8:

=if(b7,$b$5+$b$3*int((column(a:a)-1)/$b$2)) 

both formulas copied sidewards needed.


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -