Avatar of Andreas Hermle
Andreas Hermle
Flag for Germany

asked on 

delete some portion of the 'text to display' for selected hyperlinks

Dear Experts:

On the current worksheet I got hundreds of hyperlinks

The text to display of these hyperlinks are as follows:

Examples:
90-344-75-10_REV_1
90-422-93-22_REV_4
90-375-44-11_REV_6
90-437-22-13
90-169-58-10
90-432-74_10_REV_4

So some of them may have the '_REV_X' missing.

For the selected cells I would like to run a macro that eliminates this part (i.e. the '_REV_X' part) and just leaves the number as 'text to display'.

In the above example after running the macro the 'text to display'' for these hyperlinks would look like as follows:

90-344-75-10
90-422-93-22
90-375-44-11
90-437-22-13
90-169-58-10
90-432-74_10


Help is very much appreciated. Thank you very much in advance.

Regards, Andreas
VBAMicrosoft ExcelMicrosoft Office

Avatar of undefined
Last Comment
Subodh Tiwari (Neeraj)

8/22/2022 - Mon