simple copy and paste help :/

Sonican

New Member
Joined
Jun 20, 2016
Messages
13
Ok so in short I am very new to this, and have been doing OK until this stupid roadblock.
I have a bunch of ID numbers in column A of sheet one. when I double click one, I need the value in that cell when double clicked to be copied into cell b5 in sheet2 and the focus of the screen change from being on sheet one to being on sheet2. Also, lets say that if I want to go back to sheet1 and double click a second number, it should replace the first number on sheet2.
Thanks in advance, you are helping me more than you know.
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
I don't think I can help with double clicking, but you can create a keyboard shortcut that will do it.

Using VBA you can create a macro to do that for you and thankfully it's a pretty simple one. If you don't know what VBA is this might sound confusing, but first you need to make sure you have the Developer Tab available. If you need help with that see Adding Developer Tab. Once you have the Developer Tab press Alt+F11 to open VBA Editor and paste this into the blank window:

Sub Paste_to_sheet2()



ActiveCell.Copy
Sheets("sheet2").Select
Range("B5").Select
ActiveSheet.Paste
Application.CutCopyMode = False

End Sub

After you've done that select the Developer Tab and click the "Macros" button. Find the option "Paste_to_sheet2" and highlight it. Then click "Options". Once there you can assign a keyboard shortcut and click "OK". Once you've done that whatever cell you are clicked on (and you press your selected hotkey) will be pasted to cell B5.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,491
Messages
6,125,109
Members
449,205
Latest member
ralemanygarcia

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