How to increment cell value by 1

Hi, I am using Look up range activity to find the index of particular cell. Say suppose I got the index is B7. Now I want to move to C8. I have extracted the only integer part from “B7” and stored in a variable called “Intcell”. So while writing to cell, I wrote like “C”+(IntCell+1).ToString. But it is giving me error that strictly disallow implicit conversion from string to double.
Can anyone suggest me on this? or is there any other way to achieve this?
Thanks in advance!

@Rohit_Patil1
“C”+((IntCell+1).ToString)
Try with this

Thanks for reply Sangeetha. Let me try on this.

Hi,

The following expression can output offset address from specific cell.

UiPath.Excel.Helpers.ExcelUtilities.ConvertColumnIndexToColumnLetter(UiPath.Excel.Helpers.ExcelUtilities.ConvertColumnLetterToColumnIndex(System.Text.RegularExpressions.Regex.Match(strCell,"^[A-Za-z]+").Value)+1)+(CInt(System.Text.RegularExpressions.Regex.Match(strCell,"\d+$").Value)+1).ToString

Please modify the above two 1 to actual offset value.

Regards,

Hi Thanks, but i am getting the same error.

Hi Yoichi, Thanks for the response. Let me try with this method.

Hi Yoichi. This worked. This is great approach to do in future tasks also. Thanks for the help.

1 Like

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