Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Automatically Populate Worksheet Depending on Team Name
On my first worksheet "Ws1" I have a table of data. Column A has Team Name
and Column B has Item Num. On worksheet 2 I have a blank worksheet "Ws2" that I would like to automatically populate with data from "Ws1" when a team is selected from a list box "LB1" and a button is clicked "VR1". I only want to select from 'Ws1" and display in "Ws2" those rows where the team name is equal to the team name selected in the listbox. "Ws2" has the same column headers. Thanks. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Automatically Populate Worksheet Depending on Team Name
Sub getteams()
teamname = Sheets("WS2").LB1.Value WS2RowCount = 2 With Sheets("Ws1") LastRow = .Range("A" & Rows.Count).End(xlUp).Row For WS1RowCount = 2 To LastRow If .Range("A" & WS1RowCount) = teamname Then .Rows(WS1RowCount).Copy _ Destination:=Sheets("WS2").Rows(WS2RowCount) WS2RowCount = WS2RowCount + 1 End If Next WS1RowCount End With End Sub "Qaspec" wrote: On my first worksheet "Ws1" I have a table of data. Column A has Team Name and Column B has Item Num. On worksheet 2 I have a blank worksheet "Ws2" that I would like to automatically populate with data from "Ws1" when a team is selected from a list box "LB1" and a button is clicked "VR1". I only want to select from 'Ws1" and display in "Ws2" those rows where the team name is equal to the team name selected in the listbox. "Ws2" has the same column headers. Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
automatically populate worksheet | Excel Worksheet Functions | |||
Automatically populate cells based on info in another worksheet | Excel Worksheet Functions | |||
Automatically Name Tabs from List on Worksheet Named Team | Excel Discussion (Misc queries) | |||
Team Role Rotation (number of team members is variable) | Excel Worksheet Functions | |||
Populate, Depending on Criteria | Excel Discussion (Misc queries) |