#1   Report Post  
Posted to microsoft.public.excel.misc
Arkenor
 
Posts: n/a
Default Copy cell on click

I want to click on a cell and have that cell automatically copy without
"right clicking and going to copy" so I can quickly paste it into a different
part of the same work sheet.

I also want to be able to quickly paste cell also in the same way into a
different part of the worksheet.

(IE List of names on the left side of worksheet, and on right side of
worksheet I want to be able to paste these names just by clicking from one
side to the other.)
  #2   Report Post  
Posted to microsoft.public.excel.misc
Snow Dog
 
Posts: n/a
Default Copy cell on click

What a coincidence that we should have the same question two hours apart.
Unfortuntely then, I can't help you. Hopefully someone can help us both.

Arkenor wrote:
I want to click on a cell and have that cell automatically copy without
"right clicking and going to copy" so I can quickly paste it into a different
part of the same work sheet.

I also want to be able to quickly paste cell also in the same way into a
different part of the worksheet.

(IE List of names on the left side of worksheet, and on right side of
worksheet I want to be able to paste these names just by clicking from one
side to the other.)

  #3   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student
 
Posts: n/a
Default Copy cell on click

How about a double-click??

Take this macro and paste it into worksheet code (not a module):


Public tick
Private Sub Worksheet_BeforeDoubleClick(ByVal _
Target As Range, Cancel As Boolean)
If tick = 0 Then
Selection.Copy Range("Z100")
tick = 1
Else
Range("Z100").Copy Selection
tick = 0
End If
End Sub


This code makes use of a helper cell (Z100). Double-click the source and it
will copy, then double-click the destination and it will paste.

Just remember to put it in worksheet code.
--
Gary's Student


"Snow Dog" wrote:

What a coincidence that we should have the same question two hours apart.
Unfortuntely then, I can't help you. Hopefully someone can help us both.

Arkenor wrote:
I want to click on a cell and have that cell automatically copy without
"right clicking and going to copy" so I can quickly paste it into a different
part of the same work sheet.

I also want to be able to quickly paste cell also in the same way into a
different part of the worksheet.

(IE List of names on the left side of worksheet, and on right side of
worksheet I want to be able to paste these names just by clicking from one
side to the other.)


  #4   Report Post  
Posted to microsoft.public.excel.misc
Snow Dog via OfficeKB.com
 
Posts: n/a
Default Copy cell on click

OK, Thanks! I havn't tried it yet but thanks for the info.

Gary''s Student wrote:
How about a double-click??

Take this macro and paste it into worksheet code (not a module):

Public tick
Private Sub Worksheet_BeforeDoubleClick(ByVal _
Target As Range, Cancel As Boolean)
If tick = 0 Then
Selection.Copy Range("Z100")
tick = 1
Else
Range("Z100").Copy Selection
tick = 0
End If
End Sub

This code makes use of a helper cell (Z100). Double-click the source and it
will copy, then double-click the destination and it will paste.

Just remember to put it in worksheet code.
What a coincidence that we should have the same question two hours apart.
Unfortuntely then, I can't help you. Hopefully someone can help us both.

[quoted text clipped - 9 lines]
worksheet I want to be able to paste these names just by clicking from one
side to the other.)


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200603/1
  #5   Report Post  
Posted to microsoft.public.excel.misc
Arkenor
 
Posts: n/a
Default Kinda figured it out.

After some hunting and pecking and my lack of knowledge of VBS this is what I
came up with.

The only thing I don't like is all the ElseIf Statements. Havn't figured
out how to do a range instead of a column. Going to work on that today.

***************
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 4 Then
Selection.COPY
ElseIf Target.Column = 7 Then
On Error Resume Next
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
ElseIf Target.Column = 9 Then
On Error Resume Next
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
ElseIf Target.Column = 10 Then
On Error Resume Next
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
End If

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
Urgent date/scheduling calc needed jct Excel Worksheet Functions 3 February 24th 06 01:36 AM
Protect Workbook vs Worksheet?? Dan B Excel Worksheet Functions 3 November 7th 05 09:02 PM
Copy cell format to cell on another worksht and update automatical kevinm Excel Worksheet Functions 21 May 19th 05 11:07 AM
On click, copy text into another cell - XL2K Bob the Builder Excel Worksheet Functions 2 March 16th 05 10:03 PM
Change cell back color on click Dave Peterson Excel Discussion (Misc queries) 0 January 24th 05 10:50 PM


All times are GMT +1. The time now is 08:52 AM.

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"