If beach contains text then ....

Solved
sim -  
 KAWTAR -
Hello,

My problem:

I have a range of cells with either text or numbers, and I would like an "X" to appear when there is something in at least one cell in this range, but if there is nothing, I want nothing to be displayed.

Thank you for your responses.

2 réponses

Vaucluse Posted messages 27336 Registration date   Status Contributeur Last intervention   6 453
 
Hello
at B1 if we start at A1:

=IF(A1="";"";"X")

thanks

--
The quality of the answer mainly depends on the clarity of the question, thank you!
3
sim
 
Thank you for the reply, but I would like this to work for a range of cells

e.g.: =IF(A1:E1="","""X")

any solutions?
-1
Vaucluse Posted messages 27336 Registration date   Status Contributeur Last intervention   6 453
 
=IF(COUNTIF(A1:E1,"")=5,"","X")
or also:

=IF(COUNTIF(A1:E1,"<>"),"X","")
0
sim
 
Magnificent, thank you so much. I've been looking for this all afternoon. Just out of curiosity, what is the purpose of the number 5 in the formula?
0
Vaucluse Posted messages 27336 Registration date   Status Contributeur Last intervention   6 453
 
The first formula counts the number of empty cells between A and E, and if the result equals 5 (i.e., A, B, C, D, E), it should not return X.
The second formula detects if one or more cells contain any value, and thus returns X if it finds at least one.
If OK, please mark the topic as resolved (gear menu in the upper right corner of the thread title).
Safe travels.
Best regards.
0
sim
 
Thank you for all these answers.
0