How to remove url links globally from excel sheet ?

C

ComeMon!

Hi,

As I copy web page content then paste them directly to excel
worksheet, those url links will be copied automatically. I want to
remove them by simple step instead of going cell by cell to remove
them. Can I do that with excel commands ? So far I still couldn't find
one such command (I use excel 97) :{
 
C

Cactus

In Range Object, have a Hyperlinks.
Example copy from help.
I no try that.


For Each h in Worksheets(1).Hyperlinks
If Instr(h.Name, "Microsoft") <> 0 Then h.Follow
Next






"ComeMon!"
 
D

Dave Peterson

Select all the cells (ctrl-A (twice in xl2003))
hit alt-f11 (to get to the VBE, where macros live)
hit ctrl-g (to see the immediate window)

type this and hit enter:

selection.hyperlinks.delete

Close the VBE and back to excel to see if it worked.

===
You could even just select a smaller range and just clean that since the command
uses the current selection.
 
C

ComeMon!

Cactus,

If I've time, I'll also try your suggestion. Anyway I adopted Dave's
suggestion which proved working fine. Tks :)
 
Top