Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Merging worksheets together
I am trying to merge two worksheets together.
my first page has customer names,address,phone number, city, country. The second page has each person's order they have made. What i want to do is. On page one, if i double click John Doe, I want all of the orders he has made to pop up. Instead of opening up two seperate forms each time!. I hope this makes sense |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Merging worksheets together
This is best implimented by adding a button to the toolbar to activate a
regular macro. Select a cells on sheet one and run macro. the macro performs a copy of all rows that have the customer name in Column A. After the macro is run all you have to do is do a paste where you want the rows the data to be placed. Sub findcustomer() CustomerName = ActiveCell First = True With Sheets("Sheet2") LastRow = .Cells(Rows.Count, "A").End(xlUp).Row For RowCount = 1 To LastRow If .Range("A" & RowCount) = CustomerName Then If First = True Then Set SelectRows = .Rows(RowCount) First = False Else Set SelectRows = _ Application.Union(SelectRows, _ .Rows(RowCount)) End If End If Next RowCount End With SelectRows.Copy End Sub "sschwickrath" wrote: I am trying to merge two worksheets together. my first page has customer names,address,phone number, city, country. The second page has each person's order they have made. What i want to do is. On page one, if i double click John Doe, I want all of the orders he has made to pop up. Instead of opening up two seperate forms each time!. I hope this makes sense |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
merging worksheets | Excel Discussion (Misc queries) | |||
Merging worksheets into one | Excel Discussion (Misc queries) | |||
Merging worksheets into one | Excel Worksheet Functions | |||
Merging of Worksheets | Excel Discussion (Misc queries) | |||
Merging worksheets | Excel Worksheet Functions |