How to Split and Delete Numbers in a Cell

I have a situation like this


Wha I Want is Only a single number in each cell, meaning the number after the slash should get erased along with the slash

Final Output Expected :


we can use a for each row and correct the cell value with the help of

  • regex.Match
  • String.Split method

Assign Activity
row(ColNameOrIndex) = System.Text.RegularExpressions.Regex.Match(row(ColNameOrIndex).toString,"\d+").Value

Assign Activity
row(ColNameOrIndex) = `row(ColNameOrIndex).toString.Split("/"c)(0).Trim()

Hey @Ishan_Shelke,

You can use the split method and get the value from index 0 like:


First Check if Text Contains “/” and than Split with “/”.
If Row(“ColNameorIndex”).Contains(“/”) Then → Split(Row(“ColNameorIndex”),“/”)(0) or Row(“ColNameorIndex”).split("/"c)(0).

Hi @Ishan_Shelke,

First, put your excel in a table.

Produce a new clone table that will consist of only the headings of this table you are reading.

Use your excel table you read in a loop.

Create condition inside the loop. According to this condition, if “/” exists;

Get the first row by dividing it with the split function.

Otherwise just take the first row.

Add these values ​​to your clone table with the Add data row activity.

When the loop is finished, your clone table
print it.


This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.