Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default Help with Copy and Paste

I am trying to copy the text from one cell to another without
overwriting the Hyperlink in the second cell.

Example

A1 = Chapter 4 B1=\\My Documents\Chapter4.txt

A1 is text and B1 is a link to the TXT file.

I want B1 to = Chapper 4 but still keep the hyperlink of \\My
Documents\Chapter4.txt

I can do this by selecting the first cell, hitting F2, highlighting the
text for that cell and coping it. Then I have to select the second
cell, hitting F2, highlight the text in that cell and pasting the new
text. This keeps the original hyperlink of the second cell intact.
And while this works for a changing a limited number of cells, I have
to do this for 3,000 records. And I have been unable to create a macro
that will do it for me.

Any suggestions?

Thanks 

Steve

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default Help with Copy and Paste

Hi try,

Sub yourmacro()
Dim i As Integer
For i = Range("a65536").End(xlUp).Row To 1 Step -1
Cells(i, 2).Value = Cells(i, 2) & Cells(i, 1)
Next
End Sub

"Smonczka" wrote in message
oups.com...
I am trying to copy the text from one cell to another without
overwriting the Hyperlink in the second cell.

Example

A1 = "Chapter 4" B1="\\My Documents\Chapter4.txt"

A1 is text and B1 is a link to the TXT file.

I want B1 to = "Chapper 4" but still keep the hyperlink of "\\My
Documents\Chapter4.txt"

I can do this by selecting the first cell, hitting F2, highlighting the
text for that cell and coping it. Then I have to select the second
cell, hitting F2, highlight the text in that cell and pasting the new
text. This keeps the original hyperlink of the second cell intact.
And while this works for a changing a limited number of cells, I have
to do this for 3,000 records. And I have been unable to create a macro
that will do it for me.

Any suggestions?

Thanks ?

Steve


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default Help with Copy and Paste

Thanks

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't Copy and Paste or Paste Special between Excel Workbooks wllee Excel Discussion (Misc queries) 5 April 29th 23 03:43 AM
Copy; Paste; Paste Special are disabled Mack Neff[_3_] Excel Discussion (Misc queries) 0 April 28th 08 06:29 PM
Excel cut/Paste Problem: Year changes after data is copy and paste Asif Excel Discussion (Misc queries) 2 December 9th 05 05:16 PM
I cannot paste from one workbook to another. Copy works, paste do. JimmyMc Excel Discussion (Misc queries) 1 June 10th 05 03:54 PM
Macro to Copy/Paste then Paste to Next Line tomkarakowski Excel Programming 1 May 28th 04 01:19 AM


All times are GMT +1. The time now is 06: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"