메인 컨텐츠로 가기

Excel에서 한 번에 여러 하이퍼 링크 경로를 변경하는 방법은 무엇입니까?

저자: 샤오양 최종 수정 날짜: 2020-09-04

어떤 목적으로 워크 시트의 데이터에 대해 여러 하이퍼 링크를 만들 수 있으며 모든 하이퍼 링크가 동일한 파일 경로 또는 주소에 연결되어 있지만 이제이 하이퍼 링크 경로를 한 번에 다른 주소로 바꿔야합니다. 하이퍼 링크의 경로를 개별적으로 변경하려면 많은 시간이 낭비 될 수 있습니다.이 문제를 빠르게 해결할 수있는 방법이 있습니까?

VBA 코드를 사용하여 워크 시트에서 한 번에 여러 하이퍼 링크 경로 변경

놀라운 기능으로 워크 시트 / 통합 문서 / 여러 시트 / 선택에서 한 번에 여러 하이퍼 링크 경로 변경


VBA 코드를 사용하여 워크 시트에서 한 번에 여러 하이퍼 링크 경로 변경

다음 스크린 샷과 동일한 하이퍼 링크가있는 데이터 목록이 있고 VBA 코드를 사용하면 워크 시트의 이전 파일 경로 또는 주소를 새 파일로 빠르게 바꿀 수 있습니다.

1. 누르고있어. ALT + F11 키가 열립니다. Microsoft Visual Basic for Applications 창.

2. 끼워 넣다 > 모듈을 클릭하고 다음 매크로를 모듈 창.

VBA 코드 : 한 번에 여러 하이퍼 링크 경로 변경

Sub ReplaceHyperlinks()
'Updateby Extendoffice
Dim Ws As Worksheet
Dim xHyperlink As Hyperlink
Dim xOld As String, xNew As String
xTitleId = "KutoolsforExcel"
Set Ws = Application.ActiveSheet
xOld = Application.InputBox("Old text:", xTitleId, "", Type:=2)
xNew = Application.InputBox("New text:", xTitleId, "", Type:=2)
Application.ScreenUpdating = False
For Each xHyperlink In Ws.Hyperlinks
    xHyperlink.Address = Replace(xHyperlink.Address, xOld, xNew)
Next
Application.ScreenUpdating = True
End Sub

3. 그런 다음 F5 이 코드를 실행하기위한 키와 이전 하이퍼 링크 주소를 입력 할 수있는 프롬프트 상자 이전 텍스트 상자. 스크린 샷보기 :

4. 딸깍 하는 소리 OK, 사용할 새 하이퍼 링크 주소를 입력하라는 또 다른 프롬프트 상자가 나타납니다.

5. 그런 다음 OK, 모든 동일한 이전 하이퍼 링크 주소가 한 번에 새 주소로 대체되었습니다. 스크린 샷보기 :


놀라운 기능으로 워크 시트 / 통합 문서 / 여러 시트 / 선택에서 한 번에 여러 하이퍼 링크 경로 변경

선택 항목, 여러 시트, 현재 통합 문서 또는 여러 통합 문서에서 하이퍼 링크 경로를 바꾸려면 어떻게 할 수 있습니까? 와 찾기 및 바꾸기 특징 Excel 용 Kutools,이 작업을 빠르게 처리 할 수 ​​있습니다.

참고 :이것을 적용하려면 찾기 및 바꾸기 먼저 유틸리티를 다운로드해야합니다. Excel 용 Kutools을 클릭 한 다음 기능을 빠르고 쉽게 적용하십시오.

설치 후 Excel 용 Kutools, 다음과 같이하십시오.

1. 딸깍 하는 소리 쿠툴 > 카테고리, 스크린 샷 참조 :

2. 열린 카테고리 창에서 찾기 및 바꾸기 탭에서 찾기 및 바꾸기 창에서 교체 탭을 누르고 다음 작업을 수행하십시오.

  • 찾을 이전 하이퍼 링크 텍스트를 무엇을 찾기 텍스트 상자를 클릭 한 다음 바꿀 새 하이퍼 링크 텍스트를 로 교체 텍스트 상자;
  • 하이퍼 링크 경로를 찾고 바꿀 범위를 지정하십시오. 이내 드롭 다운 목록;
  • 그런 다음 찾는 위치 드롭 다운에서 하이퍼 링크를 선택합니다.
  • 마지막으로 모두 찾기 버튼을 클릭하면 특정 하이퍼 링크 텍스트를 포함하는 모든 해당 셀이 하단 목록 상자에 나열됩니다.

3. 그런 다음 모두 바꾸기 버튼을 누르면 이전 하이퍼 링크 경로가 한 번에 새 경로로 변경되었습니다. 스크린 샷을 참조하십시오.

무료 평가판을 위해 Excel 용 Kutools를 다운로드하려면 클릭하십시오!


더 많은 관련 기사 :

  • 하이퍼 링크에서 실제 주소 추출
  • 하이퍼 링크가 포함 된 셀 범위가 있고 이제 다음 스크린 샷과 같이 하이퍼 링크의 실제 대상을 확인하고 하이퍼 링크에서 추출해야한다고 가정합니다. 이 문제를 빠르게 해결할 수있는 쉬운 방법이 있습니까?
  • Excel에서 이미지 URL을 실제 이미지로 변환
  • A 열에 이미지 URL 주소 목록이 있고 이제 URL에서 해당 사진을 다운로드하여 왼쪽 스크린 샷과 같이 인접한 B 열에 표시하려고합니다. Excel에서 이미지 URL에서 실제 그림을 어떻게 빠르고 쉽게 추출 할 수 있습니까?
  • Excel에서 Url 텍스트를 클릭 가능한 하이퍼 링크로 변환
  • 워크 시트에 여러 개의 URL이 있지만 연결되어 있지 않다고 가정하면 다음 스크린 샷과 같이 연결되지 않은 모든 URL을 클릭 가능한 하이퍼 링크로 변환해야합니다. 물론 클릭 할 수 있도록 하나씩 두 번 클릭 할 수 있지만 URL이 많으면 시간이 많이 걸립니다. 연결되지 않은 여러 URL을 Excel에서 자동으로 클릭 가능한 하이퍼 링크로 변환하는 방법은 무엇입니까?
  • Excel 하이퍼 링크에서 PDF 문서의 특정 페이지 열기
  • 셀을 PDF 파일에 연결하면 일반적으로 클릭하여 하이퍼 링크를 열면 PDF 파일의 첫 페이지로 이동합니다. 하이퍼 링크를 클릭하여 PDF 파일의 특정 페이지로 직접 이동해야하는 경우이 문서가 도움이 될 수 있습니다.

최고의 사무 생산성 도구

🤖 Kutools AI 보좌관: 다음을 기반으로 데이터 분석을 혁신합니다. 지능형 실행   |  코드 생성  |  사용자 정의 수식 만들기  |  데이터 분석 및 차트 생성  |  Kutools 기능 호출...
인기 기능: 중복 항목 찾기, 강조 표시 또는 식별   |  빈 행 삭제   |  데이터 손실 없이 열이나 셀 결합   |   수식없이 반올림 ...
슈퍼 조회: 다중 기준 VLookup    다중 값 VLookup  |   여러 시트에 걸친 VLookup   |   퍼지 조회 ....
고급 드롭다운 목록: 드롭다운 목록을 빠르게 생성   |  종속 드롭다운 목록   |  다중 선택 드롭 다운 목록 ....
열 관리자: 특정 개수의 열 추가  |  열 이동  |  Toggle 숨겨진 열의 가시성 상태  |  범위 및 열 비교 ...
특색 지어진 특징: 그리드 포커스   |  디자인보기   |   큰 수식 바    통합 문서 및 시트 관리자   |  리소스 라이브러리 (자동 텍스트)   |  날짜 선택기   |  워크 시트 결합   |  셀 암호화/해독    목록으로 이메일 보내기   |  슈퍼 필터   |   특수 필터 (굵게/기울임꼴/취소선 필터링...) ...
상위 15개 도구 세트12 본문 도구 (텍스트 추가, 문자 제거,...)   |   50+ 거래차트 유형 (Gantt 차트,...)   |   40+ 실용 방식 (생일을 기준으로 나이 계산,...)   |   19 삽입 도구 (QR 코드 삽입, 경로에서 그림 삽입,...)   |   12 매출 상승 도구 (숫자를 단어로, 환율,...)   |   7 병합 및 분할 도구 (고급 결합 행, 셀 분할,...)   |   ... 그리고 더

Excel용 Kutools로 Excel 기술을 강화하고 이전과는 전혀 다른 효율성을 경험해 보세요. Excel용 Kutools는 생산성을 높이고 시간을 절약하기 위해 300개 이상의 고급 기능을 제공합니다.  가장 필요한 기능을 얻으려면 여기를 클릭하십시오...

상품 설명


Office Tab은 Office에 탭 인터페이스를 제공하여 작업을 훨씬 쉽게 만듭니다.

  • Word, Excel, PowerPoint에서 탭 편집 및 읽기 사용, Publisher, Access, Visio 및 Project.
  • 새 창이 아닌 동일한 창의 새 탭에서 여러 문서를 열고 만듭니다.
  • 생산성을 50% 높이고 매일 수백 번의 마우스 클릭을 줄입니다!
Comments (47)
Rated 5 out of 5 · 1 ratings
This comment was minimized by the moderator on the site
This might be an older article, but was exactly what I needed. Thank you!
This comment was minimized by the moderator on the site
hi
thanks man you helped me a lot
This comment was minimized by the moderator on the site
I downloaded this and gave it a try and it did nothing. My hyperlinks look like this: file///\\server\shared\PO\CY2021\25079.pdf. I'm trying to change "server" to "server1" after a migration. I do the find/replace and choose Hyperlink, execute it, and... nothing happens. 
Any ideas?
This comment was minimized by the moderator on the site
Hello John,Sorry to hear that. The reason why the find/replace function didn't work is that your hyperlink file///\\server\shared\PO\CY2021\25079.pdf is not valid. According to the Excel dialog box, it shows the address of this site is not valid. Check the address and try again.
Then when I change your hyperlink to http://file///\\server\shared\PO\CY2021\25079.pdf, the find/replace function works perfectly. Please have a try. Have a nice day.
Sincerely,Mandy
This comment was minimized by the moderator on the site
Muchas gracias, me ahorraste mucho tiempo actualizando hipervinculos!
This comment was minimized by the moderator on the site
Muito obrigado! Você me salvou dezenas de horas de sono que seriam perdidas atualizando links.
This comment was minimized by the moderator on the site
Would it be possible to have a version to set a macro in power point for update links to excel, happens that monthly we need to link the power point presentation to a new excel in a new location. I have to do it one by one and it takes hours! MANY THANKS!!!!

This comment was minimized by the moderator on the site
Thankyou so much for the vba fix. I knew there had to be an easy way to fix my hyperlink problem and you provided it :) I am extremely grateful.
This comment was minimized by the moderator on the site
Many thanks for the VBA code to change multiple hyperlink paths at once. Would it be possible to have a version that would go through the different tabs (worksheets) of the xls workbook, as the current version only seems to change the links in the active worksheet? Would be highly appreciated!

Thanks,

Schweppy
This comment was minimized by the moderator on the site
Hello, Schweppy,
The below code can help you to replace the hyperlinks in all sheets, please try.

Sub ReplaceHyperlinks()
Dim xWs As Worksheet
Dim xWss As Sheets
Dim xHyperlink As Hyperlink
Dim xOld As String, xNew As String
xTitleId = "KutoolsforExcel"
Set WS = Application.ActiveSheet
xOld = Application.InputBox("Old text:", xTitleId, "", Type:=2)
xNew = Application.InputBox("New text:", xTitleId, "", Type:=2)
Application.ScreenUpdating = False
Set xWss = Application.ActiveWorkbook.Worksheets
For Each xWs In xWss
For Each xHyperlink In xWs.Hyperlinks
xHyperlink.Address = Replace(xHyperlink.Address, xOld, xNew)
Next
Next xWs
Application.ScreenUpdating = True
End Sub
This comment was minimized by the moderator on the site
This is amazing!!! Thank you for posting the code that works for all of the worksheets. I had the hardest time finding this and couldn't figure out how to create it myself. Thank you so much for sharing your code with the world!!!
Rated 5 out of 5
This comment was minimized by the moderator on the site
Your code helped me update hundreds of hyperlinks in a blink of an eye. Thank you soo much for you help.
This comment was minimized by the moderator on the site
Thanks a lot, works perfectly fine. Highly appreciated.
This comment was minimized by the moderator on the site
Glad it helps. Any questions, please feel free to contact us. Have a nice day!
This comment was minimized by the moderator on the site
Many thanks for the VBA code to change multiple hyperlink paths at once. Would it be possible to have a version that would go through the different tabs (worksheets) of the xls workbook, as the current version only seems to change the links in the active worksheet? Would be highly appreciated!

Thanks,

Schweppy
This comment was minimized by the moderator on the site
Had a spreadsheet with over 200 items that had hyperlinks that needed to be edited. This just saved me SO MUCH TIME. THANK YOU!!
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations