ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   If statement (https://www.excelbanter.com/excel-worksheet-functions/253175-if-statement.html)

gbish

If statement
 
I want to look in multiple cells and return a predetermined value:
I want cell F5 to return a value if there is an X in any of the cells A1
thru A5, if there is no X but there is an R, I want to return a different
value, and if those same cells are empty, I want to return a different value.
Is this possible?
A B C D E F
1 X
2 R
3 X
4
5

Mike H

If statement
 
Hi,

maybe this

=IF(COUNTIF(A1:A5,"X")0,"XXXXX",IF(COUNTIF(A1:A5, "R")0,"RRRRR","No X or R"))

Mike

"gbish" wrote:

I want to look in multiple cells and return a predetermined value:
I want cell F5 to return a value if there is an X in any of the cells A1
thru A5, if there is no X but there is an R, I want to return a different
value, and if those same cells are empty, I want to return a different value.
Is this possible?
A B C D E F
1 X
2 R
3 X
4
5



All times are GMT +1. The time now is 08:38 AM.

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