Skip i'r prif gynnwys

Sut i newid sawl llwybr hypergyswllt ar unwaith yn Excel?

At ryw bwrpas, efallai y byddwch yn creu hypergysylltiadau lluosog ar gyfer eich data yn y daflen waith, ac mae pob un o'r hypergysylltiadau wedi'u cysylltu â'r un llwybr ffeil neu gyfeiriad, ond nawr, mae angen i chi ddisodli'r llwybr hypergyswllt hwn â chyfeiriad arall ar y tro. Efallai y bydd newid llwybr yr hypergysylltiadau yn unigol yn gwastraffu llawer o amser, a oes ffordd gyflym o ddatrys y broblem hon?

Newid sawl llwybr hypergyswllt ar unwaith mewn taflen waith gyda chod VBA

Newid sawl llwybr hypergyswllt ar unwaith mewn taflen waith / llyfr gwaith / taflenni lluosog / dewis gyda nodwedd anhygoel


Newid sawl llwybr hypergyswllt ar unwaith mewn taflen waith gyda chod VBA

Gan dybio bod gennych chi restr o ddata gyda'r un hypergysylltiadau â'r llun a ddangosir, a gyda chod VBA, gallwch chi ddisodli'r hen lwybr ffeil neu gyfeiriad mewn taflen waith gydag un newydd yn gyflym.

1. Dal i lawr y ALT + F11 allweddi, ac mae'n agor y Ffenestr Microsoft Visual Basic for Applications.

2. Cliciwch Mewnosod > Modiwlau, a gludwch y macro canlynol yn y Ffenestr modiwl.

Cod VBA: newid sawl llwybr hypergyswllt ar unwaith

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. Yna pwyswch F5 allwedd i redeg y cod hwn, a blwch prydlon i adael i chi fewnbynnu'ch hen gyfeiriad hyperddolen i'r Hen destun blwch. Gweler y screenshot:

4. Cliciwch OK, ac mae blwch prydlon arall yn cael ei dynnu allan i'ch atgoffa rhag mynd i mewn i'r cyfeiriad hyperddolen newydd rydych chi am ei ddefnyddio.

5. Ac yna cliciwch OK, mae'r un hen gyfeiriadau hyperddolen wedi'u disodli gan yr un newydd ar unwaith. Gweler sgrinluniau:


Newid sawl llwybr hypergyswllt ar unwaith mewn taflen waith / llyfr gwaith / taflenni lluosog / dewis gyda nodwedd anhygoel

Os ydych chi am ddisodli'r llwybrau hyperddolen o ddetholiad, taflenni lluosog, pecyn gwaith cyfredol neu lyfrau gwaith lluosog, sut allech chi wneud? Gyda Dod o hyd ac yn ei le nodwedd o Kutools ar gyfer Excel, gallwch chi ddelio â'r dasg hon yn gyflym.

Nodyn:I gymhwyso hyn Dod o hyd ac yn ei le cyfleustodau, yn gyntaf, dylech lawrlwytho'r Kutools ar gyfer Excel, ac yna cymhwyswch y nodwedd yn gyflym ac yn hawdd.

Ar ôl gosod Kutools ar gyfer Excel, gwnewch fel hyn:

1. Cliciwch Kutools > Llywio, gweler y screenshot:

2. Yn yr agored Llywio pane, cliciwch Dod o hyd i a disodli tab, yn y Dod o hyd ac yn ei le pane, cliciwch Disodli tab, ac yna gwnewch y gweithrediadau canlynol:

  • Rhowch yr hen destun hyperddolen rydych chi am ddod o hyd iddo yn y Dewch o hyd i beth blwch testun, ac yna teipiwch y testun hyperddolen newydd yr ydych am ei ddisodli yn y Amnewid gyda blwch testun;
  • Nodwch y cwmpas lle rydych chi am ddod o hyd i'r llwybr hyperddolen a'i ddisodli o'r Yn rhestr ostwng;
  • Yna, dewiswch Hypergysylltiadau o'r gwymplen Edrych i mewn;
  • O'r diwedd, cliciwch Dewch o Hyd i Bawb botwm, mae'r holl gelloedd cyfatebol sy'n cynnwys y testun hyperddolen penodol wedi'u rhestru yn y blwch rhestr waelod.

3. Yna, cliciwch Amnewid All botwm, mae'r hen lwybrau hypergyswllt wedi'u newid i'r rhai newydd ar unwaith, gweler y screenshot:

Cliciwch i Lawrlwytho Kutools ar gyfer Excel ar gyfer Treial Am Ddim!


Erthyglau mwy cymharol:

  • Detholiad Cyfeiriadau Gwirioneddol o Hypergysylltiadau
  • Gan dybio bod gennych chi ystod o gelloedd sy'n cynnwys hypergysylltiadau, ac nawr mae angen i chi weld cyrchfan go iawn yr hypergysylltiadau a'u tynnu o'r hypergysylltiadau fel y dangosir y screenshot canlynol. A oes unrhyw ffyrdd hawdd o ddatrys y broblem hon yn gyflym?
  • Trosi URLau Delwedd I Ddelweddau Gwirioneddol Yn Excel
  • Os oes gennych restr o gyfeiriadau URL delwedd yng ngholofn A, ac yn awr, rydych chi am lawrlwytho'r lluniau cyfatebol o'r URLau a'u harddangos i'r golofn B gyfagos fel y llun chwith a ddangosir. Yn Excel, sut allech chi dynnu'r lluniau go iawn o'r URLau delwedd yn gyflym ac yn hawdd?
  • Trosi Testun Url I Hyperlink Cliciadwy Yn Excel
  • Gan dybio bod gennych chi sawl url yn eich taflen waith, ond nid ydyn nhw'n gysylltiedig, ac nawr mae angen i chi drosi'r holl urls digyswllt yn hyperddolenni y gellir eu clicio, fel y dangosir y sgrinluniau canlynol. Wrth gwrs, gallwch chi eu clicio ddwywaith fesul un i'w gwneud yn gliciadwy, ond bydd hyn yn cymryd llawer o amser os oes llawer o urls. Sut allech chi drosi urls digyswllt lluosog i hyperddolenni y gellir eu clicio yn awtomatig yn Excel?
  • Agorwch Dudalen Benodol o Ddogfen PDF Gan Excel Hyperlink
  • Pan fyddwch chi'n cysylltu cell â ffeil PDF, fel arfer, byddwch chi'n mynd i dudalen gyntaf y ffeil PDF pan fyddwch chi'n clicio i agor yr hyperddolen. Os oes angen i chi neidio'n uniongyrchol i dudalen benodol o'r ffeil PDF trwy glicio ar yr hyperddolen, efallai y bydd yr erthygl hon yn ffafrio chi.

Offer Cynhyrchiant Swyddfa Gorau

🤖 Kutools AI Aide: Chwyldro dadansoddi data yn seiliedig ar: Cyflawniad Deallus   |  Cynhyrchu Cod  |  Creu Fformiwlâu Personol  |  Dadansoddi Data a Chynhyrchu Siartiau  |  Invoke Swyddogaethau Kutools...
Nodweddion Poblogaidd: Darganfod, Amlygu neu Adnabod Dyblygiadau   |  Dileu Rhesi Gwag   |  Cyfuno Colofnau neu Gelloedd heb Colli Data   |   Rownd heb Fformiwla ...
Super-edrych: VLookup Meini Prawf Lluosog    VLookup Gwerth Lluosog  |   VLookup Ar Draws Taflenni Lluosog   |   Edrych Niwlog ....
Rhestr gwympo Uwch: Creu Rhestr Gollwng yn Gyflym   |  Rhestr Gollwng Dibynnol   |  Rhestr Gollwng Aml-ddewis ....
Rheolwr Colofn: Ychwanegu Nifer Penodol o Golofnau  |  Symud Colofnau  |  Toglo Statws Gwelededd Colofnau Cudd  |  Cymharwch Ystodau a Cholofnau ...
Nodweddion dan Sylw: Ffocws ar y Grid   |  Golwg Dylunio   |   Bar Fformiwla Mawr    Rheolwr Llyfr Gwaith a Thaflen   |  Llyfrgell Adnoddau (Testun Auto)   |  Dewiswr Dyddiad   |  Cyfuno Taflenni Gwaith   |  Amgryptio/Dadgryptio Celloedd    Anfon E-byst trwy Restr   |  Hidlo Super   |   Hidlo Arbennig (hidlo mewn print trwm/italig/strikethrough...) ...
15 Set Offer Gorau12 Testun offer (Ychwanegu Testun, Dileu Cymeriadau,...)   |   50 + Siart Mathau (Siart Gantt,...)   |   40+ Ymarferol Fformiwlâu (Cyfrifwch oedran yn seiliedig ar ben-blwydd,...)   |   19 mewnosod offer (Mewnosod Cod QR, Mewnosod Llun o'r Llwybr,...)   |   12 Trosi offer (Rhifau i Eiriau, Trosi arian cyfred,...)   |   7 Uno a Hollti offer (Rhesi Cyfuno Uwch, Celloedd Hollt,...)   |   ... a mwy

Supercharge Eich Sgiliau Excel gyda Kutools ar gyfer Excel, a Phrofiad Effeithlonrwydd Fel Erioed Erioed. Kutools ar gyfer Excel Yn Cynnig Dros 300 o Nodweddion Uwch i Hybu Cynhyrchiant ac Arbed Amser.  Cliciwch Yma i Gael Y Nodwedd Sydd Ei Angen Y Mwyaf...

Disgrifiad


Mae Office Tab yn dod â rhyngwyneb Tabbed i Office, ac yn Gwneud Eich Gwaith yn Haws o lawer

  • Galluogi golygu a darllen tabbed yn Word, Excel, PowerPoint, Cyhoeddwr, Mynediad, Visio a Phrosiect.
  • Agor a chreu dogfennau lluosog mewn tabiau newydd o'r un ffenestr, yn hytrach nag mewn ffenestri newydd.
  • Yn cynyddu eich cynhyrchiant 50%, ac yn lleihau cannoedd o gliciau llygoden i chi bob dydd!
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