View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Copy Paste from Active cell

You macro select B11:J11

then it does nothing with it and selects

B11:M11

which it copies and pastes as values on top of itself.

What functionally do you want to do.

You said copy the activecell and what range associated with it and where to
you want to paste it.

If I wanted to copy the activecell and two cells to the right always to
column M of the same row I would do something like


Sub CopySomething()
ActiveCell.Resize(1,3).Copy
Cells(ActiveCell.Row,"M").Pastespecial xlValues
Application.Goto Reference:="HomeBase"
End Sub

Perhaps you can adapt that to meet your needs.

--
Regards,
Tom Ogilvy



"briank" wrote in message
...
I would like to have my macro copy paste range value from column b to J

but
cannot seem to modify from a fixed postion to active cell. Ideally I want

to
be able to move cell to any row in column b and run macro. Any help is
appreciated.

Sub Macro2()
Range("B11:J11").Select
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 5
Range("B11:M11").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Application.Goto Reference:="HomeBase"
End Sub