Excel Scope- LEFT/RIGHT Function insert column for range

I have an excel where column A is varying in length depending on the day. In those cells for each individual row, there are varying lengths of string. The end of each of those strings has 2 things written that i need in 2 separate columns. I can achieve what i am trying to do with 3 sets of RIGHT/LEFT functions when i work in excel but I don’t know how to replicate that work in UiPath. I’ve included an example screen shot below.
This is how the file comes over originally:

This is what i will need to do to it:

Column B is written =RIGHT(A2,20)
Column C is written =LEFT(B2,14)
Column D is written =RIGHT(B2,6)

Thoughts?

@atarantino

Is it constant ?

If yes then use Write Cell activity and pass below values.

           Sheet Name: "SheetName"
           Range: "B2"
           Value: "=RIGHT(A2,20)"

And then use Auto Fill Range activity and pass below values.

           Sheet Name: "SheetName"
           SourceRange: "B2"
           FillRange: "B2:B"+InputDT.Rows.Count.ToString

Follow same steps for Column C and D as well.

1 Like

So 2 things:

  1. this was exactly what i needed, thank you and it worked.

  2. the way you explained it was exactly how i needed it so i thank you for your thorough details. this was perfect.

1 Like

@atarantino

Glad I could help. Happy Automation :smiley:

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