LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 119
Default Recorded macro has hard cell contents.

I've searched this forum but haven't found an answer to this. This should be
a simple task to perform. I'm also not versed in writing Excel macros.

I'm trying to record a macro that will take the contents of a cell and
append it to the contents of another cell in the same row. I've enable
relative addressing so it would work on any row, but the pasted contents is
always the contents of the target cell when the macro was recorded.

The keyboard sequence that works is:

F2; CTRL-SHIFT-HOME; CTRL-C; TAB; TAB; F2;CTRL-V

the macro captured is:

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 8/10/2006 by John E. Spiter
'
' Keyboard Shortcut: Ctrl+w
'
ActiveCell.FormulaR1C1 = ""
ActiveCell.Offset(0, 2).Range("A1").Select
ActiveCell.FormulaR1C1 = "Brownbag_final_files/slide0194.htm" <---
Note the hard cell contents here€¦.
With ActiveCell.Characters(Start:=1, Length:=34).Font
.Name = "Arial"
.FontStyle = "Regular"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
ActiveCell.Offset(1, -2).Range("A1").Select
End Sub
 
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
How to save file in a macro taking new name from cell contents? LowIQ Excel Discussion (Misc queries) 3 May 31st 06 10:52 PM
Compiling macro based on cell values simonsmith Excel Discussion (Misc queries) 1 May 16th 06 08:31 PM
Row Expansion Susan Excel Worksheet Functions 11 February 28th 06 07:15 PM
Macro to remove contents of cell and move all other contents up one row adw223 Excel Discussion (Misc queries) 1 July 1st 05 03:57 PM
How can I edit cell contents with a macro in Excel? Mind the gaps! Excel Discussion (Misc queries) 2 March 23rd 05 08:51 PM


All times are GMT +1. The time now is 06:16 PM.

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

About Us

"It's about Microsoft Excel"