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?
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
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?
That is not entirely clear to me.

1. If I double click, say, A10, can you detail exactly what cells would get copied to where?

2. Then if I next double clicked A5, can you detail exactly what cells would get copied to where?
 
Upvote 0
Peter,
Column K will be the destination..So if i double click on A10 the data in A10(digit numbers) will go to K1...then A5 will be in K2 ...any cell I do double click in coumn A it will go trough to column K in last cell.
Thanks a lot
 
Upvote 0
Peter,
Column K will be the destination..So if i double click on A10 the data in A10(digit numbers) will go to K1...then A5 will be in K2 ...any cell I do double click in coumn A it will go trough to column K in last cell.
Thanks a lot
If column K starts off empty, then this will actually start the list in K2 then go down. If that is a problem post back and the code can be tweaked to start in row 1. I left it like this because the code was a bit simpler and I thought you might be having a heading in K1 anyway?

If you need help with the code implementation, post back.

<font face=Courier New><SPAN style="color:#00007F">Private</SPAN> <SPAN style="color:#00007F">Sub</SPAN> Worksheet_BeforeDoubleClick(<SPAN style="color:#00007F">ByVal</SPAN> Target <SPAN style="color:#00007F">As</SPAN> Range, Cancel <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Boolean</SPAN>)<br>    <SPAN style="color:#00007F">If</SPAN> Target.Column = 1 <SPAN style="color:#00007F">Then</SPAN><br>        Range("K" & Rows.Count).End(xlUp).Offset(1).Value = Target.Value<br>    <SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">If</SPAN><br><SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN><br><br><br></FONT>
 
Upvote 0
Is it possible to make the cell with highlight (red) after double click on it.
Many thanks Peter..
More Power !!
 
Last edited:
Upvote 0
Is it possible to make the cell with highlight (red) after double click on it.
Many thanks Peter..
More Power !!
Sure, just add the code below in a new line just before the 'End If' line
Code:
Target.Interior.ColorIndex = 3
 
Upvote 0
Peter actually column K has the staff ID numbers and i had put into column L VLOOKUP formulas...so what if i remove those formulas and when double click from column A the next cell which names located column B will copy also into column L in same line...is it possible?
 
Upvote 0
Try this change
Code:
Range("K" & Rows.Count).End(xlUp).Offset(1).Resize(, 2).Value = Target.Resize(, 2).Value
 
Upvote 0

Forum statistics

Threads
1,216,075
Messages
6,128,660
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