- ©«¤l
- 2
- ¥DÃD
- 1
- ºëµØ
- 0
- ¿n¤À
- 7
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Office 2013
- ¾\ŪÅv
- 10
- ©Ê§O
- ¤k
- µù¥U®É¶¡
- 2016-7-27
- ³Ì«áµn¿ý
- 2016-8-30
|
[µo°Ý] ¦³Ãö"°õ¦æ¶¥¬q¿ù»~13 «¬ºA¤£²Å¦X"°ÝÃD
¥»©«³Ì«á¥Ñ waterful ©ó 2016-8-29 14:24 ½s¿è
¥H¤U¬O¦Û¤v¼gªº«D±`¶§¬Kªº¤ñ¹ï·s³渹µ{¦¡¡A¥X°ÝÃDªº¦b1¨º¦æ¡AY§ï¦¨Find(..., after:=wsh2.Cells(3, 1))«h¤£·|¥X²{¦¹¿ù»~¡A¦ýµ{¦¡®Ä²v®t«Ü¦h!!
¦³¸ÕµÛ±Ni, jªº«¬ºA§ï¬°byte, long, single, double, integer, variantµ¥µ¥¬ÒµLªk§ïµ½, ª¦¤F¤åµo²{¥X²{¦¹¿ù»~°T®§ªºì¦]¤£¤@©w¬O¦]¬°type©w¸q°ÝÃD¡A¤£ª¾¹D¦³þ¦ì¤j¤j¥i¥HÀ°§Ú¸Ñµª¡AÁÂÁ¡C
PS.¦¹¿ù»~¥X²{«á¡A¥un±N¿ù»~ÂI±¼"°±¤î°õ¦æ"¡A¤´µM·|¶]¥X·Qnªº¸ê®Æ¡A¥u¬O¨C¦¸°õ¦æ¨ì¤@¥b³£»ÝÂI±¼¡A©Ò¥H·P¨ì«Ü§xÂZ!!
¥¼§¹¤uºû׳æ.rar (14.43 KB)
- Sub ³Ñ¾lºû׳æ()
- Dim wsh1 As Worksheet, wsh2 As Worksheet
- Dim rngNew As Range
- Dim row1 As Long, row2 As Long
- Dim i As Double, j As Double
-
- Set wsh1 = Sheets("¥¼§¹¤uºû׳æ")
- Set wsh2 = Sheets("list_toexcel")
- row1 = wsh1.[B2].End(xlDown).Row
- row2 = wsh2.[A3].End(xlDown).Row
- Set rngNew = wsh2.Range("A3:A" & row2)
-
- j = 3
-
- 'step1.¤ñ¹ïºû׳渹¬O§_¦s¦b , §ä¤£¨ì«h±N¦¹¦æ§R°£
- With wsh1
- For i = 2 To row1 Step 1
- '¤ñ¹ï·sºû׳æ¬O§_¦s¦b¡A§ä¤£¨ì«h±Nºû׳æ±þ±¼
- 1: If rngNew.Find(.Cells(i, 2), after:=wsh2.Cells(j, 1)) Is Nothing Then
-
- .Cells(i, 2).Offset(0).EntireRow.Delete
- 'ºû׳æ§R°£¤@¦æ«á¡A¦æ¼Æ¤Ö1
- row1 = row1 - 1
- '·sºû׳æ¤Ö¤ñ¹ï¤@¦æ¡A¥H¼W¥[µ{¦¡®Ä²v
- j = j + 1
- row2 = row2 - 1
- '§ïµ½§R°£¤@¦æ«á¡Aµ{¦¡§ï±q¤U¤@¦æ¶}©l¤ñ¹ï
- GoTo 1
-
- End If
-
- Next
-
- End With
- End Sub
½Æ»s¥N½X |
|