Button next to each item in price list to copy row over

NVRensburg

Board Regular
Joined
Jul 1, 2014
Messages
100
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hi my fave excel helpers :)

I have an excel spreadsheet which is a price list. There are about 1200 pages in it so what I want to do is add a button next to each row that when I go through the list and I find what I want, I want to click the button next to the item and it will add it to my quote sheet which will be a separate sheet in the workbook. Does anyone know how to do this?
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Hi
Put something like this in the buttoncode, changing the destination range to suit
Code:
Private Sub CommandButton1_Click()

    Rows(2).Copy Destination:=Sheets("Quote").Range("A" & Rows.Count).End(xlUp).Offset(1, 0)

End Sub
Also changing the Row number for each button
 
Upvote 0
Try This:</SPAN>
Right Click on your sheet tab</SPAN>
Choose View code</SPAN>
Paste the below code:</SPAN>
Now any time you select a cell in column "A" your script will copy that row into "Sheet2"</SPAN>
To insure this action only happens when you want it. You must enter "Yes" into cell "B1"</SPAN>
Just once before you start the script.
You can modify the script if necessary</SPAN>
For example change sheet name or "Yes" can be put in some other cell.</SPAN>
This will keep you from making 2,000 buttons.</SPAN>
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 1 Then
If Range("B1") = "Yes" Then
Rows(ActiveCell.Row).Copy Destination:=Sheets("Sheet2").Range("A" & Rows.Count).End(xlUp).Offset(1, 0)
End If
End If
End Sub
 
Upvote 0

Forum statistics

Threads
1,215,054
Messages
6,122,897
Members
449,097
Latest member
dbomb1414

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