Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default Copy Paste from Active cell

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default Copy Paste from Active cell

Tom,
The cells range in question are links to other cells in a worksheet. The
purpose of the copy / paste value is to eliminate the links. In this
situation I am starting at column B and want the range to extend to column M.
Your code will copy / paste the column B. How can I extend it to
incorporate column B through M?

"Tom Ogilvy" wrote:

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




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Copy Paste from Active cell

Sub RemoveLinks()
if activecell.Column = 2 then
activeCell.Resize(1,12).copy
activeCell.PasteSpecial xlValues
end if
End Sub

--
Regards,
Tom Ogilvy



"briank" wrote in message
...
Tom,
The cells range in question are links to other cells in a worksheet. The
purpose of the copy / paste value is to eliminate the links. In this
situation I am starting at column B and want the range to extend to column

M.
Your code will copy / paste the column B. How can I extend it to
incorporate column B through M?

"Tom Ogilvy" wrote:

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






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
Active Cell Copy And Paste Sheet to Sheet A.R.J Allan Jefferys New Users to Excel 4 May 4th 06 02:04 AM
Copy and Paste macro needs to paste to a changing cell reference loulou Excel Programming 0 February 24th 05 10:29 AM
Paste special to the active cell stakar[_20_] Excel Programming 2 August 17th 04 10:42 AM
Copy formula in active cell alabanda Excel Programming 1 January 12th 04 01:45 PM
Moving active cell after copy T Pitts Excel Programming 6 October 17th 03 08:16 PM


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