Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / January 2007

Tip: Looking for answers? Try searching our database.

Merge data from one sheet to another and print

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Glenn - 17 Jan 2007 14:48 GMT
Hi,

I have a workbook that has two worksheets in it.

Worksheet A contains a list of names and phone numbers.

Worksheet B is a form that contains some static information and a need for
some of the info from Worksheet A.

I'd like to set it up so that I can push a button on worksheet A that will
read the data from Row 1 Merge it into Worksheet B and print it, go to Row
2, do the same thing, etc.

Any suggestions on how to do this?

Thanks,
Glenn
Ron de Bruin - 17 Jan 2007 16:27 GMT
Hi Glenn

Create Vlookup formulas in Worksheet B
Use for example the Name cell as lookup value (D1 in this example)

Then with the names in "Sheet1" in A1:A10 try this

Sub test()
   With Sheets("Sheet2") ' << worksheet B
       For Each cell In Sheets("Sheet1").Range("A1:A10")
           'D1 is the name cell in Sheet2
           .Range("D1").Value = cell.Value
           .PrintOut preview:=True
       Next cell
   End With
End Sub

Delete preview:=True when it is working like you want

Signature

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm

> Hi,
>
[quoted text clipped - 13 lines]
> Thanks,
> Glenn
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.