I'm trying to make sense of some map Logic... Imagine a map, divided in cells, extending from -250 to 250, including 0,in both x and y axes... Its easy obtaining the total amount of squares. (250*250+1) will give me the number of Lines and of collumns, so the total amout of cell is (rows*Collumns).... In this case: 501*501=251001 For some reason, I HAVE TO USE THIS IN A SEARCH, but Then it gets complicated.... How do I get the Coordinates for a specific cell, trough its number... Imagine I need to convert cell 36862 to X:Y , HOW????

Thanks, but it shed litle light for what i need.. you forgot that I have negative values, referenced to a 0 colun and a 0 row, so my map look a litle like this: -3 -2 -1 0 1 2 3 +--+--+--+--+--+--+--+ 3 |01|02|03|04|05|06|07| +--+--+--+--+--+--+--+ 2 |08|09|10|11|12|13|14| +--+--+--+--+--+--+--+- 1 |15|16|17|18|19|20|21| +--+--+--+--+--+--+--+ 0 |22|23|24|25|26|27|28| +--+--+--+--+--+--+--+ -1 |29|30|31|32|33|34|35| +--+--+--+--+--+--+--+ -2 |36|37|38|39|40|41|42| +--+--+--+--+--+--+--+ -3 |44|45|46|47|48|49|50| +--+--+--+--+--+--+--+ Only a LOT larger...

No problem. The previous code Code: index=36862row=Int(index/501)col=index Mod 501 becomes Code: rowo=-177 ' rowcolo=39 ' colrow0=-250 ' first row numbercol0=-250 ' first col number rownb=501 ' number of rowscolnb=501 ' number of colsindex=(rowo-row0)*colnb+col0) ' =36862 cell indexrow=Int(index/501)+row0 ' calculated rowcol=index Mod 501+col0 ' calculated col Best regards

Klaus you must be a math-magician! I like Cableguy couldn't see how your code works, but the explanation was great and you made it look so simple. Personally I hate maths and always struggle with it Regards, RandomCoder

Hi RandomCoder, I am glad to hear that my explanations were clear. I am an engineer and of course like maths. Best regards.