메인 컨텐츠로 가기

Excel에서 한 셀에서만 다른 셀로 하이퍼 링크를 복사하는 방법은 무엇입니까?

A 열에 값 목록이 있고 각 셀에 다른 하이퍼 링크가 포함되어 있다고 가정하면 다음 스크린 샷과 같이 텍스트가없는 하이퍼 링크 만 다른 열 E에 복사하려고합니다. Excel에서이 작업을 직접 해결하는 방법은 없을 수 있지만 여기서는이를 처리하기위한 VBA 코드를 소개 할 수 있습니다.

다른 셀에 대한 문서 복사 하이퍼 링크 1

VBA 코드를 사용하여 한 셀에서 다른 셀로 하이퍼 링크 복사


화살표 블루 오른쪽 거품 VBA 코드를 사용하여 한 셀에서 다른 셀로 하이퍼 링크 복사

텍스트없이 하이퍼 링크 주소 만 다른 셀에 복사하려면 다음 코드가 도움이 될 수 있습니다.

1. 누르고 ALT + F11 키를 눌러 응용 프로그램 용 Microsoft Visual Basic 창.

2. 딸깍 하는 소리 끼워 넣다 > 모듈을 클릭하고 다음 코드를 모듈 창문.

VBA 코드 : 한 셀에서 다른 셀로만 하이퍼 링크 복사 :

Sub CopyHyperlinks()
'Uodateby Extendoffice
    Dim xSRg As Range
    Dim xDRg As Range
    Dim I As Integer
    Dim xAddress As String
    On Error Resume Next
    xAddress = ActiveWindow.RangeSelection.Address
    Set xSRg = Application.InputBox("Please select the original range you want to copy hyperlinks:", "KuTools For Excel", xAddress, , , , , 8)
    If xSRg Is Nothing Then Exit Sub
    Set xDRg = Application.InputBox("Please select the new range you want to paste the hyperlinks only", "KuTools For Excel", , , , , , 8)
    If xDRg Is Nothing Then Exit Sub
    Set xDRg = xDRg(1)
    For I = 1 To xSRg.Count
        If xSRg(I) <> "" And xDRg.Offset(I - 1) <> "" Then
            If xSRg(I).Hyperlinks.Count = 1 Then
                xDRg(I).Hyperlinks.Add xDRg(I), xSRg(I).Hyperlinks(1).Address
            End If
        End If
    Next
End Sub

3. 그런 다음 F5 이 코드를 실행하려면 하이퍼 링크 만 복사 할 셀을 선택하라는 대화 상자가 나타납니다. 스크린 샷을 참조하십시오.

다른 셀에 대한 문서 복사 하이퍼 링크 02

4. 그런 다음 OK을 클릭 한 다음 다른 대화 상자에만 하이퍼 린을 붙여 넣을 셀을 선택합니다. 스크린 샷을 참조하십시오.

다른 셀에 대한 문서 복사 하이퍼 링크 03

5. 그리고 하이퍼 링크 주소는 필요에 따라 원래 셀에서 지정된 셀로 복사되었습니다. 스크린 샷을 참조하십시오.

다른 셀에 대한 문서 복사 하이퍼 링크 04

주의 사항:이 코드는 또한 한 시트에서 다른 시트로 원하는대로 하이퍼 링크를 복사하는 데 도움이 될 수 있습니다.

최고의 사무 생산성 도구

🤖 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 (13)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
I made the following edits to work for my use case:
Sub CopyHyperlinks()
'Uodateby Extendoffice
Dim xSRg As Range
Dim xDRg As Range
Dim I As Integer
Dim xAddress As String
On Error Resume Next
xAddress = ActiveWindow.RangeSelection.Address
Set xSRg = Application.InputBox("Please select the original range you want to copy hyperlinks:", "KuTools For Excel", xAddress, , , , , 8)
If xSRg Is Nothing Then Exit Sub
Set xDRg = Application.InputBox("Please select the new range you want to paste the hyperlinks only", "KuTools For Excel", , , , , , 8)
If xDRg Is Nothing Then Exit Sub
Set xDRg = xDRg(1)
For I = 1 To xSRg.Count
If xSRg(I).Hyperlinks(1).Address <> "" Or xSRg(I).Hyperlinks(1).SubAddress <> "" Then
If xSRg(I).Hyperlinks.Count = 1 Then
xDRg(I).Hyperlinks.Add Anchor:=xDRg(I), _
Address:=xSRg(I).Hyperlinks(1).Address, _
SubAddress:=xSRg(I).Hyperlinks(1).SubAddress
'ScreenTip:=xSRg(I).Hyperlinks(1).ScreenTip, _
'TextToDisplay:=xSRg(I).Hyperlinks(1).TextToDisplay
End If
End If
Next
End Sub
This comment was minimized by the moderator on the site
OK, so you won't publish my comment - which is fair. But if you want me to register and log in, then you need to show me solutions that work, because (on the basis of one non-working instance) I've seen nothing to persuade me that there's any value in registering.
This comment was minimized by the moderator on the site
Doesn't work for me; does the fact that I'm still using Excel 2007 matter?
This comment was minimized by the moderator on the site
This is awesome and it works. I love copy&pasting other people's code :D
This comment was minimized by the moderator on the site
This didn't work for me either.
This comment was minimized by the moderator on the site
Lets say in your cell A1 is hyperlink, so to get the path of the hyperlink just create formula like below:
>> (MID((FORMULATEXT(A1));(FIND("(";(FORMULATEXT(A1)))+2);(FIND(";";(FORMULATEXT(A1)))-1)-(FIND("(";(FORMULATEXT(A1)))+2))) <<
This comment was minimized by the moderator on the site
Doesn't work.
This comment was minimized by the moderator on the site
Love it. Thank you so muchoooo.
Love From Dominican Republic :)
This comment was minimized by the moderator on the site
Doesn't work.
This comment was minimized by the moderator on the site
hello.. what if i want to copy the hyperlink through vlookup? i already have the formula but when i click the the hyperlink it "cannot open specied file" will appear.

Please help me
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