Hi Tom

There's a typo in my math code

rowsReply should be colsReply

Here's what it tries to do

Say you have a 3 x 5 table there will be 15 values in the text array, textArray(0) to textArray(14). Consider the last> textArray(14) which should go in Cell(3,5)
14\5(cols)=2 and 2+1=3= Row
14 mod 5 = 4 and 4+1 =5 = Column (mod is basically "remainder" when you divide > 14 mod 5 = 2 remainder 4)

The order will depend on HOW the user selects the shapes originally. If they select one by one with ctrl click from the start it will give a different result than dragging a selection box for example. Checking every possible combo is going to be hard but you may be able to check for the shaperange being in forward or reverse order (the most likely problem) fairly easily by comparing the top and left value for ShapeRange(1) with those for .ShapeRange(.Shaperange.Count). You would then need to reverse (or not) the initial loop that gathers the textranges.

You would need to alter the type of loop to do this

For i = 1 to 1 to .ShapeRangeCount
shp= .ShapeRange(i)

OR depending on the check

For i = .ShapeRangeCount to 1 Step -1
shp= .ShapeRange(i)