+ Reply to Thread
Results 1 to 8 of 8

Countifs function in vba

  1. #1
    Registered User
    Join Date
    02-27-2015
    Location
    Singapore
    MS-Off Ver
    Ms office 2010
    Posts
    5

    Post Countifs function in vba

    Hi
    I have the below formula in excel. It is working good but very slow
    So i am planning to put the count if formula in vba code so that i can reduce the slow processing speed
    Can any one help me on this
    =countifs(sheet1!A1:A300,sheet2!A1,sheet1!B1:B300,">="&today-3)
    This the my formula
    Where a1:a300 is the list of name and b1:b300 is the dates
    Also in sheet2 a1 is the today dat.
    Which i need to count how many time a person was complained with in last 3days.
    Please help me!!!

  2. #2
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Re: Countifs function in vba

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    Regards,
    Vikas Gautam
    Excel-buzz.blogspot.com

    Excel is not a matter of Experience, its a matter of Application.

    Say Thanks, Click * Add Reputation

  3. #3
    Registered User
    Join Date
    02-27-2015
    Location
    Singapore
    MS-Off Ver
    Ms office 2010
    Posts
    5

    Re: Countifs function in vba

    I need a vba code for the said formula
    Can any one help me!!!

  4. #4
    Registered User
    Join Date
    02-27-2015
    Location
    Singapore
    MS-Off Ver
    Ms office 2010
    Posts
    5

    Re: Countifs function in vba

    =countifs(sheet1!A1:A300,sheet2!A1,sheet1!B1:B300,">="&today-3)

  5. #5
    Valued Forum Contributor
    Join Date
    11-11-2008
    Location
    Euro
    MS-Off Ver
    2007, 2010
    Posts
    470

    Re: Countifs function in vba

    Quote Originally Posted by Sugisenthil View Post
    =countifs(sheet1!A1:A300,sheet2!A1,sheet1!B1:B300,">="&today-3)
    this is an example for using directly worksheetfunction
    Please Login or Register  to view this content.

    on the other hand, you have to manually write an algorithm in this term (use for... if...)
    Best regard, -)iger-/iger
    If you are pleased with a solution mark your post SOLVED.

  6. #6
    Registered User
    Join Date
    02-27-2015
    Location
    Singapore
    MS-Off Ver
    Ms office 2010
    Posts
    5

    Re: Countifs function in vba

    Not able to get it
    Can u elaborate pls

  7. #7
    Valued Forum Contributor
    Join Date
    11-11-2008
    Location
    Euro
    MS-Off Ver
    2007, 2010
    Posts
    470

    Re: Countifs function in vba

    in VBA code, you can write this code

    Please Login or Register  to view this content.
    Then Run the code, you can see the result and may understand how the code executive

  8. #8
    Valued Forum Contributor
    Join Date
    11-11-2008
    Location
    Euro
    MS-Off Ver
    2007, 2010
    Posts
    470

    Re: Countifs function in vba

    in VBA code, you can write this code

    Please Login or Register  to view this content.
    Then Run the code, you can see the result and may understand how the code executive

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] COUNTIFS function...
    By ericarodgers in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-10-2013, 01:34 AM
  2. [SOLVED] Using COUNTIFS function
    By Karnik in forum Excel General
    Replies: 2
    Last Post: 11-12-2012, 01:01 AM
  3. Replies: 0
    Last Post: 12-16-2011, 09:01 AM
  4. Countifs function
    By jerrywoods in forum Excel General
    Replies: 1
    Last Post: 11-07-2008, 05:14 AM
  5. Must use COUNTIFS function......
    By Paarlite2 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-13-2008, 12:18 AM

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