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

[µo°Ý] ¨D±Ï¦p¦óÁYµuVBA°õ¦æ®É¶¡

¥»©«³Ì«á¥Ñ quickfixer ©ó 2020-12-10 09:54 ½s¿è

¦^´_ 7# lilizzzz

²q´ú¥i¯à¬O¸ê®Æ¤Ó¦h,¥Î¦r¦ê³B²zªø«×¤Óªø
§ï¥Îrange¶°¦X¨Ó§R,½Ð´ú¸Õ

    Sub test()

    Dim dr As Range
    Application.Calculation = xlCalculationManual
    Application.ScreenUpdating = False
    Application.DisplayStatusBar = False
    Application.EnableEvents = False

    Sheets("¤u§@ªí1").Select
    Range("A2").Select

    Set dic = CreateObject("scripting.dictionary")
    For i = Range("A2000").End(3).Row To 1 Step -1
        If dic.exists(Cells(i, "A").Value) Then
            If dr Is Nothing Then
                Set dr = Rows(i)
            Else
                Set dr = Union(dr, Rows(i))
            End If
        Else
            dic(Cells(i, "A").Value) = ""
        End If
    Next i

    dr.EntireRow.Delete
   
    Set dr = Nothing
    Set dic = Nothing
    Application.Calculation = xlCalculationAutomatic
    Application.ScreenUpdating = True
    Application.DisplayStatusBar = True
    Application.EnableEvents = True

End Sub

TOP

¦^´_ 10# samwang


    ±z¦n¡AªþÀɧY¬O§Úªº¸ê®Æ¡A¥u¬O§Ú¹ê°È¤W¦A¹B¥Îªº¸ê®Æµ§¼Æ±q1500-30000³£¦³¥i¯à¡A

¤£¦n·N«ä³Â·Ð±z¤F¡AÁÂÁ¡A§Ú·|¥Î¤ß¥h§l¦¬³o¬qµ{¦¡

TOP

¦^´_ 9# samwang


    ½Ð°Ý³o¤@¬q¡A
Dim xD, Arr, i&, j%, N& '

¬°¬Æ»ò·|¥Î i&  j% n& ' ¨Ó«Å§i ?

TOP

¦^´_ 11# quickfixer


    «D±`ÁÂÁ±z¡A¤µ¤é¤U¯Z§Ú¦A¦^¥h´ú¸Õ¬Ý¬Ý±z³o¬qµ{¦¡½X¡A

¦ý¬O¦³ÂI²`¶ø§Ú»Ý­n¦hªá¤@ÂI®É¶¡¨Ó§l¦¬qq

TOP

¦^´_ 13# lilizzzz


    ¬°¬Æ»ò·|¥Î i&  j% n& ' ¨Ó«Å§i ?
-->¥i°Ñ¦Ò¦p¤Uºô§}¸ÑÄÀ¡AÁÙÆZ¸Ô²Óªº¡AÁÂÁ¡C
http://forum.twbts.com/viewthrea ... amp;page=1#pid22366
Dim i%´N¬ODim i As IntegerªºÂ²¼g
¤@¨Ç±`¥Îªº¥Nªí²Å¸¹¦p¤U
Integer ªº«¬ºA«Å§i¦r¤¸¬O¦Ê¤À¤ñ²Å¸¹ %
Long ªº«¬ºA«Å§i¦r¤¸¬° &
Double ªº«¬ºA«Å§i¦r¤¸¬O¼Æ¦r²Å¸¹ #
Single ªº«¬ºA«Å§i¦r¤¸¬° !
String ªº«¬ºA«Å§i¦r¤¸¬° $

TOP

¦^´_ 11# quickfixer


    ±z¦n¡A³o¤@¥÷¥i¥H°õ¦æ®Ä²v¤ñ§Úªº§Ö¶W¦h¡A«D±`·PÁ±z¡A§Ú¨Ó¥h§l¦¬³o¤@¬q¡A

¥t·Q¸ò±z½Ð±Ð¡A§Ú³o¸Ì¦³¤@¬q¿ý»sªº¥¨¶°¡A¥\¯à¬O¿z¿ï¡A§Ú¦b¿ý»s®É­Ô·j´M³£«Ü§Ö¡A

¥i¬O¦Û¤v¦b°õ¦æ¥¨¶°®É¡A·j´M®Ä²v­n±Nªñ¤@¤ÀÄÁ¡A½Ð°Ý¬O§Ú¸ê®ÆÀÉ°ÝÃD¶Ü ?

    Sheets("3P-INSPPROD").Range("A1:AK300000").AdvancedFilter Action:=xlFilterCopy _
        , CriteriaRange:=Range("A1:C3"), CopyToRange:=Range("A7:AK7") _
        , Unique:=False

    ActiveWindow.SmallScroll Down:=-27
    Cells.Select

TOP

¦^´_ 15# samwang


    ±z¦n¡A§Ú¦³¬Ý¨ì³o¤@­Ó»¡©ú¤F¡A­ì¨Ó¬O²¼g!«D±`ÁÂÁ±z

¥t·Q¸ò±z½Ð±Ð¡A§Ú³o¸Ì¦³¤@¬q¿ý»sªº¥¨¶°¡A¥\¯à¬O¿z¿ï¡A§Ú¦b¿ý»s®É­Ô·j´M³£«Ü§Ö¡A

¥i¬O¦Û¤v¦b°õ¦æ¥¨¶°®É¡A·j´M®Ä²v­n±Nªñ¤@¤ÀÄÁ¡A½Ð°Ý¬O§Ú¸ê®ÆÀÉ°ÝÃD¶Ü ?

    Sheets("3P-INSPPROD").Range("A1:AK300000").AdvancedFilter Action:=xlFilterCopy _
        , CriteriaRange:=Range("A1:C3"), CopyToRange:=Range("A7:AK7") _
        , Unique:=False

    ActiveWindow.SmallScroll Down:=-27
    Cells.Select

TOP

¦^´_ 17# lilizzzz


Range("A1:AK300000")   

½d³ò¤Ó¤j¤F¡A30¸U¦C?¡A«Øij¥ý§PÂ_½d³ò¦A°µ¿z¿ï¡A¥i´î¤Ö¦h¾lªº­pºâ¡C
µ{¦¡¬O¨Ì»Ý¨D¼gªº¡A»Ý¨Dªí¹F¤£²M·¡
©ÎªÌ¨S¦³¤W¶Çªþ¥ó¡A·R²ö¯à§U

TOP

        ÀR«ä¦Û¦b : ®É®É¦n¤ß´N¬O®É®É¦n¤é¡C
ªð¦^¦Cªí ¤W¤@¥DÃD