- ©«¤l
- 75
- ¥DÃD
- 19
- ºëµØ
- 0
- ¿n¤À
- 135
- ÂI¦W
- 0
- §@·~¨t²Î
- win7
- ³nÅ骩¥»
- 2007 010
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2010-5-18
- ³Ì«áµn¿ý
- 2013-10-26
|
Sub usedrange¦æ¦C()
Dim Col_Count As Long
With ActiveSheet.UsedRange
For Col_Count = .Columns.Count To 1 Step -1
If WorksheetFunction.CountA(.Item(1).Resize(1, .Columns.Count)(Col_Count).EntireColumn) = 0 Then
.Item(1).Resize(1, .Columns.Count)(Col_Count).EntireColumn.Delete
End If
Next
End With
Dim Row_Count As Long
With ActiveSheet.UsedRange
For Row_Count = .Rows.Count To 1 Step -1
If WorksheetFunction.CountA(.Item(1).Resize(.Rows.Count, 1)(Row_Count).EntireRow) = 0 Then
.Item(1).Resize(.Rows.Count, 1)(Row_Count).EntireRow.Delete
End If
Next
End With
With ActiveSheet.UsedRange
MsgBox "¤w¥Îªº区°ì¦a§}为¡G" & .Address & Chr(13) & "³Ì¤j¦æ为¡G" & .Rows.Count & Chr(13) & "³Ì¤j¦C为¡G" & .Columns.Count _
& Chr(13) & "¦@¦³单¤¸®æ数¡G" & .Cells.Count & Chr(13) & "²Ä¤@¦æ为¡G" & .Item(1, 1).Row & Chr(13) & "²Ä¤@¦C为¡G" & .Item(1, 1).Column
End With
End Sub
¤j®a¦A·Q·Q¡A还¦³¤°¤\§Ñ±¼ªº¡A¦]为usedrange«D±`¯S别 |
|