Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
merging worksheets thebaldsoprano Excel Discussion (Misc queries) 3 February 24th 07 11:25 PM
Merging worksheets into one Edward Owen Excel Discussion (Misc queries) 9 May 18th 06 02:45 PM
Merging worksheets into one Edward Owen Excel Worksheet Functions 2 May 17th 06 06:50 PM
Merging of Worksheets David Smithz Excel Discussion (Misc queries) 1 March 6th 06 06:51 PM
Merging worksheets Tobal Excel Worksheet Functions 1 November 14th 05 06:12 PM


All times are GMT +1. The time now is 11:34 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"