ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

ÁôÂéҦ³¿ù»~­È

ÁôÂéҦ³¿ù»~­È

ÁôÂéҦ³¿ù»~­È.rar (15.54 KB)

Sub 隐ÂéҦ³错误­È()
  Dim rng As Range, cell As Range
  On Error Resume Next '¨¾¿ù¡AÁקK§ä¤£¨ì¿ù»~­È®É²£¥Í¿ù»~
  With ActiveSheet.UsedRange  '¶È¹ï¤v¥Î°Ï°ì¶i¦æ©w¦ì
    Set rng = .SpecialCells(xlCellTypeFormulas, 16)  '±N¤½¦¡µ²ªG¬°¿ù»~ªº°Ï°ì½á­Èµ¹ÅܶqRNG
    If Err.Number = 0 Then '¦pªGµL¿ù»~¡]¦³¿ù»~¤½¦¡¡^
      Set rng = Union(rng, .SpecialCells(xlCellTypeConstants, 16))  '±N«D¤½¦¡ªº¿ù»~³æ¤¸®æ»PÅܶqRNG¦X¨Ö
    Else  '§_«h±N±`¶q¿ù»~³æ¤¸®æ½á­Èµ¹ÅܶqRNG
      Set rng = .SpecialCells(xlCellTypeConstants, 16)
    End If
    Application.ScreenUpdating = False  '¨Ã³¬«Ì¹õ§ó·s¡A¥[§Ö³t«×
    For Each cell In rng   '¹M¾ú©Ò¦³¿ù»~³æ¤¸®æ
      cell.Font.Color = cell.Interior.Color  '±N¦rÅé¦â³]¸m¬°­I´º¦â
    Next
    Application.ScreenUpdating = True  '«ì´_«Ì¹õ§ó·s
  End With
End Sub

        ÀR«ä¦Û¦b : ­n¥Î¤ß¡A¤£­n¾Þ¤ß¡B·Ð¤ß¡C
ªð¦^¦Cªí ¤W¤@¥DÃD