Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
copying specific rows to an existing sheet, based on user paramete
Hi everyone,
I have a master sheet ("Master Sheet") containing rows of data. Each row has a specific date. I want the system to select a month (1-12) from a drop-down list, and click continue. On click, I want the system to copy all rows matching the month value selected by the user, to an existing worksheet ("sheet 5") can anyone help me out on this? -- Carlee |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
copying specific rows to an existing sheet, based on user paramete
I had the drop down cell in cell D4 (Row 2 column 4). I also have column A
searcdhed for the value matching the drop down value starting in row 20. the code belows adds new rows to sheet5 after the rows that already exist. Sub worksheet_change(ByVal Target As Range) If Target.Row = 2 And Target.Column = 4 Then Sheet5RowCount = _ Sheets("sheet5").Cells(Rows.Count, 1).End(xlUp).Row + 1 'find last row in column A lastrow = Cells(Rows.Count, 1).End(xlUp).Row Set ColARange = Range(Cells(20, 1), Cells(lastrow, 1)) For Each cell In ColARange If cell = Target Then cell.EntireRow.Copy _ Destination:=Sheets("sheet5").Cells(Sheet5rowCount , 1) Sheet5rowCount = Sheet5rowCount + 1 End If Next cell End If End Sub "Carlee" wrote: Hi everyone, I have a master sheet ("Master Sheet") containing rows of data. Each row has a specific date. I want the system to select a month (1-12) from a drop-down list, and click continue. On click, I want the system to copy all rows matching the month value selected by the user, to an existing worksheet ("sheet 5") can anyone help me out on this? -- Carlee |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
copy rows to new sheet based on specific cell value | Excel Worksheet Functions | |||
Creating a new sheet from specific data in existing sheet | Excel Discussion (Misc queries) | |||
need help please inserting multiple rows based on cell value then copying to data sheet | Excel Worksheet Functions | |||
Copying specific rows | Excel Worksheet Functions | |||
Copying specific rows from one sheet to another | Excel Programming |