Mixing Formulas

nanrem

New member
Joined
Sep 22, 2014
Messages
6
Reaction score
0
Points
0
Hi,

I know i'm near to the goal formula, but got stuck. I have a chart-1 with date, field number, zones (from 1 to 13), and other columns that don't matter to the formula. Aside, chart-2 that depends on the data from chart-1, that will read, range on column B "field number", looking for specific land number, and column's C - O "Zones" 1-13 , looking for an "X". The formula i have use is the fallowing:
=IF(AND(COUNTIF(B4:B19,"327N")>0,COUNTIF(C4:C19,"X")>0),1,"")
=IF(AND(COUNTIF(B4:B19,"327-N")>0,COUNTIF(D4:D19,"X")>0),2,"")
=IF(AND(COUNTIF(B4:B19,"327-N")>0,COUNTIF(E4:E19,"X")>0),3,"")
etc, etc, each formula are on different cells on chart-2.

I want to add that, when "327-N" is found in the first countif on column range B, the next countif in column "C", "D", "E", etc, etc, joust apply on the rows where "327-N" was found.

Any help will be appreciated
Thanks in advanced
 
Use

=IF(COUNTIFS(B4:B19,"327N",C4:C19,"X")>0,1,"")

etc.
 
Use

=IF(COUNTIFS(B4:B19,"327N",C4:C19,"X")>0,1,"")

etc.

Wow!!, That was easy, but i would like to understand it, so it means that adding an "s" to the 'countif', implies using the same row where the criteria is found??
 
No, it means multiple criteria can be evaluated together, where the index within the given ranges is the same, i.e. you could test B1:B20 and C1:C20 and B1 and C1 would be evaluated together, B2 and C2, and so on. Or you could test B1:B20 and C11:C30 and B1 and C11 would be evaluated together, B2 and C12 and so on. The ranges don't have to span the same rows (or columns) but they do have to have the same number of rows (or columns).
 
Last edited:
No, it means multiple criteria can be evaluated together, where the index within the given ranges is the same, i.e. you could test B1:B20 and C1:C20 and B1 and C1 would be evaluated together, B2 and C2, and so on. Or you could test B1:B20 and C11:C30 and B1 and C11 would be evaluated together, B2 and C12 and so on. The ranges don't have to span the same rows (or columns) but they do have to have the same number of rows (or columns).


Thanks :)
 
Back
Top