Excel Get Selected Range

Hi, I am using get selected range activity to get the currently selected cell (single cell) and I only want the row number for that cell Ex. “C107” only want the 107 part. How would I go about doing that?

Hi,

Use
Regex.replace(“c107”,“[^0-9]+”,“”)

1 Like

Since I store the selected cell as a variable in get selected range activity, would it be like this?
Regex.replace(CurrCell,“[^0-9]+”,“”)

Also can explain what the “[^0-9]+”,“” parts mean? Thanks.

Yes you used the correct expression with variable,

[^0-9]+ it means in the provided string if the values or characters are not from 0 to 9 or basically integer replace them with empty space.

Thanks for the help, it works :+1:

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