Results 1 to 6 of 6

Deleting a set of entries based on sum of entries in the set

Threaded View

  1. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: Deleting a set of entries based on sum of entries in the set

    regn,
    What's happen to your previous thread.
    https://www.excelforum.com/excel-pro...ntire-set.html

    vba
    Sub test()
        Dim a, e, i As Long, dic As Object
        Set dic = CreateObject("Scripting.Dictionary")
        With Sheets("sheet1").Cells(1).CurrentRegion
            a = .Value
            For i = 2 To UBound(a, 1)
                a(i, 2) = CStr(a(i, 2))
                dic(a(i, 2)) = dic(a(i, 2)) + a(i, 3)
            Next
            For Each e In dic
                If dic(e) <> 0 Then dic.Remove e
            Next
            If dic.Count Then
                .AutoFilter 2, dic.keys, 7
                .Offset(1).EntireRow.Delete
            End If
            .Parent.AutoFilterMode = False
        End With
    End Sub
    Last edited by jindon; 08-15-2021 at 09:29 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Deleting a set of entries based on condition applied to the entire set
    By regn in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-31-2021, 03:37 PM
  2. Replies: 1
    Last Post: 11-27-2017, 08:50 PM
  3. Excel VBA: deleting entries based on date ranges
    By MattWardlow in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-15-2017, 12:17 PM
  4. [SOLVED] Read entries-locate entries and print entries
    By akotronis in forum Excel General
    Replies: 4
    Last Post: 05-01-2012, 03:05 PM
  5. Finding and Deleting Rows based on Formula entries
    By BehrBrew in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-27-2012, 06:01 PM
  6. Auto-Generating Entries based on combined Entries
    By Ice Burn in forum Excel General
    Replies: 3
    Last Post: 09-12-2011, 05:52 AM
  7. deleting many entries
    By a2zedgifts in forum Excel General
    Replies: 0
    Last Post: 01-17-2005, 12:26 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1