Hello,
I am trying to find the correct code to substitute the last occurrence of a full stop within a sting.
When a user pastes a string into a cell, the VBA performs several checks for the cells sleeted, once of which is to replace the last full stop within the string.
e.g. dongle.com would become dongle[.]com / dongle.co.uk would become dongle.co[.]uk / 999.999.999.999 would become 999.999.999[.]999

I have found code and replaced the search criteria but it doesn't work
rlpStr = StrReverse(Replace(StrReverse(str), StrReverse("."),  StrReverse("[.]"), , 1))
I am trying to use it in my VBA this way
For Each Cell In Selection
  rlpStr = StrReverse(Replace(StrReverse(Str), StrReverse("."), StrReverse("[.]"), , 1))
Next
For my testing, I am pasting the following;
dongle.co.uk
tongle.co.uk
wongle.co.uk
bongle.co.uk
zongle.co.uk
1.1.1.1

I don't know if it matters but my data is within a table in Excel, not just normal cells.