Hello everyone, newcomer here.
I am in need of two macros, that do the following tasks. Mini-sheet code posted at the end of the post.
Macro 1
In a Desktop folder named Delivery, the macro:
a) Creates a folder named after the Today() function (cell FORMULAS!H2)
b) Inside DATE folder it creates a subfolder named after the City of the assignment is at (cell FORMULAS!A5)
c) Inside CITY folder it creates a subfolder named after the address of the assignment (cell FORMULAS!A20)
Based on the provided sheet, the end result would look something like this:
C:\Users\user\Desktop\Delivery\Date \City \Address
C:\Users\user\Desktop\Delivery\14 05 2021\Larisa\Petropoulou 10
I review about 20-40 assignments from 11 cities daily, so this means that:
a) The macro works on every reviewed assignment individually, not on a range
b) The date folder will -of course- be created once
c) The addresses must reside in their respective city folders, so any City duplicates should be avoided.
Macro 2
For the second part, I want a macro that copies the range FORMULAS!A53:I54, creates a new STATION.xlsx file and saves in the respective folder I am reviewing. e.g.:
C:\Users\user\Desktop\Delivery\Date \City \Address \*.xlsx
C:\Users\user\Desktop\Delivery\14 05 2021\Larisa\Petropoulou 10\Station.xlsx
Any help would be greatly appreciated.
Cheers!
Formulas Sheet
Overview Sheet
I am in need of two macros, that do the following tasks. Mini-sheet code posted at the end of the post.
Macro 1
In a Desktop folder named Delivery, the macro:
a) Creates a folder named after the Today() function (cell FORMULAS!H2)
b) Inside DATE folder it creates a subfolder named after the City of the assignment is at (cell FORMULAS!A5)
c) Inside CITY folder it creates a subfolder named after the address of the assignment (cell FORMULAS!A20)
Based on the provided sheet, the end result would look something like this:
C:\Users\user\Desktop\Delivery\Date \City \Address
C:\Users\user\Desktop\Delivery\14 05 2021\Larisa\Petropoulou 10
I review about 20-40 assignments from 11 cities daily, so this means that:
a) The macro works on every reviewed assignment individually, not on a range
b) The date folder will -of course- be created once
c) The addresses must reside in their respective city folders, so any City duplicates should be avoided.
Macro 2
For the second part, I want a macro that copies the range FORMULAS!A53:I54, creates a new STATION.xlsx file and saves in the respective folder I am reviewing. e.g.:
C:\Users\user\Desktop\Delivery\Date \City \Address \*.xlsx
C:\Users\user\Desktop\Delivery\14 05 2021\Larisa\Petropoulou 10\Station.xlsx
Any help would be greatly appreciated.
Cheers!
Formulas Sheet
SL_THESS - Copy.xlsm | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | |||
1 | CP | JA | ΔΠ | ΗΜ/ΝΙΑ ΚΑΤΑΣΚΕΥΗΣ | ΜΗΝΑΣ | ΕΤΟΣ | SERVICE LINE- MOD | |||||
2 | CP38729 | JA-21-033196 | ΔΠ-210009 | 31/8/2021 | 08 | 21 | CP | CP38729 | ||||
3 | ΚΩΔΙΚΟΣ ΠΑΡΟΧΗΣ | 032-03-S-CP38729 | ||||||||||
4 | ΠΟΛΗ | ΤΛ | OS | OS | ΤΛ | ΚΩΔΙΚΟΣ ΑΡΧΕΙΟΥ | 03B890311-CP38729 | |||||
5 | ΛΑΡΙΣΑ | ΛΑΡΙΣΑΣ | LARISA | LAR | Τομέας Λειτουργίας 03 | ΣΤΟΝ Τ.Λ. 03 ΛΑΡΙΣΑΣ | ΑΡΙΘΜ. ΣΧΕΔΙΟΥ | LAR.LP-GP/063-03-B-8903-CP38729/08.21 | ||||
6 | ΟΝΟΜΑΣΙΑ ΑΡΧΕΙΟΥ | 03B890311-CP38729.DWG | ||||||||||
7 | ΤΛ | |||||||||||
8 | DISTRIBUTION NETWORKS AND SERVICE LINES AT O.S. 03 OF LARISA | UR | ||||||||||
9 | CP | CP38729 | ||||||||||
10 | ΚΩΔΙΚΟΣ ΔΙΚΤΥΟΥ | ΔΙΑΤΟΜΗ | Τ.Λ. | BRANCH/LOOP | ΚΩΔΙΚΟΣ | ΕΠΕΚΤΑΣΗ | ΚΩΔΙΚΟΣ ΠΑΡΟΧΗΣ | 032-03-R-CP38729 | ||||
11 | 063-03-B-8903 | 063 | 03 | B | 8903 | ΚΩΔΙΚΟΣ ΑΡΧΕΙΟΥ | 03B890311-CP38729-UR | |||||
12 | ΑΡΙΘΜ. ΣΧΕΔΙΟΥ | LAR.LP-GP/063-03-B-8903-CP38729-UR/08.21 | ||||||||||
13 | ΚΩΔΙΚΟΣ ΑΓΩΓΟΥ | ΟΝΟΜΑΣΙΑ ΑΡΧΕΙΟΥ | MOD | ΟΝΟΜΑΣΙΑ ΑΡΧΕΙΟΥ | 03B890311-CP38729-UR.DWG | |||||||
14 | 03B890311 | 03B890311.DWG | 0 | 0 | ||||||||
15 | ||||||||||||
16 | PRESSURE | ΤΥΠΟΣ | ΔΙΑΤΟΜΗ SL | |||||||||
17 | LP | GP | 0 | Φ32 | 032 | |||||||
18 | ||||||||||||
19 | ΔΙΕΥΘΥΝΣΗ | ΟΝΟΜΑ | ΑΡΙΘΜΟΣ | SPIN NUM | ||||||||
20 | ΠΕΤΡΟΠΟΥΛΟΥ 10 | ΠΕΤΡΟΠΟΥΛΟΥ | 10 | 1 | ||||||||
21 | ||||||||||||
22 | ΟΔΟΣ ΠΕΤΡΟΠΟΥΛΟΥ | ΔΙΑΤΟΜΗ SL | TODAY | |||||||||
23 | ΟΡΙΖΟΝΤΙΟΓΡΑΦΙΑ ΣΤΗΝ ΟΔΟ ΠΕΤΡΟΠΟΥΛΟΥ | 0 | Φ32 | 032 | 14/5/2022 | |||||||
24 | 10 | PETROPOULOU | ||||||||||
25 | GROUND PLAN OF 10 PETROPOULOU STREET | |||||||||||
26 | ||||||||||||
27 | ||||||||||||
28 | ΔΙΑΤΟΜΗ ΠΑΡΟΧΗΣ | ΜΗΚΟΣ | ΜΗΚΟΣ ΑΓΩΓΟΥ | ΔΙΑΤΟΜΗ ΠΑΡΟΧΗΣ | ΜΗΚΟΣ | ΜΗΚΟΣ ΑΓΩΓΟΥ | ||||||
29 | Φ32 | 7.30 | Φ32 L=7.30m | Φ32 | 5.36 | Φ32 L=5.36m | ||||||
30 | ||||||||||||
31 | X, Y SPLITTER | |||||||||||
32 | X = 362493.433 Y = 4387086.249 | |||||||||||
33 | 362493.433 | 4387086.249 | ||||||||||
34 | ||||||||||||
35 | SL | UR | ||||||||||
36 | BLOCKNAME | TEXT | BLOCKNAME | TEXT | ||||||||
37 | STREET_NAME | ΠΕΤΡΟΠΟΥΛΟΥ | STREET_NAME | ΠΕΤΡΟΠΟΥΛΟΥ 10 | ||||||||
38 | T.L. | Τομέας Λειτουργίας 03 | T.L. | Τομέας Λειτουργίας 03 | ||||||||
39 | DATE_SMALL | 31/8/2021 | DATE_SMALL | 31/8/2021 | ||||||||
40 | DATE_LARGE | 31/8/2021 | DATE_LARGE | 31/8/2021 | ||||||||
41 | JOB_ASSIGNMENT | JA-21-033196 | JOB_ASSIGNMENT | 0 | ||||||||
42 | CONNECTION_POINT | CP38729 | CONNECTION_POINT | CP38729 | ||||||||
43 | CONTRACT | ΔΠ-210009 | CONTRACT | ΔΠ-210009 | ||||||||
44 | PIPE32_LENGTH | Φ32 L=7.30m | PIPE32_LENGTH | Φ32 L=5.36m | ||||||||
45 | PROJECT_GR | ΣΤΟΝ Τ.Λ. 03 ΛΑΡΙΣΑΣ | PROJECT_GR | ΣΤΟΝ Τ.Λ. 03 ΛΑΡΙΣΑΣ | ||||||||
46 | PROJECT_ENG | DISTRIBUTION NETWORKS AND SERVICE LINES AT O.S. 03 OF LARISA | PROJECT_ENG | DISTRIBUTION NETWORKS AND SERVICE LINES AT O.S. 03 OF LARISA | ||||||||
47 | G.P. GR | ΟΡΙΖΟΝΤΙΟΓΡΑΦΙΑ ΣΤΗΝ ΟΔΟ ΠΕΤΡΟΠΟΥΛΟΥ | G.P. GR | ΟΡΙΖΟΝΤΙΟΓΡΑΦΙΑ ΣΤΗΝ ΟΔΟ ΠΕΤΡΟΠΟΥΛΟΥ | ||||||||
48 | G.P. ENG | GROUND PLAN OF 10 PETROPOULOU STREET | G.P. ENG | GROUND PLAN OF 10 PETROPOULOU STREET | ||||||||
49 | AS BUILIT No | LAR.LP-GP/063-03-B-8903-CP38729/08.21 | AS BUILIT No | LAR.LP-GP/063-03-B-8903-CP38729-UR/08.21 | ||||||||
50 | FILE NAME | 03B890311-CP38729.DWG | FILE NAME | 03B890311-CP38729-UR.DWG | ||||||||
51 | ||||||||||||
52 | ||||||||||||
53 | A\A | ΣΤΑΣΗ | Χ | Υ | H | ΟΔΟΣ | Τ.Λ | ΚΩΔ. ΣΧΕΔΙΟΥ | ΠΟΛΗ | |||
54 | 1 | S1 | 362493.433 | 4387086.249 | 78.50 | ΠΕΤΡΟΠΟΥΛΟΥ 10 | 03 | 03B890311-CP38729.DWG | ΛΑΡΙΣΑ | |||
FORMULAS |
Cell Formulas | ||
---|---|---|
Range | Formula | |
H23 | H23 | =TODAY() |
Cells with Data Validation | ||
---|---|---|
Cell | Allow | Criteria |
A17:A18 | List | =LISTS!$I$2:$I$3 |
Overview Sheet
SL_THESS - Copy.xlsm | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | |||
1 | ||||||||||||||||||||
2 | Αναζήτηση | Επόμενη καταχώρηση | ||||||||||||||||||
3 | 4 | UNDERGROUND RISER | ||||||||||||||||||
4 | ||||||||||||||||||||
5 | Ημ/νία κατασκευής | |||||||||||||||||||
6 | 31/8/2021 | |||||||||||||||||||
7 | Πόλη | Διεύθυνση | Αριθμός | Split No | CP | JA | ΜΗΚΟΣ ΑΓΩΓΟΥ | Διατομή | ||||||||||||
8 | ΛΑΡΙΣΑ | ΠΕΤΡΟΠΟΥΛΟΥ | 10 | 1 | CP38729 | 5.36 | Φ32 | |||||||||||||
9 | CP | Διατομή | Διατομή | Διατομή | ||||||||||||||||
10 | CP38729 | Φ32 | 03B890311-CP38729-UR.DWG | LAR.LP-GP/063-03-B-8903-CP38729-UR/08.21 | ||||||||||||||||
11 | JA | ΔΠ | ||||||||||||||||||
12 | JA-21-033196 | ΔΠ-210009 | ||||||||||||||||||
13 | Τ.Λ. | |||||||||||||||||||
14 | Τομέας Λειτουργίας 03 | ΣΤΟΝ Τ.Λ. 03 ΛΑΡΙΣΑΣ | ||||||||||||||||||
15 | Κωδικός παροχής | Κωδικός αγωγού | Κωδικός αρχείου | |||||||||||||||||
16 | 032-03-S-CP38729 | 063-03-B-8903 | 03B890311-CP38729 | |||||||||||||||||
17 | Κωδικός έργου | Όνομα αρχείου | ||||||||||||||||||
18 | LAR.LP-GP/063-03-B-8903-CP38729/08.21 | 03B890311-CP38729.DWG | ||||||||||||||||||
19 | ||||||||||||||||||||
20 | COPY - PASTE X,Y ΑΠΌ COMMAND LINE ΤΟΥ AYTOCAD | |||||||||||||||||||
21 | X = 362493.433 Y = 4387086.249 | |||||||||||||||||||
22 | A/A | ΣΤΑΣΗ | ||||||||||||||||||
23 | 1 | S1 | ||||||||||||||||||
24 | Χ | Υ | Υ | |||||||||||||||||
25 | 362493.433 | 4387086.249 | 78.50 | |||||||||||||||||
26 | Οδός | |||||||||||||||||||
27 | ΠΕΤΡΟΠΟΥΛΟΥ 10 | |||||||||||||||||||
28 | Τ.Λ. | Πόλη | ||||||||||||||||||
29 | 03 | ΛΑΡΙΣΑ | ||||||||||||||||||
30 | Όνομα αρχείου | |||||||||||||||||||
31 | 03B890311-CP38729.DWG | |||||||||||||||||||
32 | ||||||||||||||||||||
OVERVIEW |
Cell Formulas | ||
---|---|---|
Range | Formula | |
D3 | D3 | =LISTS!AS2 |
B6 | B6 | =LISTS!AW2 |
B8 | B8 | =FORMULAS!A5 |
D8 | D8 | =FORMULAS!B20 |
F8:G8 | F8 | =FORMULAS!C20 |
L8 | L8 | =FORMULAS!I2 |
P8 | P8 | =FORMULAS!E23 |
B10 | B10 | =FORMULAS!I2 |
D10 | D10 | =FORMULAS!E17 |
L10 | L10 | =FORMULAS!E50 |
N10 | N10 | =FORMULAS!$I$12 |
B12 | B12 | =FORMULAS!B2 |
D12 | D12 | =FORMULAS!C2 |
B14 | B14 | =FORMULAS!E5 |
D14 | D14 | =FORMULAS!F5 |
B16,B18 | B16 | =FORMULAS!I3 |
D16 | D16 | =FORMULAS!A11 |
F16,F18 | F16 | =FORMULAS!I4 |
B23 | B23 | =FORMULAS!$A$54 |
C23 | C23 | =FORMULAS!$B$54 |
B25 | B25 | =FORMULAS!$C$54 |
C25 | C25 | =FORMULAS!$D$54 |
B27 | B27 | =FORMULAS!$F$54 |
B29 | B29 | =FORMULAS!$G$54 |
C29 | C29 | =FORMULAS!$I$54 |
B31 | B31 | =FORMULAS!$H$54 |
Cells with Conditional Formatting | ||||
---|---|---|---|---|
Cell | Condition | Cell Format | Stop If True | |
D8 | Expression | =ISERROR(FORMULAS!$B$20) | text | NO |
F8 | Expression | =ISERROR(FORMULAS!$C$20) | text | NO |