I have a google sheet with a list of people's initials in range A4:A. These initials are each hyperlinked to a different part of my sheet.
Column MM contains many cells that all have a data validation dropdown list referencing the initials list in A4:A
I need a script that triggers on edit so that when a user selects initials in the dropdown list in column MM, the script replaces it with the hyperlinked version from column A
My scripting knowledge is rudimentary. Normally I'd do a replace something like the below but I'm not sure how to implement the search so it takes the value from column MM and searches for it in columnA (or even if this would take the hyperlink function along with it.
`function replaceText(){
var oldText = "AB"; var newText = "AB hyperlinked";
var sheet = SpreadsheetApp.getActive().getSheetByName('SHOTS'); sheet.getRange("MM1:MM" + sheet.getLastRow()).createTextFinder(oldText).replaceAllWith(newText); }`
Thanks in advance for any help given