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

[µo°Ý] °j°éµ{¦¡½X¡A½Ð°Ý¬O§_¦³§ó§Öªº°õ¦æ¤è¦¡??

[µo°Ý] °j°éµ{¦¡½X¡A½Ð°Ý¬O§_¦³§ó§Öªº°õ¦æ¤è¦¡??

½Ð°Ý¤j¤j­Ì¡A¦p¹F¨ì¤U­±°j°éµ{¦¡½X¡A¯à°÷¦³§ó§Öªº°õ¦æ¤è¦¡¶Ü??
(a1~a65535³£¦³¼Æ¦r¡A§PÂ_¬O§_¦b½d³ò¤¤¡A¦pªG¤£¦b½d³ò¤¤«h½Æ»sªÅ¥Õ)


sub xx()
Dim my_min%, my_max%
my_min = 30
my_max = 50
Sheet1.Cells(27) = "Num"
Sheet1.Cells(28) = "x(1)"
Sheet1.Cells(29) = "y(2)"
Sheet1.Cells(30) = "iv(3)"
Sheet1.Cells(31) = "vf(4)"
For i = 2 To 65535
   Sheet1.Cells(i, 27) = Sheet3.Cells(i, 1)
   If Sheet3.Cells(i, 6) > my_min And Sheet3.Cells(i, 6) < my_max Then
    Sheet1.Cells(i, 28) = Sheet3.Cells(i, 3)
    Sheet1.Cells(i, 29) = Sheet3.Cells(i, 4)
    Sheet1.Cells(i, 30) = Sheet3.Cells(i, 5)
    Sheet1.Cells(i, 31) = Sheet3.Cells(i, 6)
  End If
Next i
end xx

·PÁ¦U¦ì¤j¤jªº¨ó§U¡A§Ú¸Õ¤F¤@¤Ustillfish00 ©MGBKEE ªº¤èªk
¤p§Ì­ì¥»ªºµ{¦¡½X°õ¦æ¬ù2¬í¡A¥Î¤F¨â¦ì¤j¤jªºµ{¦¡½X¡A0.¦h¬í´N¥i°õ¦æ§¹¦¨
¤p§Ì¨ü±Ð¤F

¤£¹LÁÙ¬OGBKEEªº°}¦C³t«×³Ì§Ö

TOP

¦^´_ 1# swtseng      
¸Õ¸Õ¬Ý
  1. Option Explicit
  2. Sub xx()
  3. Dim my_min%, my_max%, i&, Ar(2 To 65535, 1 To 5)
  4. my_min = 30
  5. my_max = 50
  6. Sheet1.Cells(27) = "Num"
  7. Sheet1.Cells(28) = "x(1)"
  8. Sheet1.Cells(29) = "y(2)"
  9. Sheet1.Cells(30) = "iv(3)"
  10. Sheet1.Cells(31) = "vf(4)"
  11. For i = 2 To 65535
  12.    Ar(i, 1) = Sheet3.Cells(i, 1)
  13.    If Sheet3.Cells(i, 6) > my_min And Sheet3.Cells(i, 6) < my_max Then
  14.     Ar(i, 2) = Sheet3.Cells(i, 3)
  15.     Ar(i, 3) = Sheet3.Cells(i, 4)
  16.     Ar(i, 4) = Sheet3.Cells(i, 5)
  17.     Ar(i, 5) = Sheet3.Cells(i, 6)
  18.   End If
  19. Next i
  20. Sheet1.Cells(2, 27).Resize(65534, 5) = Ar
  21. End Sub
½Æ»s¥N½X

TOP

½Ð°Ý¤j¤j­Ì¡A¦p¹F¨ì¤U­±°j°éµ{¦¡½X¡A¯à°÷¦³§ó§Öªº°õ¦æ¤è¦¡¶Ü??
(a1~a65535³£¦³¼Æ¦r¡A ...
swtseng µoªí©ó 2012-10-26 14:36


¥ýcopy¨ì¦P¤@­Ósheet¦A°µ¤ñ¸û , ¸Õ¬Ý¬Ý:
  1. Sub test()
  2.     Application.ScreenUpdating = False
  3.    
  4.     Dim my_min%, my_max%
  5.     my_min = 30
  6.     my_max = 50
  7.    
  8.     sheet1.Range("AA:AA") = sheet3.Range("A:A").Value
  9.     sheet1.Range("AB:AE") = sheet3.Range("C:F").Value
  10.    
  11.     sheet1.Cells(27) = "Num"
  12.     sheet1.Cells(28) = "x(1)"
  13.     sheet1.Cells(29) = "y(2)"
  14.     sheet1.Cells(30) = "iv(3)"
  15.     sheet1.Cells(31) = "vf(4)"
  16.    
  17.     Dim n As Range
  18.     For Each n In sheet1.Range("AE2:AE65535")
  19.         If n.Value > my_min And n.Value < my_max Then
  20.         Else
  21.             n.Offset(, -3).Resize(, 4).ClearContents
  22.         End If
  23.     Next n
  24.    
  25.     Application.ScreenUpdating = True
  26. End Sub
½Æ»s¥N½X

TOP

¥»©«³Ì«á¥Ñ mark15jill ©ó 2012-10-26 16:46 ½s¿è
½Ð°Ý¤j¤j­Ì¡A¦p¹F¨ì¤U­±°j°éµ{¦¡½X¡A¯à°÷¦³§ó§Öªº°õ¦æ¤è¦¡¶Ü??
(a1~a65535³£¦³¼Æ¦r¡A§PÂ_¬O§_¦b½d³ò¤¤¡A¦p ...
swtseng µoªí©ó 2012-10-26 14:36
  1. '²©ö§PÂ_
  2. kk = ¤u§@ªí2.Range("c1").CurrentRegion.Rows.Count
  3.     For sj = 1 To kk
  4.        For uu = 8 To 11
  5.             ¤u§@ªí1.Cells(sj, uu) = ¤u§@ªí2.Cells(sj, uu - 5)
  6.        Next
  7.     Next
½Æ»s¥N½X
sj =§PÂ_¦æ¼Æ
uu=±q N ¨ì K Äæ ( ¦b¦¹¥H 8~11Äæ ¬°¨Ò)

  ¦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# swtseng
  1. For i = 2 To Sheet1.Cells(2, 27).End(xlDown).Row
  2.     .............
  3. Next i
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : ¦³Ä@©ñ¦b¤ß¸Ì¡A¨S¦³¨­Åé¤O¦æ¡A¥¿¦p¯Ñ¥Ð¤£¼½ºØ¡A¬Ò¬OªÅ¹L¦]½t¡C
ªð¦^¦Cªí ¤W¤@¥DÃD