Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sort info. in other file?

Status
Not open for further replies.

lidehall

Programmer
Feb 11, 2004
34
SE
Hello everybody!

I have a problem that I would be delighted if someone could help me to solve.

I have a program that generates an amount of rawdata transfered into a excel file. I have made a excel template which I cut the raw data into. Now, I have to sort the data according to names of the company and then copy into the template, where it in help of some formulas generate a invoice. Is there by any chans a way of making a function of any kind in my template were I can write what to sort by in another excel doc. and then automatically paste it into the template?

Many thanks
L.
 
I Have a excel doc. which consists of data. One column for names, one for company, one for consumed services etc. My template uses this data to produce a invoice. Every time I want to send a invoice to my customers I have to copy each name within the company with names etc with the consumed servises corresponding and then paste it into the template. My question is can I make I form in which I write which doc to search in and what, and make the function copy the data into the template?
 
From your Invoice Template you can use MS Query to return data for one customer/invoice in the Data workbook. Would you like to go that route?

faq68-4223 Mail Merge in Excel has some tips that are applicable. the wsData sheet could be the sheet that returns the query data. wsForm could be your invoice.

Skip,

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
Yes!
But I don't know how.
I would appreciate if you could guide me a bit.
Many thanks!

L.H DC
 
In a separate sheet --

Data/Get External Data -- select Excel Files and then search for your data excel file.

I assume that your Data table has headings and is contiguous.

Select the entire table to the right >

Next/Next to Finish to return data to excel

Now you should see the entire table of data

NOW turn on the macro recorder -- Tools/Macro/Record -- give it the name "QueryMyData"

With the macro recorder on...

Edit/Get External data -- Edit Query --
Next/Next to Finish to return data to excel

Turn OFF the macro recorder

alt+F11 to view the VB Editor

Copy the QueryMyData code and post for further help.

Skip,

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top