![]() |
How to copy data from certain cell in one tab to another tab
I am wanting to set up a worksheet so a user can click a check box (or
whatever the best method would be) and copy that row to another worksheet in the workbook (or another workbook) in the next cell down each time it is checked. i.e. ()A B C 1 2 3 checking the box would copy 1 2 3 to the worksheet/workbook of choice in the next empty row. Thanks |
How to copy data from certain cell in one tab to another tab
One method.........double-click event code on any cell in the row.
Private Sub Worksheet_BeforeDoubleClick(ByVal Target _ As Range, Cancel As Boolean) Dim rng1 As Range Dim rng2 As Range Set rng1 = Target.EntireRow Set rng2 = Worksheets("Sheet2").Cells(Rows.Count, 1).End(xlUp) _ .Offset(1, 0) rng1.Copy Destination:=rng2 Cancel = True End Sub Or a macro assigned to a button. Sub copy_to_sheet() Dim rng1 As Range Dim rng2 As Range Set rng1 = ActiveCell.EntireRow Set rng2 = Worksheets("Sheet2").Cells(Rows.Count, 1).End(xlUp) _ .Offset(1, 0) rng1.Copy Destination:=rng2 End Sub Gord Dibben MS Excel MVP On Wed, 9 Dec 2009 14:33:12 -0800, Cent100 wrote: I am wanting to set up a worksheet so a user can click a check box (or whatever the best method would be) and copy that row to another worksheet in the workbook (or another workbook) in the next cell down each time it is checked. i.e. ()A B C 1 2 3 checking the box would copy 1 2 3 to the worksheet/workbook of choice in the next empty row. Thanks |
All times are GMT +1. The time now is 01:55 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com