Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to flag columns that have two @@ in the cell 3

Status
Not open for further replies.

gooseriver

IS-IT--Management
Aug 4, 2006
93
0
0
CA
How can I flag (true or false) if there are two @ symbols in a cell
 

[pre]
A B
1 TEXT CHECK
2 text False
3 @ False
4 @@ True
5 test False
[/pre]
Formula in B2 is [blue][tt]=IF(A2="@@", "True", "False")[/tt][/blue]


---- Andy

There is a great need for a sarcasm font.
 
Start by defining a less vague requirement.

Consider even a completely unambiguous requirement.
 
two @ symbols in a cell

Does not necessarily mean that those two symbols are adjacent.

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
"The most incomprehensible thing about the universe is that it is comprehensible" A. Einstein
AD1D550E-FCB5-4AB6-A3C8-1F86CACE2554_ne1bcz.jpg
 
based on Andrzejek answer

formulas
=IF(LEN(A3)-LEN(SUBSTITUTE(A3,"@","")) = 2,"True","False") -- if it has exactly 2 in any place
=IF(LEN(A3)-LEN(SUBSTITUTE(A3,"@@",""))= 2,"True","False") -- if it has exactly 2 consecutive in any place
=IF(LEN(A3)-LEN(SUBSTITUTE(A3,"@","")) >= 2,"True","False") -- if it has at least 2 in any place
=IF(LEN(A3)-LEN(SUBSTITUTE(A3,"@@",""))>= 2,"True","False") -- if it has at least 2 consecutive in any place
=IF(left(A3, 2) = "@@","True","False") -- if it has at least 2 consecutive at the start
=IF(right(A3, 2) = "@@","True","False") -- if it has at least 2 consecutive at the end

Regards

Frederico Fonseca
SysSoft Integrated Ltd

FAQ219-2884
FAQ181-2886
 
@Frederico,

I'd like to chat with you. Send a message via this FAQ and I'll eMail you in return.
Faq68-5829


Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
"The most incomprehensible thing about the universe is that it is comprehensible" A. Einstein
AD1D550E-FCB5-4AB6-A3C8-1F86CACE2554_ne1bcz.jpg
 
We can all speculate and guess what gooseriver meant by what he/she said, without providing any examples of the data. But based on what WAS provided, my solution does EXCATLY what was required.


---- Andy

There is a great need for a sarcasm font.
 
Why use text "True" and "False" when there are boolean TRUE and FALSE?

Using Andrzejek's solution as and example:

Formula in B2 is =IF(A2="@@", "True", "False")

Can be simplified to

=A2="@@"

The same simplification can be be applied to Frederico's solutions.

In general, formulas of the format of

If something evaluates to TRUE the
Set something else to TRUE
Else
Set something else to FALSE

Are silly.

 
@Andy, I didn't see where your solution exterminated cats. Could you explain that? ;-)

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
"The most incomprehensible thing about the universe is that it is comprehensible" A. Einstein
AD1D550E-FCB5-4AB6-A3C8-1F86CACE2554_ne1bcz.jpg
 
Of course, it might have been some sort of change to DNA code. 🤔

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
"The most incomprehensible thing about the universe is that it is comprehensible" A. Einstein
AD1D550E-FCB5-4AB6-A3C8-1F86CACE2554_ne1bcz.jpg
 
Exterminating cats was not in the request. Nor was: prepare breakfast every day... [cook]
Only: "How can I flag (true or false) if there are two @ symbols in a cell " and that's what my example does.

Somebody gave Frederico a Star - well deserved. But that was NOT gooseriver... [ponder]


---- Andy

There is a great need for a sarcasm font.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top