Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Highlighting Cells If Contains Alphabets

ajaydhamrait
7 - Meteor

Hi,

 

If a field (in my example it is 'Inception') containing numeric values has a letter somewhere in the value, is it possible to highlight the output cell Yellow?  Currently, I have done this but no luck. 

 

ajaydhamrait_0-1652092307611.png

ajaydhamrait_1-1652092333473.png

Thanks!

 

7 REPLIES 7
DataNath
17 - Castor

I think the following should do the trick:

 

REGEX_CountMatches([Inception], "[\D]") > 0

 

This will highlight everything with at least one instance of something that isn't a number in the field. If you need it to be specific to letters then you could use:

 

REGEX_CountMatches([Inception], "[a-zA-Z]") > 0

binuacs
20 - Arcturus

@ajaydhamrait one way of dong this with the help of the RegeEx formula

binuacs_0-1652095095518.png

 

 

ajaydhamrait
7 - Meteor

That's amazing, what about the other way round? So if a field containing letters has a number somewhere in the value

binuacs
20 - Arcturus

@ajaydhamrait The same formula should work in either case

 

binuacs_0-1652099847498.png

 

DataNath
17 - Castor

In the formula I provided previously, the \D capitalised indicates a non-number, so if you want to find where there ARE numbers, simply use the lowercase equivalent I.e. \d, which indicates the presence of a number in the field.

ajaydhamrait
7 - Meteor

This is all great! However, I have blank cells in my data that will need to stay there but I don't want these highlighted Yellow (with the above formulas, they highlight them). Is there a way to not highlight blank cells? 

DataNath
17 - Castor

If you want to leave empty cells out of the highlight then should just be able to add the following to your highlight condition:

 

AND !IsEmpty([Field Name])

Labels