Forum Discussion

DonBici's avatar
DonBici
Copper Contributor
Feb 20, 2024
Solved

Hyperlinks keep changing after cut/copy - paste

Hi! I have an Excel file with my CD collection. In that file I have several columns with hyperlinks and each hyperlink points to a particular page on discogs.com (with all the information of that CD)...
  • DonBici 

    This issue with hyperlinks changing after cut and paste in Excel is a known problem and can be frustrating, especially when dealing with large datasets. Here's why it happens and how you can potentially solve it:

    Why it happens:

    When you cut and paste cells containing hyperlinks, Excel sometimes adjusts the relative paths based on the new location of the pasted cells. This can lead to incorrect links pointing to different pages than intended.

    Potential solutions:

    1. Paste using Paste Special:

    Instead of using the regular "Paste" command, try using "Paste Special" and choose the option "Values and Hyperlinks." This option pastes the cell values and preserves the original hyperlink addresses without any adjustments.

    2. Use absolute references:

    You can modify your hyperlinks to use absolute references instead of relative ones. Absolute references point to specific locations regardless of the cell's position in the spreadsheet. To create an absolute reference:

    3. Use helper columns:

    Consider using a separate column to store the absolute hyperlink addresses. This way, you can copy the values from this column and paste them into the hyperlink field without worrying about relative path adjustments.

    4. Use VBA macros (advanced users):

    If you're comfortable with VBA, you can create a macro that automatically corrects hyperlinks after cut and paste operations. This requires writing code to identify and adjust the links based on specific criteria.

    Additional tips:

    • Save frequently: This ensures you don't lose significant work if the issue persists and requires manual correction.
    • Test your solutions: After implementing any of these methods, test a few links to ensure they work as expected before applying them to your entire dataset.

    By trying these solutions, you should be able to minimize the issue of hyperlinks changing after cut and paste in your Excel spreadsheet. Remember, the most suitable approach might depend on your specific workflow and preferences

Resources