简体   繁体   中英

Excel 2007 COUNTIF in even rows only

I have an array of cells (C2:D43) in which I want to count the number of times a particular string ("filler") occurs. However, I only want to consider the even rows in my array (so basically, the array is C2:D2;C4:D4, etc.). How can I do this? I'm working with Excel 2007.

这个SUMPRODUCT公式可以做到:

=SUMPRODUCT((C2:D43="filler")*(MOD(ROW(C2:D43),2)=0))

Try using MOD(ROW(),2)=0 to split up your cells so that your array has two sets: even and odd cells. Then find a way to tell Excel to choose only the values that are the opposite value of the one evaluated at the first row of the array. I'll see if I can find a way to formalize this.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM