I have a file that looks like this:
col hea der s row
A 0 0 0 0
C 1 2 1 0
N 3 2 3 5
I want to write an if statement that says if any of the values in cells D2, G2, J2 or M2 are greater than or equal to 5, count one. ie:
cel D2 G2 J2 M2
col hea der s row count
A 0 4 0 0 0
C 1 5 1 0 1
N 10 2 3 5 2
I can't get the logic right at all, so I have a feeling that there is a less complicated way to do it. This is what I have so far:
IF(D2>=5, 1, 0, IF(AND(G2>=5, 2, 0), IF(AND(J2>=5, 3, 0), IF(AND(M2>=5, 4, 0)))))
But this is obviously nowhere close to what I need. It only will tell you if all 4 are there, not anything else. The only way I can figure this is some horrifyingly long if statement. Can anyone point me in a better direction?