#1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 2,069
Default macros

If I have a macro that copies A1 and pastes it into b1, how can I change the
macro to paste it into any selected cell?
  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 698
Default macros

Hi HOHN,

Try one of these...

Sub S_Copy()
ActiveCell.Value = Range("A1").Value
End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Target.Value = Range("A1").Value
End Sub

Where you will have to activate the S_Copy() macro with a button or such and
the Selection_Change macro will copy A1 th the cell you click on.

HTH
Regards,
Howard

"JOHN" wrote in message
...
If I have a macro that copies A1 and pastes it into b1, how can I change
the
macro to paste it into any selected cell?



  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 698
Default macros

And I apologize for the misspelling of your name!

Howard

"JOHN" wrote in message
...
If I have a macro that copies A1 and pastes it into b1, how can I change
the
macro to paste it into any selected cell?



  #4   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 2,069
Default macros

Thank you Howard for your time and imput.
  #5   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 2,069
Default macros

My father always said..."Call me by any name, Just never call me late for
dinner....
Thanks again for your help.

"L. Howard Kittle" wrote:

And I apologize for the misspelling of your name!

Howard

"JOHN" wrote in message
...
If I have a macro that copies A1 and pastes it into b1, how can I change
the
macro to paste it into any selected cell?






  #6   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 2,069
Default macros

This is a copy of the macro, where do I put in your suggested changes?
I am coping row 5, columns A:V and pasting them into cj3. I want to change
CJ3 to any selected cell.

Sub JOHN()
'
' JOHN Macro
''
Range("A5:V5").Select
Selection.Copy
Range("CJ3").Select
ActiveSheet.Paste

"L. Howard Kittle" wrote:

Hi HOHN,

Try one of these...

Sub S_Copy()
ActiveCell.Value = Range("A1").Value
End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Target.Value = Range("A1").Value
End Sub

Where you will have to activate the S_Copy() macro with a button or such and
the Selection_Change macro will copy A1 th the cell you click on.

HTH
Regards,
Howard

"JOHN" wrote in message
...
If I have a macro that copies A1 and pastes it into b1, how can I change
the
macro to paste it into any selected cell?




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
Macros: can you copy macros from one doc to another? Roady Excel Discussion (Misc queries) 1 June 12th 08 05:47 PM
Excel 2007 macros - how to merge 5 macros together into one Sue Excel Discussion (Misc queries) 1 April 16th 08 08:36 PM
Macros warning always shows up, even if all macros removed Joe M Excel Discussion (Misc queries) 1 December 20th 07 04:45 AM
Macros - copying macros from one computer to another TT Excel Discussion (Misc queries) 18 December 14th 06 03:24 AM
Training: More on how to use macros in Excel: Recording Macros ToriT Excel Worksheet Functions 2 February 10th 06 07:05 PM


All times are GMT +1. The time now is 11:38 AM.

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"