Public Sub Igor()
Dim Dtsheet As Excel.Worksheet
Dim TotalC As Long '原始数据范围列
Dim TotalR As Long '原始数据范围行
Dtsheet = Globals.ThisWorkbook.Sheets("sheet1")
TotalC = Dtsheet.Cells.SpecialCells(Excel.XlCellType.xlCellTypeLastCell).Column
TotalR = Dtsheet.Cells.SpecialCells(Excel.XlCellType.xlCellTypeLastCell).Row
Dtsheet.Range("A1", Dtsheet.Cells(TotalR, TotalC)).Replace(What:="", Replacement:="N/A", LookAt:=Excel.XlLookAt.xlWhole, SearchOrder:=Excel.XlSearchOrder.xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False) End Sub