See my reply here, third in the thread:
http://forums.xmetal.com/index.php/topic,4037.0.htmlThe two relevant APIs are:
Selection.IsMultiCellSelection
Selection.Cells
If you can provide more information about what you need to accomplish I might be able to suggest something in more detail. Keep in mind that the actual end result (and starting condition) is the most important thing here as sometimes you can get there multiple ways.