How to remove url links globally from excel sheet ?

  • Thread starter Thread starter ComeMon!
  • Start date Start date
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) :{
 
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!"
 
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.
 
Cactus,

If I've time, I'll also try your suggestion. Anyway I adopted Dave's
suggestion which proved working fine. Tks :)
 
Just use Format Painter to copy format from any text, then drag the column where links are.
I was teaching my assistant the way as Dave described(thanks though, it worked for me anyway), then my assistant showed this using format painter. I was shocked big time!!!
Always forget something very useful next to me...like air.
 
Back
Top