Results 1 to 20 of 20

Countif with ADO or ScriptingDictionary

Threaded View

turist Countif with ADO or... 12-20-2018, 04:45 PM
jindon Re: Countif with ADO or... 12-20-2018, 10:07 PM
turist Re: Countif with ADO or... 12-20-2018, 11:05 PM
jindon Re: Countif with ADO or... 12-20-2018, 11:29 PM
turist Re: Countif with ADO or... 12-21-2018, 12:15 AM
jindon Re: Countif with ADO or... 12-21-2018, 03:51 AM
jindon Re: Countif with ADO or... 12-21-2018, 04:16 AM
turist Re: Countif with ADO or... 12-21-2018, 10:06 AM
jindon Re: Countif with ADO or... 12-21-2018, 10:25 AM
turist Re: Countif with ADO or... 12-21-2018, 02:13 PM
jindon Re: Countif with ADO or... 12-21-2018, 09:30 PM
turist Re: Countif with ADO or... 12-22-2018, 12:18 AM
jindon Re: Countif with ADO or... 12-22-2018, 12:51 AM
turist Re: Countif with ADO or... 12-22-2018, 08:14 AM
jindon Re: Countif with ADO or... 12-22-2018, 08:23 AM
turist Re: Countif with ADO or... 12-22-2018, 08:39 AM
jindon Re: Countif with ADO or... 12-22-2018, 08:43 AM
turist Re: Countif with ADO or... 12-22-2018, 08:02 PM
jindon Re: Countif with ADO or... 12-22-2018, 09:55 PM
turist Re: Countif with ADO or... 12-22-2018, 10:08 PM
  1. #1
    Forum Contributor
    Join Date
    11-10-2012
    Location
    istanbul
    MS-Off Ver
    Excel 2013
    Posts
    297

    Countif with ADO or ScriptingDictionary

    I have 2 sheets Sheet1 and Sheet2.
    In Sheet1 There is a table which Column "C" has Item Numbers.(Approx. 60.000 Rows)
    In Sheet2 There is a table which Column "C" has Item Numbers.(Approx. 50.000 Rows)

    Starting from Sheet1 C2 cell to end of C Column (as C59850) ;
    I'd like to count Item Numbers in Sheet2, to find how many Item Numbers exist in Sheet2 and put counting values to Column "V" for each.

    In order to find the result for each Item Number in Sheet1, I used below code.
    Sub Countif_Cell()
    Application.ScreenUpdating = False
    LR1 = Sheet1.Cells(Rows.Count, 1).End(xlUp).Row
    LR2 = Sheet2.Cells(Rows.Count, 1).End(xlUp).Row
    For i = 2 To LR1
    If WorksheetFunction.CountIf(Sheet2.Range("C2:C" & LR2), Sheet1.Cells(i, "C")) > 0 Then
    Sheet1.Cells(i, "V") = WorksheetFunction.CountIf(Sheet2.Range("C2:C" & LR2), Sheet1.Cells(i, "C"))
    End If
    Next i
    Application.ScreenUpdating = True
    End Sub

    But Excel gives "Not Responding" message and crash.

    I want to use ADODB or ScriptingDictionary method instead of my code.

    If there is a solution with ADO or ScriptingDictionary , I thank in advance for any reply and help.
    Best regards.
    Last edited by turist; 12-20-2018 at 04:56 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Adding a COUNTIF function to an existing IF AND COUNTIF Formula...
    By Ourkid123uk in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-24-2018, 10:09 AM
  2. Replies: 8
    Last Post: 05-27-2017, 07:04 AM
  3. Faster if/countif formula for flagging uniques - countif too slow
    By Speshul in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-19-2015, 01:44 PM
  4. Combining a Date Range COUNTIF and a general COUNTIF
    By jacobtom in forum Excel General
    Replies: 1
    Last Post: 09-15-2011, 05:06 PM
  5. Adding a CountIF to a formula that is already Countif
    By Cmorgan in forum Excel General
    Replies: 4
    Last Post: 06-01-2011, 09:34 AM
  6. COUNTIF or not to COUNTIF on a range in another sheet
    By Ellie in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-15-2005, 05:06 PM
  7. [SOLVED] Countif w/ Multiple Criteria-How do I use countif
    By Patrick_KC in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-09-2005, 05:05 PM

Tags for this Thread

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