2013-08-31 2 views

ответ

0

Дайте это попробовать:

Sub cutaneous() 
    Dim rNonEmpty As Range 
    Dim rEmpty As Range, r As Range 
    Set rEmpty = Cells.SpecialCells(xlCellTypeBlanks) 
    Set rNonEmpty = Nothing 

    For Each r In ActiveSheet.UsedRange 
     If Intersect(r, rEmpty) Is Nothing Then 
      If rNonEmpty Is Nothing Then 
       Set rNonEmpty = r 
      Else 
       Set rNonEmpty = Union(r, rNonEmpty) 
      End If 
     End If 
    Next r 
    rNonEmpty.NumberFormat = "General" 
    MsgBox rNonEmpty.Address 
End Sub 
Смежные вопросы