Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Kishore
 
Posts: n/a
Default How to edit in every cell with a common rule

I am a novice user, and would really appreciate any help.
If I want to prepend all non-empty cells in my work sheet with some
strings. How should I do it?
For example, all my cells are having data as web site names. I would like to
prepend "http://" to make the same clickable.

Alternatively, how should I change the property of all non-blank cells as to
the hyper link to connect to the same site as given as cell value.

Please help.
Thanks a lot,

  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

Do you really mean all the cells in your worksheet?

And if you do, are all the cells in one column?

If they are, I'd use a helper column and put a formula like:

=hyperlink("http://" & a1)

and copy down that column

Then hide (not delete) the original column.



Kishore wrote:

I am a novice user, and would really appreciate any help.
If I want to prepend all non-empty cells in my work sheet with some
strings. How should I do it?
For example, all my cells are having data as web site names. I would like to
prepend "http://" to make the same clickable.

Alternatively, how should I change the property of all non-blank cells as to
the hyper link to connect to the same site as given as cell value.

Please help.
Thanks a lot,


--

Dave Peterson
  #3   Report Post  
Dave Peterson
 
Posts: n/a
Default

And as a macro that builds this formula in the original cell:

Option Explicit
Sub testme()

Dim myRng As Range
Dim myCell As Range

On Error Resume Next
Set myRng = Intersect(Selection, _
Selection.Cells.SpecialCells(xlCellTypeConstants, xlTextValues))
On Error GoTo 0

If myRng Is Nothing Then
MsgBox "Please select some cells with values!"
Exit Sub
End If

For Each myCell In myRng.Cells
myCell.Formula = "=hyperlink(""http://" & myCell.Value & """)"
Next myCell

End Sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm


Dave Peterson wrote:

Do you really mean all the cells in your worksheet?

And if you do, are all the cells in one column?

If they are, I'd use a helper column and put a formula like:

=hyperlink("http://" & a1)

and copy down that column

Then hide (not delete) the original column.

Kishore wrote:

I am a novice user, and would really appreciate any help.
If I want to prepend all non-empty cells in my work sheet with some
strings. How should I do it?
For example, all my cells are having data as web site names. I would like to
prepend "http://" to make the same clickable.

Alternatively, how should I change the property of all non-blank cells as to
the hyper link to connect to the same site as given as cell value.

Please help.
Thanks a lot,


--

Dave Peterson


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can you make a cell with a diagonal, so that you can edit the upper and lower part of the cell? g wills New Users to Excel 3 February 17th 05 10:23 PM
Edit cell value Sumit New Users to Excel 2 February 15th 05 12:45 PM
How to switch to edit the cell hon123456 Excel Discussion (Misc queries) 2 January 13th 05 10:40 AM
Copy Formula But Keep 1 Common Cell Towmech Excel Discussion (Misc queries) 3 December 18th 04 12:09 AM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


All times are GMT +1. The time now is 01:46 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"