Lurker
08-29-2012, 08:58 AM
Hi there,
As a VBA novice I would be very grateful for help on this issue, I have searched this site and others to no avail.
(In a macro running on a Word doc table) the line below removes the final 3 characters of my cell text. However, I need only the THIRD-TO-LAST character removing, and the final two left intact. (i.e. the nth character from the right-hand end of the cell). [I have already taken end-of-cell markers into account by the way, that isn't the issue... for now anyway!]
oCell.Range.Text= Mid(oCell.Range.Text, 1, Len(oCell.Range.Text) - 3)
All other questions on the web cover nth character from start of cell/string; I can't find nth character counting back from the right.
Very many thanks (and quite a lot of awe) in advance.
As a VBA novice I would be very grateful for help on this issue, I have searched this site and others to no avail.
(In a macro running on a Word doc table) the line below removes the final 3 characters of my cell text. However, I need only the THIRD-TO-LAST character removing, and the final two left intact. (i.e. the nth character from the right-hand end of the cell). [I have already taken end-of-cell markers into account by the way, that isn't the issue... for now anyway!]
oCell.Range.Text= Mid(oCell.Range.Text, 1, Len(oCell.Range.Text) - 3)
All other questions on the web cover nth character from start of cell/string; I can't find nth character counting back from the right.
Very many thanks (and quite a lot of awe) in advance.