Double click in cell and copy the value into another cell

asyamonique

Well-known Member
Joined
Jan 29, 2008
Messages
1,280
Office Version
  1. 2013
Platform
  1. Windows
Good Day and Happy New Year,
The datas has stored in columns "a:g" all the way down.
When i double click any cell in column "A" I would like to store the value one by one into the column "K" from first cell to down.Is it possible?
 
Hi, I’m new to this form and after searching for copy / paste with double click I found this thread and code below, it works great for me with one exception, wonder if code below could be adapted to look for specific string (header) within range in column C because my target cell varies based on content.
Sometimes my target cell might be C5 or might be C15… so I thought if look for heading name, which is constant, than I could somehow find and past value below header. Would this be possible, anybody have idea how to do this?


If column C, cell value = “Comply with SB” then
Insert row below header, copy/paste Target.value from double click function
move to next row


“Comply with SB”
copied item 1
copied item 2
copied item 3
etc.



"Header 3" Section will be pushed down as new row added in section above.




Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
    If Target.Column = 1 Then
        Range("C" & Rows.Count).End(xlUp).Offset(1).Value = Target.Value
    End If
End Sub

Thanks a lot.
Izet
 
Upvote 0

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Hi Peter,

This code is exactly what I'm after. Thank you!

I'm keen that the list starts on row 6 [K6] rather than row 2 [K2].

Could you please let me know how to change the code to cater for this.

Many thanks.
 
Upvote 0
Hi Peter,

This code is exactly what I'm after. Thank you!

I'm keen that the list starts on row 6 [K6] rather than row 2 [K2].

Could you please let me know how to change the code to cater for this.

Many thanks.
Welcome to the MrExcel board!
I have posted at least 4 sets of code (+ some modifications) in this thread. I have no idea which one you are referring to.
Perhaps you could clarify that and explain a little bit about just what you have, where, and what you are trying to achieve?
 
Upvote 0

Forum statistics

Threads
1,216,075
Messages
6,128,657
Members
449,462
Latest member
Chislobog

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