- I have 9 digits in A column till 5 rows
- I have 10 digits in A column from 6 Row till 10 rows
- Now I need to apply two different formulas in same A Column
- The same thing need to apply in UiPath but bot doesn’t know in which row onwards 10digits starts
Could any one help me with steps if possible
Thanks a lot in Advance
Regards
Govardhan
can use the length method if less then 9 apply formula 1 or apply formula 2
Yeah but in Uipath in If condition how can we apply for within single column
prasath_S
(prasath S)
4
Hi @itsmegovardhan
What formula you need to apply if you are bit more specific it would be helpful…
Thanks
- I have 9 digits account number in A column
- I have few rows with 10 digits in same A column
- Now i need to apply Formula1(=Mid(A1,3,10)) and Formula2 (=Mid(A6,6,9))
- For 10 digits account number 0 or any one digit has added so to avoid that i need to pull only 9 digits
Eg:
491798689
491837322
0491067695
0491155734
prasath_S
(prasath S)
6
Hi @itsmegovardhan
Please try these steps,
Use Read range and store the excel values in a data table (i have used build data table for testing)
![image](https://global.discourse-cdn.com/uipath/original/3X/4/4/447ae9917df92d64a09dc429b194fceaa57cc22f.png)
Use Invoke code activity and write this code,
dt.AsEnumerable.Where(Function(row) row(0).ToString.Length = 9).AsEnumerable.ToList.ForEach(Sub(row) row(0) = row(0).tostring.substring(5,4))
dt.AsEnumerable.Where(Function(row) row(0).ToString.Length = 10).AsEnumerable.ToList.ForEach(Sub(row) row(0) = row(0).tostring.substring(2,8))
pass the data table as using edit arguments in invoke code activity,
Please check if the output is matched with you requirement, first one is for 9 digits and 2nd one is for 10 digits,
use Write range and write the data table into the excel sheet.
Thanks
![image](https://global.discourse-cdn.com/uipath/original/3X/1/5/154b55f0414bebd173df018d2fcfde7dcf445e22.png)
system
(system)
Closed
7
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.