Help with a difficult Countif syntax

SaraPeeters

New Member
Joined
Feb 5, 2014
Messages
7
Dear Excel lovers

I need some help of a syntax.
I have a database with respondents (farmers) that produce different crops (maize, sesame and sorghum). The have produced in 2011 and 2013 and i made a column with the increase in % --> 2013-2011)/2011

Now I want to count the farmers that have an increase of >=30% in maize + increase of >=30% in sesame + increase of >=30% in sorghum. But some farmers have that increase in both maize and sorghum, or sesame and maize. I do not want to count those farmers twice, since it will be double counting.

I know how to filter and calculate it manually, but it would be better if i can use a formula that generates the number automatic.

Can anybody help me, because I cannot find my answer online.

Greetings, Sara
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Maybe better if you describe the problem with the table for accurate results
 
Upvote 0
ABCDEFGHI
1sesamesesamesesamemaizemaizemaizesorghsorghsorgh
220132011%20132011%20132011%
3300280713001350-3.7000
43203007110090022.2130070085.7
535030017100080025000
6000000700710-1.4
7340300101250110013.67307004.3

<tbody>
</tbody>
 
Upvote 0
Do you have excel 2007 or later ? If you do COUNTIFS makes this easy . I had to change your data a bit becuase nobody has the targets of 30% you were after

formula =COUNTIFS(D3:D7,"> 10",G3:G7,"> 10",J3:J7,"> 10") counts all rows (from 3 to 7) where D > 10 and G > 10 and J > 10 ( the answer = 1)

doesnt work for 2003 or earlier so thats where you are and you can update !!!
BCDEFGHIJ
sesame 2013sesame 2011sesame %maize 2013maize 2011maize %sorgh 2013sorgh 2011sorgh %
300280713001350-3.7000
36030020110090022.2130070085.7
35030017100080025000
000000700710-1.4
340300101250110013.67307004.3

<COLGROUP><COL style="WIDTH: 48pt" width=64><COL style="WIDTH: 62pt; mso-width-source: userset; mso-width-alt: 3035" width=83><COL style="WIDTH: 48pt" span=7 width=64><COL style="WIDTH: 72pt; mso-width-source: userset; mso-width-alt: 3510" width=96><TBODY>
</TBODY>
 
Upvote 0
This is want I also got, but that is not what i need. Now it looks for a farmer that has this increase for all crops. The problem is that some farmers have this increase in 1 crop, some in 2 crops and some in 3 crops. I want to count them if they have this increase in one of the crops. Secondly, if a farmer has an increase in 2 crops I want this farmer to be counted as one.
 
Upvote 0
Hi Sara - in your original post you asked for

Now I want to count the farmers that have an increase of >=30% in maize + increase of >=30% in sesame + increase of >=30% in sorghum. But some farmers have that increase in both maize and sorghum, or sesame and maize. I do not want to count those farmers twice, since it will be double counting.


ie farmers who met all 3 criteria - If you have excel 2007 or later the formula =COUNTIFS(D3:D7,"> 10",G3:G7,"> 10",J3:J7,"> 10") as per my last post does just that (change the cell references and targets - I used 10% as needed)

Do you mean that you would like a formulas to count farmers who have met their target in any one or the 3 crops and a formula to count those who met any 2 out of the 3 crops ?
 
Upvote 0
Hi Sara - in your original post you asked for

Now I want to count the farmers that have an increase of >=30% in maize + increase of >=30% in sesame + increase of >=30% in sorghum. But some farmers have that increase in both maize and sorghum, or sesame and maize. I do not want to count those farmers twice, since it will be double counting.


ie farmers who met all 3 criteria - If you have excel 2007 or later the formula =COUNTIFS(D3:D7,"> 10",G3:G7,"> 10",J3:J7,"> 10") as per my last post does just that (change the cell references and targets - I used 10% as needed)

Do you mean that you would like a formulas to count farmers who have met their target in any one or the 3 crops and a formula to count those who met any 2 out of the 3 crops ?

--> I need a formula that calculates the farmers with an increase in a crop (maize, sesame, sorghum) but in the same time if they have an increase in more than 1 crop this farmer has to be counted as one. Because with this formula it is counting only the farmers with increase in all crops.
 
Upvote 0

Forum statistics

Threads
1,216,115
Messages
6,128,915
Members
449,478
Latest member
Davenil

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top