Get Next Cell address

Hello Friends,

I need to get next cell address depends upon Cell value we get by “Lookup Range” Activity.

For Example,

We get cell address D5 by Lookup Range activity, So I need to get cell address as E5 And D6, Like this I need to retrieve the cell addresses.

Please help.

Hi,

Hope the following expression helps you.

strAddress = "D5"

Then

Address on the right (E5)

System.Text.RegularExpressions.Regex.Replace(strAddress,"[A-Z]+",Function(m) UiPath.Excel.Helpers.ExcelUtilities.ConvertColumnIndexToColumnLetter(UiPath.Excel.Helpers.ExcelUtilities.ConvertColumnLetterToColumnIndex(m.Value)+1))

Address below (D6)

System.Text.RegularExpressions.Regex.Replace(strAddress,"\d+",Function(m) (Int32.Parse(m.Value)+1).ToString)

Regards,

2 Likes

Thanks a Lot!!! It is working!!!

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