A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

macros



 
 
Thread Tools Display Modes
  #1  
Old February 25th, 2009, 03:01 AM posted to microsoft.public.excel.newusers
John
external usenet poster
 
Posts: 2,649
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  
Old February 25th, 2009, 04:01 AM posted to microsoft.public.excel.newusers
L. Howard Kittle
external usenet poster
 
Posts: 516
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  
Old February 25th, 2009, 04:03 AM posted to microsoft.public.excel.newusers
L. Howard Kittle
external usenet poster
 
Posts: 516
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  
Old February 25th, 2009, 03:01 PM posted to microsoft.public.excel.newusers
John
external usenet poster
 
Posts: 2,649
Default macros

Thank you Howard for your time and imput.
  #5  
Old February 25th, 2009, 03:03 PM posted to microsoft.public.excel.newusers
John
external usenet poster
 
Posts: 2,649
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  
Old February 27th, 2009, 11:27 PM posted to microsoft.public.excel.newusers
John
external usenet poster
 
Posts: 2,649
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?




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:22 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.