• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

SUMIFS & COUNTIFS

I have an excel sheet with data tab and qty tab. I am trying to use SUMIFS and COUNTIFS

SUMIFS should calculate QTY from the data tab based on YEAR, MONTH, MATERIAL and PLANT.

COUNTIFS should count the number of times a specific material appears in the data tab based on YEAR, MONTH, PLANT and MATERIAL

Have attached a sample sheet.

Thanks
 

Attachments

  • CHANDOO-SUMIFS-COUNTIFS.xlsx
    24.3 KB · Views: 8
If this is going to work you either need the month/year as a serial date on the summary table or you need both the month and the year as separate text fields in the data table.
 

Attachments

  • CHANDOO-SUMIFS-COUNTIFS (PB).xlsx
    27.3 KB · Views: 8
=SUMIFS(data[QTY], data[DATE], ">="&DATEVALUE(A5&$A$3), data[DATE], "<="&EOMONTH(DATEVALUE(A5&$A$3), 0), data[PLANT], $B$2, data[MATERIALS], $B$3)

=COUNTIFS(data[DATE], ">="&DATEVALUE(A5&$A$3), data[DATE], "<="&EOMONTH(DATEVALUE(A5&$A$3), 0), data[PLANT], $B$2, data[MATERIALS], $B$3)
 
=SUMIFS(data[QTY], data[DATE], ">="&DATEVALUE(A5&$A$3), data[DATE], "<="&EOMONTH(DATEVALUE(A5&$A$3), 0), data[PLANT], $B$2, data[MATERIALS], $B$3)

=COUNTIFS(data[DATE], ">="&DATEVALUE(A5&$A$3), data[DATE], "<="&EOMONTH(DATEVALUE(A5&$A$3), 0), data[PLANT], $B$2, data[MATERIALS], $B$3)

Thanks Haz,
Your formulas work. Really appreciate your help.
 
Back
Top