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

¦p¦ó¦Û°Ê¤ñ¹ï¼Æ¦r±a¥X¼Ð·Ç­È

¦p¦ó¦Û°Ê¤ñ¹ï¼Æ¦r±a¥X¼Ð·Ç­È

¦U¦ì¤j¤j

¤p§Ì¿ý»s¤A­Ó¥¨¶°, ¤À§O¿z¿ï¥X³æ¤@¼Æ¦r©Î¦h­Ó¼Æ¦rÀx¦s®æªº­È

§Ú·Q¥ÎVBA¥h¤ñ¹ï¤@­Ó¨Æ¥ý°µ¦nªº¼Ð·Ç­È, ¦A±a¥Xµ²ªG

·Ð½Ð¥ý¶i«ü¾É
TEST4.rar (32.66 KB)

¥»©«³Ì«á¥Ñ hugh0620 ©ó 2012-4-3 09:19 ½s¿è

¦^´_ 1# luke


   ¥Î¤@­Ó³Ì²³æªº¤è¦¡¨Ó¼g[if]
  1. Sub ex()
  2. For j = 2 To 4 Step 2    '¦C¼Æ,¸ê®Æ­n¶]²Ä2&4¦C
  3.      For i = 1 To 10          'Äæ¦ì±qA¨ìJ
  4.            If 30.5 < Cells(j, i) And Cells(j, i) <= 40 Then
  5.                Cells(j + 1, i) = 40    '¸ê®Æ©ñ¦b²Ä3&5¦C
  6.            ElseIf 25.5 < Cells(j, i) And Cells(j, i) <= 30.5 Then
  7.               Cells(j + 1, i) = 30
  8.            ElseIf 20.5 < Cells(j, i) And Cells(j, i) <= 25.5 Then
  9.               Cells(j + 1, i) = 25
  10.            ElseIf 16.5 < Cells(j, i) And Cells(j, i) <= 20.5 Then
  11.               Cells(j + 1, i) = 20
  12.            ElseIf 12.1 < Cells(j, i) And Cells(j, i) <= 16.5 Then
  13.               Cells(j + 1, i) = 16
  14.            ElseIf 10.1 < Cells(j, i) And Cells(j, i) <= 12.1 Then
  15.               Cells(j + 1, i) = 12
  16.            ElseIf 8.1 < Cells(j, i) And Cells(j, i) <= 10.1 Then
  17.               Cells(j + 1, i) = 10
  18.            ElseIf 6.1 < Cells(j, i) And Cells(j, i) <= 8.1 Then
  19.               Cells(j + 1, i) = 8
  20.            ElseIf 4.1 < Cells(j, i) And Cells(j, i) <= 6.1 Then
  21.               Cells(j + 1, i) = 6
  22.            ElseIf 2# < Cells(j, i) And Cells(j, i) <= 4.1 Then
  23.               Cells(j + 1, i) = 4
  24.            ElseIf 0 < Cells(j, i) And Cells(j, i) <= 2.1 Then
  25.               Cells(j + 1, i) = 2
  26.            End If
  27.      Next
  28. Next
  29. End Sub
½Æ»s¥N½X
¾Ç²ß¤~¯à´£¤É¦Û¤v

TOP

¦^´_ 1# luke
¥[¤JR6~R16,§@¬°¤ñ¹ï¨Ì¾Ú
  1. Sub XX()
  2. For Each a In [A2:J2,A4:J4]
  3.   For Each b In [R6:R16]
  4.     If a <= b Then
  5.        a.Offset(1, 0) = Int(b)
  6.        Exit For
  7.     End If
  8.   Next
  9. Next
  10. End Sub
½Æ»s¥N½X

TOP

¦^´_ 1# luke
  1. Sub ex()
  2. Dim Ay()
  3. a = Array(0, 2.1, 4.1, 6.1, 8.1, 10.1, 12.1, 16.5, 20.5, 25.5, 30.5)
  4. b = Array(2, 4, 6, 8, 10, 12, 16, 20, 25, 30, 40)
  5. For Each c In [A1:J1]
  6.    If InStr(c, ",") > 0 Then
  7.       ar = Split(c, ",")
  8.       For Each x In ar
  9.         ReDim Preserve Ay(s)
  10.         Ay(s) = x / [P1]
  11.         s = s + 1
  12.       Next
  13.       d = Application.Max(Ay)
  14.       e = Application.Sum(Ay)
  15.       Erase Ay: s = 0
  16.       Else
  17.       d = c / [P1]: e = c / [P1]
  18.    End If
  19.    f = Application.Lookup(d, a, b)
  20.    g = Application.Lookup(e, a, b)
  21.    c.Offset(1).Resize(4, 1) = Application.Transpose(Array(d, f, e, g))
  22. Next
  23. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 3# register313


«D±`¹ê¥Î(´ú¸ÕOK)


    ÁÂÁÂ"register313"«e«á¨â¦¸ªº¸Ñµª

TOP

        ÀR«ä¦Û¦b : ½_ÁJµ²±o¶V¹¡º¡¡A¶V·|©¹¤U««¡A¤@­Ó¤H¶V¦³¦¨´N¡A´N­n¶V¦³Á¾¨Rªº¯ÝÃÌ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD