Excel button on each row

argonx

New Member
Joined
Feb 12, 2016
Messages
7
Greetings,

I try to find a way to make buttons that will copy row content to other worksheet in same file to different cells when I press on "COPY"
The button should be cell and dynamic because of large number of rows (more than 3000)

Here is example
mMxhoxc.png


[TABLE="width: 401"]
<tbody>[TR]
[/TR]
[TR]
[/TR]
[TR]
[TD][/TD]
[TD="class: xl64, align: left"][/TD]
[/TR]
[TR]
[TD][/TD]
[TD="class: xl64, align: left"][/TD]
[/TR]
[TR]
[TD][/TD]
[TD="class: xl64, align: left"][/TD]
[/TR]
</tbody>[/TABLE]

[TABLE="width: 401"]
<tbody>[TR]
[/TR]
</tbody>[/TABLE]


 
Your code shows that you want
Double click on a cell
Take Columns B, C & D from that row
Move them of C5, C6 and C7 of Result sheet

Is that what you want or do you want?

Move them to after the last filled in cells of Column C of Result sheet
 
Upvote 0

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Your code shows that you want
Double click on a cell
Take Columns B, C & D from that row
Move them of C5, C6 and C7 of Result sheet

Is that what you want or do you want?

Move them to after the last filled in cells of Column C of Result sheet

Yes, that's right, if You can show me code example for 2 cells I will make ti for others?
 
Upvote 0
You could put this in the code module for the sheet "Start"
Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
    If Target.Column <= 4 Then
        Cancel = True
        With Sheets("Result")
            .Range("C5").Value = Target.EntireRow.Cells("B1").Value
            .Range("C6").Value = Target.EntireRow.Cells("C1").Value
            .Range("C7").Value = Target.EntireRow.Cells("D1").Value
        End With
    End If
End Sub
 
Last edited:
Upvote 0

Forum statistics

Threads
1,225,605
Messages
6,185,947
Members
453,333
Latest member
BioCoder84

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