Help with adapting a macro

tigger6333

New Member
Joined
Sep 6, 2009
Messages
43
Greetings!

I have created a macro that copies a tick in cell O2 into cell D2.

How do I adjust the macro so that it copies the tick into whatever cell I select?

My recorded macro looks like this:


Sub Add_A_Tick()
'
' Add_A_Tick Macro
'
' Keyboard Shortcut: Ctrl+t
'
Range("O2").Select
Application.CutCopyMode = False
Selection.Copy
Range("D2").Select
ActiveSheet.Paste
With Selection.Font
.ThemeColor = xlThemeColorLight1
.TintAndShade = 0
End With
End Sub


Thanks in advance
tigger
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
If your "tick" is always in cell "O2":
Code:
Sub Add_A_Tick()
' Add_A_Tick Macro
' Keyboard Shortcut: Ctrl+t
Range("O2").Copy Selection
    With Selection.Font
        .ThemeColor = xlThemeColorLight1
        .TintAndShade = 0
    End With
End Sub
This will paste the value of cell "O2" to the active cell on your worksheet.
 
Upvote 0
Hey Datsmart

Thanks very much for your reply.
Just what I was trying to find out how to do.

Cheers
tigger
 
Upvote 0

Forum statistics

Threads
1,214,798
Messages
6,121,636
Members
449,043
Latest member
farhansadik

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top