View Single Post
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

Hi Steve,

Sub Macro1()
With ActiveCell
.Value = "text1"
.Offset(0, 1) = "text2"
.Resize(1, 2).Copy
End With
End Sub


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Steve" wrote in message
...
Would appreciate some help with a simple macro.

I'd like a keystroke-activated macro to do the following in whatever
cell I happen to be in:

insert "text1" into the cell I activate the macro from,

move one cell to the right and insert "text2",

select and copy the contents of both cells to the clipboard,

end the macro with the original cell active and the dashed line around
both cells indicating they were copied to the clipboard.

I tried recording the keystrokes to do this, but the recorded macro
includes specific cell addresses. I need something that uses some form
of relative cell addressing.

Thanks.

Steve