EXCEL 全角转半角

excel 全角数字转半角:利用函数asc()

 删除空白行列宏实现

Sub 检查所有工作表删除空白行列()
For icount = 1 To Sheets.Count
maxrow = Sheets(icount).UsedRange.Rows.Count
maxcol = Sheets(icount).UsedRange.Columns.Count '检查列数
For k = maxrow To 1 Step -1

If WorksheetFunction.CountA(Sheets(icount).Rows(k)) = 0 Then
Sheets(icount).Rows(k).Delete '删除行

End If

Next

For k = maxcol To 1 Step -1

If WorksheetFunction.CountA(Sheets(icount).Columns(k)) = 0 Then
Sheets(icount).Columns(k).Delete '"删除列"

End If

Next
Next
End Sub
Sub 增加安全班会()
For Each sht In Worksheets
If sht.Name <> "Sheet1" Then

sht.Select
sht.Activate
   Range("G17:G18").Select
    ActiveCell.FormulaR1C1 = "安全课"
    Range("H19").Select
End If
Next
End Sub

 

posted @ 2023-09-20 20:33  myrj  阅读(140)  评论(0编辑  收藏  举报