Hello frindes,
I work for a contracting company specialized in transporting employees from their homes to their company and vice versa. My daily routine is that I write all the employees? trips in a Word file, for example, (Trips Schedule on 1-5-2022) that contains all the employees? trips for this day, and when the day ends, I make invoices for these trips in excel files. Each invoice (which is an excel file for only one trip in this day), the invoice contains the names of the employees leaving to their homes, the names of the employees coming to company, the destination of the trip from where to where, and the type of trip, is it a one way (whether it is going or Return), a round trip or business trip called (full day), in addition to the value of the trip for which I found a specific code to make comes once all information has been added. The trip rates are inserted on different sheet calls (Trips Rate).
At the end of the day, I want a code to migrate the data of each trip a new Excel format invoice without the need to transfer trip data for each invoice separately.
I mean, the code enters the Word file containing the trips data and identifies the first trip, then copies the names of the outgoing employees in the first trip and creates an excel file (its design is the same as the design of the attached excel file) and puts it in the field of the outgoing employees in the excel invoice, then he identifies the names of the employees entering in the same trip and puts them in the field of the employees entering in the excel invoice, copy the date of the trip and the type of the trip. Then the excel file will automatically calculate the value of the trip using the code I made and then save the file which will be named (1.xlsx) (Which means the trip invoice No. 1) in a folder with the name of today's date (a folder named 1-5-2022).
Then the code enters again the Word file and identifies the second trip and copies the data I mentioned earlier in the second excel invoice which will be named (2.xlsx (trip invoice No. 2)) ... and it will be saved in the same folder (1-5-2022) because this folder is for today's trip invoices. And so on until the end of the day's trips table.
On the second day I will use (Trips Schedule on 2-5-2022) and run the code and give me all trips invoices on this day (1.xlsx, 2.xlsx, 3.xlsx ? etc) but they will be saved in another folder with the date of that day, which is 2-5-2022 ). And so on.
The attached image below will show the Main folder and sub folders used
Folders.gif
In the attachments the daily trip list exmple that shows the data of outgoing and incoming employees, regions and the type of trip.
Also in the attachments are a number of Excel invoices that I used.
1-5 Trips schedule.docx
1.xlsm
2.xlsm
3.xlsm
Bookmarks