Learn how to use COUNTIF and SUMIF Function in excel VBA

Please watch: “Learn Excel – Video 594 – VBA – WEB SCRAPING – CLICK ON SEARCH BUTTON”


6 thoughts on “Learn MS Excel – Video 402- VBA FUNCTIONS – COUNTIF SUMIF

  1. Hello Ajay
    I am very comfortable with sumifs and countifs, thanks for the videos. I m dealing with large data set at work. I want to write a code using sumifs in a clean sheet referencing to a different workbook saved in another folder. Which videos do you recommend

  2. Private Sub CommandButton1_Click()

    Dim row As Integer, LastRow As Long
    Dim stDate As Date, endDate As Date

    'Initializing variables
    stDate = Sheets("Input").Range("C13")
    endDate = Sheets("Input").Range("C14")

    'Find last row of data
    LastRow = Sheets("AllClaimsPaid").Cells(Rows.Count, 1).End(xlUp).row

    For row = 10 To 17
    Sheets("ClaimsAnlysis").Cells(row, 2).Value = WorksheetFunction.SumIfs(Sheets("AllClaimsPaid").Range("V2:V" & LastRow), Sheets("AllClaimsPaid").Range("J2:J" & LastRow), Sheets("ClaimsAnlysis").Cells(row, 1), Sheets("AllClaimsPaid").Range("A2:A" & LastRow), Sheets("ClaimsAnlysis").Range("J2"), Sheets("AllClaimsPaid").Range("Y2:Y" & LastRow), ">=" & stDate, Sheets("AllClaimsPaid").Range("Y2:Y" & LastRow), "<=" & endDate)

    End Sub

    Good day

    That is a snap shot of my sumifs code. It is running perfectly but when i change computers it does not sum. It only returns zeros. I am using same Windows and same office.

    The problem is on the last part of the code "Sheets("AllClaimsPaid").Range("Y2:Y" & LastRow), "<=" & endDate)". Please advise

  3. Good day

    I need to sum a dynamic. I am using a code below and it is not working

    Cells(row, 2).Value = WorksheetFunction.Sum(Sheets("All Claims").Cells(Sheets("All Claims").Rows.Count, 22).End(xlUp).row

    My data is in sheet "All claim" column 22. Please assist

Leave a Reply

Your email address will not be published. Required fields are marked *