ไปยังเนื้อหาหลัก

วิธีแปลงข้อความ url เป็นไฮเปอร์ลิงก์ที่คลิกได้ใน Excel

สมมติว่าคุณมีหลาย URL ในแผ่นงานของคุณ แต่ไม่ได้เชื่อมโยงกันและตอนนี้คุณต้องแปลง URL ที่ไม่ได้เชื่อมโยงทั้งหมดให้เป็นไฮเปอร์ลิงก์ที่คลิกได้ดังภาพหน้าจอต่อไปนี้ แน่นอนคุณสามารถดับเบิลคลิกทีละรายการเพื่อให้คลิกได้ แต่จะใช้เวลานานหากมี URL จำนวนมาก คุณจะแปลง URL ที่ไม่ได้เชื่อมโยงหลายรายการเป็นไฮเปอร์ลิงก์ที่คลิกได้โดยอัตโนมัติใน Excel ได้อย่างไร


ลูกศรสีฟ้าฟองขวา แปลงข้อความ url เป็นไฮเปอร์ลิงก์ที่คลิกได้ด้วยรหัส VBA

ดูเหมือนว่าไม่มีวิธีอื่นที่มีประสิทธิภาพในการแก้ปัญหานี้ใน Excel ยกเว้นการใช้รหัส VBA ต่อไปนี้

1. เลือกช่วงของข้อความ URL ที่คุณต้องการแปลงเป็นไฮเปอร์ลิงก์ที่คลิกได้

2. กด ALT + F11 คีย์เพื่อเปิด Microsoft Visual Basic สำหรับแอปพลิเคชัน หน้าต่าง

3. คลิก สิ่งที่ใส่เข้าไป > โมดูลและวางรหัสต่อไปนี้ในหน้าต่างโมดูล

Sub ConvertToHyperlinks()
'Updateby Extendoffice
Dim Rng As Range
Dim WorkRng As Range
On Error Resume Next
xTitleId = "KutoolsforExcel"
Set WorkRng = Application.Selection
Set WorkRng = Application.InputBox("Range", xTitleId, WorkRng.Address, Type:=8)
For Each Rng In WorkRng
    Application.ActiveSheet.Hyperlinks.Add Rng, Rng.Value
Next
End Sub

4. จากนั้นกด F5 เพื่อเรียกใช้รหัสกล่องโต้ตอบป๊อปอัปเพื่อให้คุณเลือกช่วงจากนั้นคลิก OKและ URL ที่ยกเลิกการเชื่อมโยงที่เลือกได้ถูกแปลงเป็นไฮเปอร์ลิงก์ที่คลิกได้ ดูภาพหน้าจอ:

2

ลูกศรสีฟ้าฟองขวา แปลงข้อความ url เป็นไฮเปอร์ลิงก์ที่คลิกได้ด้วย Kutools for Excel

บางทีรหัส VBA อาจจะยากสำหรับคุณที่นี่ฉันสามารถแนะนำเครื่องมือมัลติฟังก์ชั่นให้คุณได้ -Kutools สำหรับ Excelเดียวกันกับที่ แปลงไฮเปอร์ลิงก์ คุณลักษณะนี้คุณสามารถจัดการกับการดำเนินการต่อไปนี้ได้อย่างรวดเร็ว:

  • แยกที่อยู่จริงจากไฮเปอร์ลิงก์
  • แปลงข้อความ url เป็นไฮเปอร์ลิงก์ที่คลิกได้
Kutools สำหรับ Excel : ด้วย Add-in ของ Excel ที่มีประโยชน์มากกว่า 300 รายการทดลองใช้ฟรีโดยไม่มีข้อ จำกัด ใน 30 วัน

ถ้าคุณได้ติดตั้ง Kutools สำหรับ Excelโปรดดำเนินการดังนี้:

1. เลือกช่วงของข้อความ URL ที่คุณต้องการแปลงเป็นไฮเปอร์ลิงก์ที่คลิกได้

2. คลิก Kutools > ลิงค์ > แปลงไฮเปอร์ลิงก์ดูภาพหน้าจอ:

3. ใน แปลงไฮเปอร์ลิงก์ ใหเลือก เนื้อหาของเซลล์แทนที่ที่อยู่ของไฮเปอร์ลิงก์และคลิก doc-ปุ่ม1 ปุ่มจาก ช่วงผลลัพธ์ เพื่อระบุเซลล์ที่จะใส่ผลลัพธ์

4. จากนั้นคลิก OKลิงก์ข้อความธรรมดาที่เลือกทั้งหมดจะถูกแปลงเป็นไฮเปอร์ลิงก์ที่คลิกได้ ดูภาพหน้าจอ:

หมายเหตุ:

1. หากคุณต้องการใส่ที่อยู่จริงในช่วงเดิมโปรดตรวจสอบ แปลงช่วงแหล่งที่มา.

2. หากไฮเปอร์ลิงก์เชื่อมโยงกับเอกสารปัจจุบันโปรดตรวจสอบ ไฮเปอร์ลิงก์เป็นสถานที่ในเอกสารนี้ ตัวเลือก

คลิก แปลงไฮเปอร์ลิงก์ เพื่อทราบข้อมูลเพิ่มเติมเกี่ยวกับคุณลักษณะนี้

ดาวน์โหลดและทดลองใช้ Kutools for Excel ฟรีทันที!


ลูกศรสีฟ้าฟองขวา   Demo: แปลงข้อความ url เป็นไฮเปอร์ลิงก์ที่คลิกได้ด้วย Kutools for Excel

Kutools สำหรับ Excel: ด้วย Add-in ของ Excel ที่มีประโยชน์มากกว่า 300 รายการให้ทดลองใช้ฟรีโดยไม่มีข้อ จำกัด ใน 30 วัน ดาวน์โหลดและทดลองใช้ฟรีทันที!

บทความที่เกี่ยวข้อง:

วิธีแยกที่อยู่จริงจากไฮเปอร์ลิงก์ใน Excel

สุดยอดเครื่องมือเพิ่มผลผลิตในสำนักงาน

🤖 Kutools AI ผู้ช่วย: ปฏิวัติการวิเคราะห์ข้อมูลโดยยึดตาม: การดำเนินการที่ชาญฉลาด   |  สร้างรหัส  |  สร้างสูตรที่กำหนดเอง  |  วิเคราะห์ข้อมูลและสร้างแผนภูมิ  |  เรียกใช้ฟังก์ชัน Kutools...
คุณสมบัติยอดนิยม: ค้นหา เน้น หรือระบุรายการที่ซ้ำกัน   |  ลบแถวว่าง   |  รวมคอลัมน์หรือเซลล์โดยไม่สูญเสียข้อมูล   |   รอบโดยไม่มีสูตร ...
การค้นหาขั้นสูง: VLookup หลายเกณฑ์    VLookup หลายค่า  |   VLookup ข้ามหลายแผ่น   |   การค้นหาที่ไม่ชัดเจน ....
รายการแบบเลื่อนลงขั้นสูง: สร้างรายการแบบหล่นลงอย่างรวดเร็ว   |  รายการแบบหล่นลงขึ้นอยู่กับ   |  เลือกหลายรายการแบบหล่นลง ....
ผู้จัดการคอลัมน์: เพิ่มจำนวนคอลัมน์เฉพาะ  |  ย้ายคอลัมน์  |  สลับสถานะการมองเห็นของคอลัมน์ที่ซ่อนอยู่  |  เปรียบเทียบช่วงและคอลัมน์ ...
คุณสมบัติเด่น: กริดโฟกัส   |  มุมมองการออกแบบ   |   บาร์สูตรใหญ่    สมุดงานและตัวจัดการชีต   |  ห้องสมุดทรัพยากร (ข้อความอัตโนมัติ)   |  เลือกวันที่   |  รวมแผ่นงาน   |  เข้ารหัส/ถอดรหัสเซลล์    ส่งอีเมลตามรายการ   |  ซุปเปอร์ฟิลเตอร์   |   ตัวกรองพิเศษ (กรองตัวหนา/ตัวเอียง/ขีดทับ...) ...
ชุดเครื่องมือ 15 อันดับแรก12 ข้อความ เครื่องมือ (เพิ่มข้อความ, ลบอักขระ, ... )   |   50 + แผนภูมิ ประเภท (แผนภูมิ Gantt, ... )   |   40+ ใช้งานได้จริง สูตร (คำนวณอายุตามวันเกิด, ... )   |   19 การแทรก เครื่องมือ (ใส่ QR Code, แทรกรูปภาพจากเส้นทาง, ... )   |   12 การแปลง เครื่องมือ (ตัวเลขเป็นคำ, การแปลงสกุลเงิน, ... )   |   7 ผสานและแยก เครื่องมือ (แถวรวมขั้นสูง, แยกเซลล์, ... )   |   ... และอื่น ๆ

เพิ่มพูนทักษะ Excel ของคุณด้วย Kutools สำหรับ Excel และสัมผัสประสิทธิภาพอย่างที่ไม่เคยมีมาก่อน Kutools สำหรับ Excel เสนอคุณสมบัติขั้นสูงมากกว่า 300 รายการเพื่อเพิ่มประสิทธิภาพและประหยัดเวลา  คลิกที่นี่เพื่อรับคุณสมบัติที่คุณต้องการมากที่สุด...

รายละเอียด


แท็บ Office นำอินเทอร์เฟซแบบแท็บมาที่ Office และทำให้งานของคุณง่ายขึ้นมาก

  • เปิดใช้งานการแก้ไขและอ่านแบบแท็บใน Word, Excel, PowerPoint, ผู้จัดพิมพ์, Access, Visio และโครงการ
  • เปิดและสร้างเอกสารหลายรายการในแท็บใหม่ของหน้าต่างเดียวกันแทนที่จะเป็นในหน้าต่างใหม่
  • เพิ่มประสิทธิภาพการทำงานของคุณ 50% และลดการคลิกเมาส์หลายร้อยครั้งให้คุณทุกวัน!
Comments (17)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Дай бог здоровья, вам, вашим матерям и детям, первенца в честь автора назову
This comment was minimized by the moderator on the site
Muito bom, só uma dúvida, existe a possibilidade de deixar um intervalo fixo já na macro (sem precisar aparecer aquele pop-up pra selecionar o intervalo), tipo clico pra excutar a macro e ele pega o intervalo que já está configurado na macro e ativa os links, pulando a etapa de ter que clicar em ok e tals. Se puderem me ajudar com esse dúvida serei grato.
This comment was minimized by the moderator on the site
Hello, Tosetti

To solve your problem, please apply the below code: (First, you should select the hyperlink texts)

Sub ConvertToHyperlinks()
'Updateby Extendoffice
Dim Rng As Range
Dim WorkRng As Range
On Error Resume Next
Set WorkRng = Application.Selection
For Each Rng In WorkRng
    Application.ActiveSheet.Hyperlinks.Add Rng, Rng.Value
Next
End Sub

Please try it, hope it can help you!
This comment was minimized by the moderator on the site
Oh crap.... it broke my Excel. By mistake I selected entire column and it forze for... ages!!
This comment was minimized by the moderator on the site
hi
when i click on the hyperlink .. it wont take to me to email page ( as an Outlook or Gmail) Please support
This comment was minimized by the moderator on the site
Hello, Babu,
May be the below article can help you for solving your problem, please view it:
https://www.extendoffice.com/documents/excel/3304-excel-convert-email-to-hyperlink.html

Hope it can help you!
This comment was minimized by the moderator on the site
I had to switch nearly 55,000 cells from plain text to hyperlinks. This helped me cut the time down from "the rest of my natural life" to five minutes. Thank you!
This comment was minimized by the moderator on the site
This is very helpful...Thanks
This comment was minimized by the moderator on the site
This is Great! Worked like a charm
This comment was minimized by the moderator on the site
Man! This is so awesome, I've spent so long trying to find an easy way and this took seconds! Works great!!!
This comment was minimized by the moderator on the site
Thanks a lot my friend! it worked! :lol:
This comment was minimized by the moderator on the site
The code almost works, but author has left a small copy-paste error. You need to remove "" from the first line, and "" from the last line, and then it will work. Cheers.
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