ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   IF OR (https://www.excelbanter.com/excel-worksheet-functions/226174-if.html)

Bob

IF OR
 
If the values in D4 through G4 = "1B" or "2B" or "3B" or "SS" or "P" or "C",
then count the number of instances of those values and place the result in J4.

example:
D4 through I4 = "CF", "1B", "SS", "P"
The formula should return a value of 3 because 1B, SS, and P each appears
once.

Thanks for your help.

Bob

Bob Phillips

IF OR
 
=SUM(COUNTIF(D4:G4,{"1B","2B","3B","SS","P","C"}))

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"bob" wrote in message
...
If the values in D4 through G4 = "1B" or "2B" or "3B" or "SS" or "P" or
"C",
then count the number of instances of those values and place the result in
J4.

example:
D4 through I4 = "CF", "1B", "SS", "P"
The formula should return a value of 3 because 1B, SS, and P each appears
once.

Thanks for your help.

Bob

__________ Information from ESET Smart Security, version of virus
signature database 3832 (20090206) __________

The message was checked by ESET Smart Security.

http://www.eset.com






__________ Information from ESET Smart Security, version of virus signature database 3832 (20090206) __________

The message was checked by ESET Smart Security.

http://www.eset.com






All times are GMT +1. The time now is 11:13 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com