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

½Ð°Ý¦p¦ó¥d±±¤Ø¤o¬O§_¦X³W

½Ð°Ý¦p¦ó¥d±±¤Ø¤o¬O§_¦X³W

[ª©¥DºÞ²z¯d¨¥]
  • Hsieh(2015-8-7 16:38): §PÂ_¦¡¿ù»~¡A«Øij¤W¶ÇÀÉ®×¥HÁA¸Ñ°ÝÃD

½Ð°Ý¦U¦ì¤j¤j
§Ú»Ý­n¿z¿ï¤Ø¤oªº¸ê®Æ¬O§_¦X³W©w
¤Ø¤oªº½d³ò¬°156mm~156.5mm
§t156mm¤£§t156.5mm
§Ú¼gªº¦p¤U

A = Range("a3").CurrentRegion.Rows.Count
Dim N As Variant, O As Variant, P As Variant, Q As Variant
For i = 1 To A
N = Range("N" & i + 2)
O = Range("O" & i + 2)
P = Range("P" & i + 2)
Q = Range("Q" & i + 2)
If N >= 156 < 156.5 And O >= 156 < 156.5 And P >= 156 < 156.5 And Q >= 156 < 156.5 Then
    Range("bq" & i + 2) = "¤Ø¤o¦X³W"
ElseIf N < 156 >= 156.5 And O < 156 >= 156.5 And P < 156 >= 156.5 And Q < 156 >= 156.5 Then
    Range("bq" & i + 2) = "¤Ø¤o¤£¦X³W"
End If
Next i
¶]¤£¥X¨Óµ²ªG
½Ð¦U¦ì¹F¤HÀ°À°¦£¤F
ÁÂÁÂ

¥»©«³Ì«á¥Ñ mark15jill ©ó 2015-8-7 16:57 ½s¿è
½Ð°Ý¦U¦ì¤j¤j
§Ú»Ý­n¿z¿ï¤Ø¤oªº¸ê®Æ¬O§_¦X³W©w
¤Ø¤oªº½d³ò¬°156mm~156.5mm
§t156mm¤£§t156.5mm
§Ú¼gªº¦p ...
52ee24 µoªí©ó 2015-8-7 14:31


´£¨Ñ¥H¤U½d¨Ò ½Ð¨Ì»Ý¨D¦Û¦æ­×§ï

µ{¦¡»¡©ú
¤è¦¡1 ±Ä­Ó§O§PÂ_

¤è¦¡2±Ä¿n¤À²Ö¿n¨î
²Å¦X±ø¥ó(>=156   ©Î <156.5) ¿n¤À1
¤£²Å¦X ¿n¤À0


  1. Sub olo()
  2. Dim ds1, ds2 As Integer
  3. Dim xx1, xx3, xx5, xx7 As Integer
  4. ds1 = 156
  5. ds2 = 156.5
  6. '¤è¦¡1
  7. For xx = 1 To 9 Step 2

  8.     For yy = 3 To Cells(2, xx).CurrentRegion.Rows.Count
  9.         qq = Cells(yy, xx)
  10.         If qq <> "" Then
  11.             If Cells(yy, xx) <= ds1 Or Cells(yy, xx) < ds2 Then
  12.                 Cells(yy, xx + 1) = "¦X®æ"
  13.             Else
  14.                 Cells(yy, xx + 1) = "¤£¦X®æ"
  15.             End If
  16.         End If
  17.     Next
  18. Next

  19. '¤è¦¡¤G
  20. For x10 = 3 To Cells(2, 1).CurrentRegion.Rows.Count
  21. sss = 0
  22.     xx1 = Cells(x10, 1): xx3 = Cells(x10, 3): xx5 = Cells(x10, 5): xx7 = Cells(x10, 7)
  23.     If xx1 <= ds1 Or xx1 < ds2 Then sss = sss + 1
  24.     If xx3 <= ds1 Or xx3 < ds2 Then sss = sss + 1
  25.     If xx5 <= ds1 Or xx5 < ds2 Then sss = sss + 1
  26.     If xx7 <= ds1 Or xx7 < ds2 Then sss = sss + 1
  27.     If sss = 4 Then Cells(x10, 10) = "¦X®æ": Cells(x10, 11) = sss Else Cells(x10, 10) = "¤£¦X®æ": Cells(x10, 11) = sss
  28.    
  29. Next
  30. End Sub
½Æ»s¥N½X
6566is.rar (15.02 KB)

PS ¤èªk1¦ü¥G¦³°ÝÃD¡A½Ð¦Û¦æ­×§ïXDD

  ¦h°µ¦h·Q¦h¾Ç²ß¡A¤Ö¬Ý¤Ö¿ù¤Ö°g³~

  ¦h°µ=¦h¦h½m²ß¡A¦h¦h½s¼g¡C
  ¦h·Q=·Q·Q¬°¤°»ò¤H®aµ{¦¡­n¨º¼Ë¼g¡A¦pªG´«¦¨¦Û¤v¡A¤S·|«ç¼g¡C
  ¦h¾Ç²ß=¾Ç²ß¤H®aªºµo°Ý¨Ã¸Ñµª¡A¾Ç²ß¤H®aªº¼gªk

  ¤Ö¬Ý=¥u¬Ý¤£°µ¤]ªPµM

TOP

¦^´_ 1# 52ee24

³o¼Ë¥i¥H¶Ü?
    If N >= 156 and  N< 156.5 And O >= 156 and O < 156.5 And P >= 156 and P < 156.5 And Q >= 156 and Q < 156.5 Then
          Range("bq" & i + 2) = "¤Ø¤o¦X³W"
    ElseIf N < 156 or N>= 156.5 or O < 156 or O >= 156.5 or P < 156 or P >= 156.5 or Q < 156 or Q >= 156.5 Then
         Range("bq" & i + 2) = "¤Ø¤o¤£¦X³W"
    End If

TOP

ÁÂÁ¦U¦ì¤j¼wªºÀ°¦£
§â¥¦§ï¦¨¦p¤U´N¥i¥H¥Î¤F
ÁÂÁ³á
Dim N As Variant, O As Variant, P As Variant, Q As Variant
For i = 1 To A
N = Range("N" & i + 2)
O = Range("O" & i + 2)
P = Range("P" & i + 2)
Q = Range("Q" & i + 2)
If N >= 156 And N < 156.5 And O >= 156 And O < 156.5 And P >= 156 And P < 156.5 And Q >= 156 And Q < 156.5 Then
    Range("bq" & i + 2) = "¤Ø¤o¦X³W"
ElseIf N < 156 Or N >= 156.5 And O < 156 Or O >= 156.5 And P < 156 Or P >= 156.5 And Q < 156 Or Q >= 156.5 Then
    Range("bq" & i + 2) = "¤Ø¤o¤£¦X³W"
End If
Next i

TOP

        ÀR«ä¦Û¦b : ºÉ¦h¤Ö¥»¥÷¡A´N±o¦h¤Ö¥»¨Æ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD