I am working on a program for assigning ASHRAE room types and specific building code standards to rooms based on their room name.
My approach has been to create worksheets - one with my list of keyword strings, the ASHRAE standard and the room type and another spreadsheet with my actual room names on it and the cells I want the VBA to fill in.
Here's the Room Library sheet - Key word string list, ASHRAE standard corresponding room type.
Here's the sheet with my actual room names on it. The intent is to have a program that searches through the VENTILATION ZONE column for keywords and then assigns the ASHRAE Standard and Room type based on the string found.
I have some (very little) experience with VBA programming and want to use this as a learning opportunity. The trouble is I do not know the basics of doing keyword search and match based on multiple arrays. Can you offer a few hints or suggestions?
My approach has been to create worksheets - one with my list of keyword strings, the ASHRAE standard and the room type and another spreadsheet with my actual room names on it and the cells I want the VBA to fill in.
Here's the Room Library sheet - Key word string list, ASHRAE standard corresponding room type.
Key Word Strings | Ashrae Standard | Room type | |
1 | Alcove | ASHRAE 170 | Patient Corridor |
2 | Appointment | ASHRAE 170 | Examination room |
3 | Appt | ASHRAE 170 | Examination room |
4 | Breakroom | ASHRAE 62.1 | Breakrooms |
5 | Canteen | ASHRAE 62.1 | Cafeteria/fast-food dining |
6 | Classroom | ASHRAE 62.1 | Lecture Classroom |
7 | Communications | ASHRAE 62.1 | Office Space |
8 | Conference | ASHRAE 62.1 | Conference/meeting |
9 | Consult | ASHRAE 170 | Examination room |
10 | consultation | ASHRAE 170 | Examination room |
11 | Copy | ASHRAE 62.1 | Office Copy, printing rooms |
12 | Corridor | ASHRAE 170 | Patient Corridor |
13 | Cubicle | ASHRAE 62.1 | Office Space |
14 | Dock | ASHRAE 62.1 | SHIPPING/RECEIVING |
15 | Exam | ASHRAE 170 | Examination room |
16 | Hall | ASHRAE 170 | Patient Corridor |
17 | Kiosk | ASHRAE 62.1 | |
18 | Kitchenette, Lounge | ASHRAE 62.1 | Breakrooms |
19 | Lactation | ASHRAE 62.1 | Office Space |
20 | Locker | ASHRAE 62.1 | Locker for health care |
21 | Lounge | ASHRAE 62.1 | Breakrooms |
22 | ASHRAE 62.1 | Office Copy, printing rooms | |
23 | Mech | ASHRAE 62.1 | Not Regularly Occupied |
24 | Medical, Storage | ASHRAE 170 | Sterile Storage |
25 | Medication | ASHRAE 170 | Medication room |
26 | Nurse | ASHRAE 170 | Patient Corridor |
27 | Office | ASHRAE 62.1 | Office Space |
28 | Operations | ASHRAE 62.1 | Office Space |
29 | Procedure | ASHRAE 170 | Procedure Room (Class A Surgery) |
30 | Procedures | ASHRAE 170 | Procedure Room (Class A Surgery) |
31 | Reception | ASHRAE 62.1 | Reception areas |
32 | Secretary | ASHRAE 62.1 | Office Space |
Here's the sheet with my actual room names on it. The intent is to have a program that searches through the VENTILATION ZONE column for keywords and then assigns the ASHRAE Standard and Room type based on the string found.
| ASHRAE Standard | Space Use Category | |
0111 - EXAM, AUDIO BOOTH | |||
0112 - VENDING | |||
0113 - CANTEEN, PACT 3 | |||
0118 - LAB | |||
0119 - COMBINED HYGIENE OPERATORY | |||
0120 - MECH ROOM, DENTAL EQUIP | |||
0121 - SOILED SPD CART | |||
0124 - X-RAY | |||
0126 - DTR | |||
0134 - EXAM/CONSULT | |||
0136 - HEARING AID FITTING | |||
0137 - FITTING & IMMITANCE | |||
0333 - EXAM/CONSULT | |||
0334 - EXAM, AUDIO BOOTH | |||
0335 - EXAM, AUDIO BOOTH | |||
0336 - STORAGE, EQUIP | |||
0341 - STORAGE, INSTRUMENT | |||
0342 - COMBINED HYGIENE OPERATORY | |||
0343 - DTR | |||
0344 - DTR | |||
0345 - DTR | |||
0346 - WORKSTATION, DS | |||
0347 - STAFF LOUNGE | |||
0348 - OFFICE, DENTIST | |||
0349 - WORKSTATION, DS | |||
0350 - WORKSTATION, DS | |||
0351 - RECEPTION | |||
0352 - STORAGE, EQUIP | |||
0353 - TLT, STAFF | |||
0354 - TLT, PAT | |||
0355 - CONFERENCE | |||
0356 - OFFICE, FTE COMMUNITY | |||
0357 - OFFICE, OI&T | |||
0358 - CONFERENCE | |||
0359 - OFFICE, FTE COMMUNITY | |||
0360 - OFFICE, EDUCATOR | |||
0361 - ALCOVE, PRINTER | |||
0362 - OFFICE, EDUCATOR | |||
0363 - STORAGE, EDU MATERIAL | |||
0364 - CONFERENCE | |||
0365 - OFFICE, OI&T | |||
0366 - OFFICE, FMS | |||
0367 - OFFICE, FMS | |||
0368 - REPAIR SHOP, BIOMED | |||
0369 - EXAM | |||
0370 - EXAM, TRAINING | |||
0371 - UTILITY, CLEAN | |||
0372 - UTILITY, SOILED | |||
0373 - OPTICAL SHOP |
I have some (very little) experience with VBA programming and want to use this as a learning opportunity. The trouble is I do not know the basics of doing keyword search and match based on multiple arrays. Can you offer a few hints or suggestions?