| View previous topic :: View next topic |
| Author |
Message |
rgebap Newbie

Joined: 28 Mar 2012 Posts: 4
|
Posted: Wed Mar 28, 2012 5:29 am Post subject: Macro to search another document |
|
|
Hi first post here,
The company I work for currently hand types in every address for every packing slip and invoice. I was hoping to create one calc file that keeps all the information for each of our customers (addresses and what not). Then create a template that will allow you to search the customer contact information file (through a macro) and populate the fields in a packing slip and invoice based on the search. Or if it is a new customer, allow them to enter the information manually and with a macro create a new entry into the customer contact information file so it can be searched next time they order.
I am a real beginner at macros and would love some help. Maybe just an example of something like this and I would be able to go from there.
Thanks,
Rob |
|
| Back to top |
|
 |
Villeroy Super User


Joined: 04 Oct 2004 Posts: 10065 Location: Germany
|
Posted: Wed Mar 28, 2012 6:38 am Post subject: |
|
|
It is extremely silly to do this in a spreadsheet. Each and every business software would always use some database software for this.
But even if somebody/something forces you to use calculator sheets as a primitive database surrogate, there is no need to write any macros in order to look up records from another sheet.
VLOOKUP tutorial
You should always store everything in one spreadsheet document. Simply copy the data you get from elsewhere into your single document.
If somebody/something forces you to work with references across documents:
[Tutorial] External Links In Calc
Writing amateur macros to emulate a database in a spreadsheet is by far more complex, error prone and laborious. _________________ Rest in peace, oooforum.org
Get help on http://forum.openoffice.org |
|
| Back to top |
|
 |
rgebap Newbie

Joined: 28 Mar 2012 Posts: 4
|
Posted: Wed Mar 28, 2012 9:20 am Post subject: Thanks |
|
|
Thanks Villeroy,
I actually found that using a combination of vlookup and external links to be my best option. I will also look into migrating our customer contacts into Base. You have been very helpful.
-Rob |
|
| Back to top |
|
 |
|