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

[µo°Ý] ·Q±N­«¶q·h¨ì¬Û¦P¸ê®Æªº²Ä¤@¦æ

[µo°Ý] ·Q±N­«¶q·h¨ì¬Û¦P¸ê®Æªº²Ä¤@¦æ

¤j®a¦n!

§Ú·Q±N¥ª¤èºñ¦âªº­«¶q
·h¨ì©M¥k¤è¸ê®Æ¤@¼Ë(E1:G11)
§Y¬O±N
C5¸ê®Æ·h¨ìC2
(§Y¬OB¦C¤¤1234567894ªº²Ä¤@¦æ)

C11·h¨ìC6
(§Y¬OB¦C¤¤1234567900ªº²Ä¤@¦æ)

§Ú¥ÎIF CELLS(I , 2)  = 1¤w¥i±NC5¸ê®ÆCOPY
¦ý§Ú¤£À´¦V¤WÀˬd¬Û¦P¸ê®Æ¤¤ªº²Ä¤@¦æ¦ì¸m

¥ýÁÂ

Book1.zip (5.21 KB)

¦^´_  joslau
Hsieh µoªí©ó 2013-12-3 14:15



    «¢«¢~~~ÁÂÁÂHsieh¦^ÂÐ
....­n¦A¬ã¨s

(¨ä¹êGBKEE¨º¬qCODE¤wªá¤F¤£¤Ö®É¶¡¬ã¨s...)

TOP

¦^´_ 9# joslau
  1. Sub ex()
  2. Dim A As Range, B As Range, Rng As Range
  3. With Sheet1
  4. Set Rng = .Range("A:A").Find("DATA1", lookat:=xlWhole) '§äAÄæ¼ÐÃD¦C¦ì¸m
  5. If Not Rng Is Nothing Then
  6. If Application.Count(Rng.CurrentRegion.Columns(3)) > 0 Then '¸ê®ÆCÄæ¼Æ­È¼Æ¶q§PÂ_
  7.    For Each A In Rng.CurrentRegion.Columns(3).SpecialCells(xlCellTypeConstants, 1) '¨C­Ó¼Æ­È°µ°j°é
  8.      Set B = Rng.CurrentRegion.Columns(2).Find(A.Offset(, -2), lookat:=xlWhole) '§ä¨ìBÄæ²Ä¤@­Ó¦ì¸m
  9.      If Not B Is Nothing Then A.Cut B.Offset(, 1) '²¾°Ê¦ì¸m
  10.    Next
  11. End If
  12. End If
  13. End With
  14. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¤j­P§¹¦¨§Ú»Ý­nªºªF¦è¤F
¦A¦¸¦hÁÂGBKEE
  1. Sub autopl()
  2. Dim i As Long
  3. Dim MyString, myLen

  4. For i = 15 To [a65536].End(4).Row
  5. MyString = Cells(i, 2)
  6. If Len(MyString) = 10 Then
  7.         Cells(i, 9).FormulaR1C1 = ""
  8.         Cells(i, 10).FormulaR1C1 = ""
  9.         Cells(i, 11).FormulaR1C1 = ""
  10. End If




  11. Next i

  12. Ex
  13. Ex2
  14. Ex3
  15. Ex4
  16. add1
  17. ctn1


  18. End Sub

  19. Sub Ex()
  20.     Dim Rng As Range, E As Range, lastrow3 As Long
  21.     With ActiveSheet
  22.     lastrow3 = Worksheets("sheet1").Range("a15").End(xlDown).Row
  23.         Set Rng = .Range("J15:J" & lastrow3&).SpecialCells(xlCellTypeBlanks)
  24.         For Each E In Rng.Areas
  25.             If E.Cells(E.Rows.Count).Row < .Rows.Count Then
  26.                 E.Cells(1) = E.Cells(E.Rows.Count + 1)
  27.                 E.Cells(E.Rows.Count + 1) = ""
  28.             End If
  29.         Next
  30.     End With
  31. End Sub

  32. Sub Ex2()
  33.     Dim Rng2 As Range, D As Range, lastrow2 As Long
  34.     With ActiveSheet
  35.     lastrow2 = Worksheets("sheet1").Range("a15").End(xlDown).Row
  36.         Set Rng2 = .Range("I15:I" & lastrow2&).SpecialCells(xlCellTypeBlanks)
  37.         For Each D In Rng2.Areas
  38.             If D.Cells(D.Rows.Count).Row < .Rows.Count Then
  39.                 D.Cells(1) = D.Cells(D.Rows.Count + 1)
  40.                 D.Cells(D.Rows.Count + 1) = ""
  41.             End If
  42.         Next
  43.     End With
  44. End Sub

  45. Sub Ex3()
  46.     Dim Rng3 As Range, f As Range, lastrow5 As Long
  47.     With ActiveSheet
  48.     lastrow5 = Worksheets("sheet1").Range("a15").End(xlDown).Row
  49.         Set Rng3 = .Range("k15:k" & lastrow5&).SpecialCells(xlCellTypeBlanks)
  50.         For Each f In Rng3.Areas
  51.             If f.Cells(f.Rows.Count).Row < .Rows.Count Then
  52.                 f.Cells(1) = f.Cells(f.Rows.Count + 1)
  53.                 f.Cells(f.Rows.Count + 1) = ""
  54.             End If
  55.         Next
  56.     End With
  57. End Sub

  58. Sub Ex4()

  59. Dim rw As Long
  60. For rw = 15 To [a65536].End(4).Row
  61. If Cells(rw, 2).Value = 1 Then Cells(rw, 2).EntireRow.Delete
  62. Next rw

  63. End Sub

  64. Sub add1()

  65. Dim l As Long

  66. For l = 15 To [a65536].End(4).Row
  67. If Cells(l, 2) <> "" Then
  68.         Cells(l, 2).FormulaR1C1 = ""
  69. End If
  70. Next l
  71.    

  72. End Sub

  73. Sub ctn1()
  74. Dim lastrow4 As Long

  75.     With ActiveSheet
  76.     lastrow4 = Worksheets("sheet1").Range("a15").End(xlDown).Row
  77.     Range("b15").FormulaR1C1 = "0"
  78.     Range("b16").FormulaR1C1 = "=IF(RC[7]="""",R[-1]C,R[-1]C+1)"
  79.     Range("b16").AutoFill Destination:=Range("b16:b" & lastrow4)
  80.     End With
  81. End Sub
½Æ»s¥N½X

TOP

¥»©«³Ì«á¥Ñ joslau ©ó 2013-11-25 20:29 ½s¿è

§¹¦¨!!!!!!
  1. Option Explicit
  2. Sub Ex()
  3.     Dim Rng As Range, E As Range, lastrow As Long
  4.     With ActiveSheet
  5.     lastrow = Worksheets("sheet1").Range("a12").End(xlDown).Row
  6.         Set Rng = .Range("a12:L" & lastrow&).SpecialCells(xlCellTypeBlanks)
  7.         For Each E In Rng.Areas
  8.             If E.Cells(E.Rows.Count).Row < .Rows.Count Then
  9.                 E.Cells(1) = E.Cells(E.Rows.Count + 1)
  10.                 E.Cells(E.Rows.Count + 1) = ""
  11.             End If
  12.         Next
  13.     End With
  14. End Sub
½Æ»s¥N½X

TOP

¦^´_ 5# GBKEE

ÁÂÁ¦^ÂÐ

    ¦]¨C¦¸¦æ¼Æ¤£¤£¼Ë....¥¿¬ã¨s¤¤

TOP

¦^´_ 5# bmouth
4# ¥Î·Æ¹«¶K»s§Y¥i¡C

TOP

¦^´_ 5# bmouth
§A¥i»s§@ 3# ¹Ï¥Ü¤º®e,°õ¦æ4#ªºµ{¦¡½X,¸Õ¸Õ
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2013-11-23 18:57 ½s¿è

¦^´_ 3# joslau
  1. Sub Ex()
  2.     Dim Rng As Range, E As Range
  3.     With ActiveSheet
  4.         Set Rng = .Range("C12:C23").SpecialCells(xlCellTypeBlanks)
  5.         For Each E In Rng.Areas
  6.             If E.Cells(E.Rows.Count).Row < 23 Then
  7.                 E.Cells(1) = E.Cells(E.Rows.Count + 1)
  8.                 E.Cells(E.Rows.Count + 1) = ""
  9.             End If
  10.         Next
  11.     End With
  12. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_  joslau
¸Õ¸Õ¬Ý
GBKEE µoªí©ó 2013-11-23 14:13



ÁÂÁ¦^ÂÐ

¦ý¦pªG§Ú¥HA¦C°µ¤@­Ó½d³ò
¦Ó¸Ó½d³ò¬O¥HA12¶}©l

½d³ò¥~ªº¤W¤U¹j¤F¤@¦æ¥i¯à·|¦³¨ä¥L¸ê®Æ

§Y¬O¬õ¦â³¡¥÷¥i¯à·|¦³¨ä¥L¸ê®Æ

¬O§ï" Set Rng = "¨º¦æ?
  1. Worksheets("Sheet1").Range("c12").End(xlDown).SpecialCells(xlCellTypeBlanks)
½Æ»s¥N½X
¦n¹³°_¤£¤F§@¥Î

À³¸Ó¬O«ç¼Ë¼g?

TOP

        ÀR«ä¦Û¦b : ¤Ó¶§¥ú¤j¡B¤÷¥À®¦¤j¡B§g¤l¶q¤j¡A¤p¤H®ð¤j¡C
ªð¦^¦Cªí ¤W¤@¥DÃD