# Totaling using two sets of data

Highlighted
Occasional Visitor

# Totaling using two sets of data

I am trying to count and get the total of 2 sets of data: one set includes dates, the other includes words. The dates all include month, day, and years, but the data I would like to use in my results would just consist of the years. I'm working with semi trailer repairs, so the formula I would like to use should be saying "count all issues only if year"...like "count all tire repairs only if 2016". I have been googling and looking around, but all I can find on the subject is to get a result of true or false, but I want a number as my result. so far, I have this:

=COUNTIF(issues,"axles")+COUNTIFS(dates,">="&DATE(2016,1,1),dates,"<="&DATE(2016,12,31)

I named one column "issues" and another column "dates." ("axles" is one of the issues I'm trying to total.)

I know this formula is valid, but it adds the totals of the "issues" column and the "dates" column  separately instead of taking both into account in the total, if that makes sense. Hopefully someone can help!

2 Replies
Highlighted

# Re: Totaling using two sets of data

You are adding result of two countifs that is the reason you do not get the result.

You can use below formula:

=COUNTIFS(\$D\$2:\$D\$10,"axles",\$E\$2:\$E\$10,">="&DATE(2016,1,1),\$E\$2:\$E\$10,"<="&DATE(2016,12,31))

Sample file is also attached for your reference.

Thanks

Tauqeer

Highlighted