Add up an IP on variable extracted on Chrome

Hi!
In my project I extract an IP address from Chrome, making it a variable.
Then I write it in an Excel.
My question is the following: Can X be added to the last octet? For example 10.0.0.1 + 1 = 10.0.0.2
Thank you so much for your time!!

@ivances
Welcome to the Forum

A very Basic approach Could be

Assign activity
Left side: arrSegments - String() datatype
Right Side: yourStringVar.split("."c)

Assign Activity
Left Side: arrSegments.last
Right Side: (CInt(arrSegments.last) + 1).toString

Assign Activity
Left Side: strIPNew
Right Side: String.join(".",arrSegments)

2 Likes

Hi @ppr.
Thank you so much for your help.
I am very novice and i feel blocked.
Where should I implement that code? I have 2 steps, take the IP from Chrome and write it to a cell.
On advanced mode, i have the following on the Excel write:

Saved.Values(Of ExcelValue)(“ipgestion”)

I am testing options on StudioX but i dont find a suitable one.

Sorry for being a noob and thank you so much for your help! :smiley:

just assign to the IP value to the variable (yourStringVar - use your variable name) and then it should work as described. Finaly you write it to Excel. Give a try

1 Like

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