Check the cell that only contains number even if its mixed with letters

Hi guys,

I want to check whether the cell only contains number and not mixed with letters.
i have combine multiple if
note : first cell is P167, second cell is AI167
first check whether the cell length is 26 character
second is to make sure the first cell and second excel data is same
and third check whether the first cell or even the second excel is only contains number (not mixed with letters)
If excel function cannot provide this as when i’m using write cell activity, are there any option to check within uipath? Maybe using some regex or another function but i’m not too familiar with that.

this is the formula that im trying to use
=IF((AND(LEN(AI167)=26;P167<>AI167;P167="";ISNUMBER(VALUE(P167))=TRUE;ISNUMBER(VALUE(AI167))=TRUE));“Not Match!”;

Sorry for asking some silly question and really appreciate it for any feedback

Thank you


@delf do you want to check only first cell and second cell or to check the cell values in entire sheet.

Solution to check for all the cell(row,col1) and cell(row,col2) in an worksheet try thissample.xaml (10.7 KB)

Hi @ranjith

Thanks for the feedback.
As for the sample is work fine until checking between first cell and second cell. It will always produce an “not equal” results as that results is not true when i’m checking the cell manually.
Also i think i need to add this (-) as an exception in regex but not counted as 26
For example
and check this example and when the result is produced it equals as 26 digit character (only count the numbers)
and this one also example after using “is match” activity
this is the example : “00000000751620180713029870#IT-18-0712” but when checking whether this example only contains number the result its “Only Numbers : True” and this is wrong because this example still have letters “IT”.

I think that’s all i can find by now. Still try to find any other solution but thanks @ranjith for the sample.
If you have any other ideas about this one please let me know.


Best Regards



you should remove all (-) using replace method

row("column1").ToString.replace("-","").trim.length =26


Try this pattern in IS MATCH activity "^\d+$"