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

[µo°Ý] ¦p¦ó¦b¤£¦P°Ï¶¡¤º¼Ð¥Ü³Ì¤p­È?

¦^´_ 1# freeffly
¸Õ¸Õ¬Ý
  1. Option Explicit
  2. Sub Ex()
  3.     Dim i As Single, r As String, xMin As Double, xMax As Double
  4.     Cells.Interior.ColorIndex = xlNone
  5.     i = 2
  6.     r = i
  7.     Do While Cells(i, "a") <> ""
  8.         If Cells(i, "a") <> Cells(i + 1, "a") Then
  9.             With Rows(r & ":" & i)
  10.                 xMin = Application.Min(.Cells)
  11.                 xMax = Application.Max(.Cells)
  12.                 .Cells.Replace xMin, "=err", xlWhole
  13.                 With .SpecialCells(xlCellTypeFormulas, xlErrors)
  14.                     .Cells = xMin
  15.                     .Interior.ColorIndex = IIf(xMin <> xMax, 38, 34)
  16.                 End With
  17.                 If xMin <> xMax Then
  18.                     .Cells.Replace xMax, "=err", xlWhole
  19.                     With .SpecialCells(xlCellTypeFormulas, xlErrors)
  20.                         .Cells = xMax
  21.                         .Interior.ColorIndex = 8
  22.                     End With
  23.                 End If
  24.             End With
  25.             r = i + 1
  26.         End If
  27.         i = i + 1
  28.     Loop
  29. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 4# freeffly
¸Õ¸Õ¬Ý
  1. Option Explicit
  2. Sub Ex()
  3.     Dim i As Single, r As String, xMin As Double, xMax As Double
  4.     Cells.Interior.ColorIndex = xlNone
  5.     i = 2
  6.     r = i
  7.     Do While Cells(i, "a") <> ""
  8.         If Cells(i, "a") <> Cells(i + 1, "a") Then
  9.             With Range("A" & r & ":" & "A" & i).Offset(, 5).Resize(, 4)
  10.               'Offset(, 5) =>AÄæ¨ì5¤ëªºÄæ¼Æ(FÄæ)
  11.               'Resize(, 4) =>4Äæ (5¤ë-8¤ë )
  12.                 xMin = Application.Min(.Cells)
  13.                 xMax = Application.Max(.Cells)
  14.                 If xMin <> 0 And xMax <> 0 Then
  15.                     .Cells.Replace xMin, "=err", xlWhole
  16.                     With .SpecialCells(xlCellTypeFormulas, xlErrors)
  17.                         .Cells = xMin
  18.                         .Interior.ColorIndex = IIf(xMin <> xMax, 38, 34)
  19.                     End With
  20.                     If xMin <> xMax Then
  21.                         .Cells.Replace xMax, "=err", xlWhole
  22.                         With .SpecialCells(xlCellTypeFormulas, xlErrors)
  23.                             .Cells = xMax
  24.                             .Interior.ColorIndex = 8
  25.                         End With
  26.                     End If
  27.                 End If
  28.             End With
  29.             r = i + 1
  30.         End If
  31.         i = i + 1
  32.     Loop
  33. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : ¡i®É¶¡µLªk¾B¾×¡j©È®É¶¡®ø³u¡Aªá¤F³\¦h¤ß¦å¡A·QºÉ¦U¦¡¤èªk­n¾B¾×®É¶¡¡Aµ²ªG¬O¡G®ö¶O¤F§ó¦h®É¶¡¡A¥B¤@µL©Ò¦¨¡I
ªð¦^¦Cªí ¤W¤@¥DÃD