using if statement

Copper Contributor


I want to check if an entire column not just one cell= 415 (the number)
How to do?

Example:

IF(K3:K18=”415”,-1,1)

 

Data:

       J            K              L              M            N             O         P

-1ABCDEy
1415255401.2863
2550255404.0521
3415955404.0536
4550955401.2899
54152515404.0524
65502515401.2866
74159515401.2871
85509515404.0554
9415255604.0523
10550255601.2874
11415955601.2880
12550955604.0533
134152515601.2863
145502515604.0521
154159515604.0544
165509515601.2896

 

Thanks. MM

3 Replies

@mmarion 

Use

 

=IF(COUNTIF(K3:K18,"<>415")=0,-1,1)

@Hans Vogelaar 

 

The COUNTIF function in Excel counts the number of cells that meet criteria you specify.

I finally just did an overall search and replace column by column.

It would be nice to automate that. 

 

I am not sure what is supposed to be before ' .@Hans Vogelaar' in this reply. I hope this post is readable.

MM

@mmarion 

The forum automatically starts a reply with @username where username is the one you're replying to. There isn't supposed to be anything before it.