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

[µo°Ý] «ü©w°Ï°ì¤ºªº³Ì¤j¼Æ¼Ð¥Ü¶À©³¦âªº»yªk¡C

¥»©«³Ì«á¥Ñ n7822123 ©ó 2019-6-9 18:33 ½s¿è

¦^´_ 1# ziv976688

¸Õ¸Õ¬Ý!

Sub Ex()
Dim i%, j%, x%, max%,rg As Range
For i = 1 To 10: x = IIf(i = 10, 4, 5)
  For j = 1 To 10
      If j = 1 Then
        Set rg = Cells(7 * j, 5 * i - 3).Resize(1, x)
      Else
        Set rg = Union(rg, Cells(7 * j, 5 * i - 3).Resize(1, x))
      End If
    Next j
    rg.Interior.Color = -1  '«ì´_µL¦â
    Max = WorksheetFunction.Max(rg)
    For Each cel In rg
      If cel = Max Then
        cel.Interior.Color = RGB(255, 255, 0): Exit For
      End If
   Next
Next i
End Sub

³Ì¤j¼Æ¼Ð¥Ü©³¦â.rar (14.25 KB)
µ{¦¡¬O¨Ì»Ý¨D¼gªº¡A»Ý¨Dªí¹F¤£²M·¡
©ÎªÌ¨S¦³¤W¶Çªþ¥ó¡A·R²ö¯à§U

TOP

¦^´_ 3# ziv976688


§âExit for ®³±¼´N¦æ¤F~

Sub Ex()
Dim i%, j%, x%, max%, rg As Range
For i = 1 To 10: x = IIf(i = 10, 4, 5)
  For j = 1 To 10
      If j = 1 Then
        Set rg = Cells(7 * j, 5 * i - 3).Resize(1, x)
      Else
        Set rg = Union(rg, Cells(7 * j, 5 * i - 3).Resize(1, x))
      End If
    Next j
    rg.Interior.Color = -1  '«ì´_µL¦â
    max = WorksheetFunction.max(rg)
    For Each cel In rg
      If cel = max Then cel.Interior.Color = RGB(255, 255, 0)
   Next
Next i
End Sub

³Ì¤j¼Æ¼Ð¥Ü©³¦â.rar (14.68 KB)
µ{¦¡¬O¨Ì»Ý¨D¼gªº¡A»Ý¨Dªí¹F¤£²M·¡
©ÎªÌ¨S¦³¤W¶Çªþ¥ó¡A·R²ö¯à§U

TOP

¦^´_ 6# ziv976688


®¦ ¨Sª`·N¨ì§A³Ì«á¤@¦Cªº¦C¼Æ ¤£¤Ó¤@¼Ë
­×§ï¬õ¦âªº¦a¤è¦p¤U

Sub Ex()
Dim i%, j%, x%, a%, max%, rg As Range
For i = 1 To 10: x = IIf(i = 10, 4, 5)
  
  For j = 1 To 10
      If j = 10 Then a = -1
      If j = 1 Then
        Set rg = Cells(7 * j, 5 * i - 3).Resize(1, x)
      Else
        Set rg = Union(rg, Cells(7 * j + a, 5 * i - 3).Resize(1, x))
      End If
    Next j
   
    If i = 1 Then Stop
    rg.Select
    rg.Interior.Color = -1  '«ì´_µL¦â
    max = WorksheetFunction.max(rg)
    For Each cel In rg
      If cel = max Then cel.Interior.Color = RGB(255, 255, 0)
   Next

Next i
End Sub
µ{¦¡¬O¨Ì»Ý¨D¼gªº¡A»Ý¨Dªí¹F¤£²M·¡
©ÎªÌ¨S¦³¤W¶Çªþ¥ó¡A·R²ö¯à§U

TOP

¥»©«³Ì«á¥Ñ n7822123 ©ó 2019-6-11 11:44 ½s¿è

¦^´_ 8# ziv976688


«x~~~~deubg¥Îªº...§Ñ°O§R°£¤F...........

³o¨â¦æµ{¦¡½Ð§R±¼~~~XD

If i = 1 Then Stop
rg.Select


§¹¾ãµ{¦¡¦p¤U

Sub Ex()
Dim i%, j%, x%, a%, max%, rg As Range
For i = 1 To 10: x = IIf(i = 10, 4, 5)
  For j = 1 To 10
      If j = 10 Then a = -1
      If j = 1 Then
        Set rg = Cells(7 * j, 5 * i - 3).Resize(1, x)
      Else
        Set rg = Union(rg, Cells(7 * j + a, 5 * i - 3).Resize(1, x))
      End If
    Next j
    rg.Interior.Color = -1  '«ì´_µL¦â
    max = WorksheetFunction.max(rg)
    For Each cel In rg
      If cel = max Then cel.Interior.Color = RGB(255, 255, 0)
   Next
Next i
End Sub
µ{¦¡¬O¨Ì»Ý¨D¼gªº¡A»Ý¨Dªí¹F¤£²M·¡
©ÎªÌ¨S¦³¤W¶Çªþ¥ó¡A·R²ö¯à§U

TOP

¥»©«³Ì«á¥Ñ n7822123 ©ó 2019-6-11 22:11 ½s¿è

¦^´_ 10# ziv976688


¨g¦½~~~~~~¬°¤F»°¤W¯Z¥Ç¤F§C¯Å¿ù»~~

¶]§¹¤@½ü a­È´N¤@ª½¬O-1¤F¡A¤£À³¸Ó³o»ò¼g.........

­×§ï¦p¤U~~


Sub Ex()
Dim i%, j%, x%, a%, max%, rg As Range
For i = 1 To 10: x = IIf(i = 10, 4, 5)
  For j = 1 To 10
      a = IIf(j = 10, -1, 0)
      If j = 1 Then
        Set rg = Cells(7 * j, 5 * i - 3).Resize(1, x)
      Else
        Set rg = Union(rg, Cells(7 * j + a, 5 * i - 3).Resize(1, x))
      End If
    Next j
    rg.Interior.Color = -1  '«ì´_µL¦â
    max = WorksheetFunction.max(rg)
    For Each cel In rg
      If cel = max Then cel.Interior.Color = RGB(255, 255, 0)
   Next
Next i

End Sub
µ{¦¡¬O¨Ì»Ý¨D¼gªº¡A»Ý¨Dªí¹F¤£²M·¡
©ÎªÌ¨S¦³¤W¶Çªþ¥ó¡A·R²ö¯à§U

TOP

        ÀR«ä¦Û¦b : ¤H­nª¾ºÖ¡B±¤ºÖ¡B¦A³yºÖ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD