Coding for creating hyperlink depending on worksheet change.

  • Hello all,


    I'm dealing with coding that creates a hyperlink based on if you enter information into a column. The problem I'm having is that if any changes that touches the column triggers the coding. I was wondering if it is possible to modify the code only if a physical entry is made in the column that the code is initiated.


    Anyways here is the code I'm using:



    Also if there is a better way of doing it, please let me know.

  • Re: Coding for creating hyperlink depending on worksheet change.


    I ran your macro here. I'm not experiencing the same issue. Seems to work fine.


    I can enter anything, anywhere on the sheet EXCEPT Col L and nothing happens. If I enter something anywhere in Col L, the macro fires.


    Did I misunderstand your description of the issue ?

  • Re: Coding for creating hyperlink depending on worksheet change.


    If you use do something like insert a row then the code runs or gives me an error

  • Re: Coding for creating hyperlink depending on worksheet change.


    Add this immediately below your Dim statements


    Code
    If Target.Count > 1 Then Exit Sub


    Then if more than one cell is changed, such as inserting a row or column, then the macro will fire but immediately exit without changing anything.

    We now have a reputation system in place. If my reply helped please "Like" the reply by clicking the "Like" icon at bottom right of my reply.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!