I guess I should mention that my code assumes the selection is contiguous.
If it is not contiguous, then you will have to tell us what the beginning
and end of the selection means as the selection is constructed in the order
the cell or cells are added to it... that means the first and/or last
selected area could be between what looks like outer areas. For example,
select these areas in the order shown (hold down the Control key while
selecting them)... B2:C5, then A7:C9, then E1:G4 and then E6:F8. Now execute
this line in the Immediate Window...
? Selection.Address
and note the order the addresses are printed in... it's the same order you
selected them in. So, which to you consider the first area and which is the
last? Before you answer too quickly, note the top left area is does not have
the leftmost nor topmost cell in it; nor does the bottom right one contain
the rightmost or bottommost cell