Example Procedure Log - clkimmel.com · Example Procedure Log From City of Raleigh Detailed...
Transcript of Example Procedure Log - clkimmel.com · Example Procedure Log From City of Raleigh Detailed...
CLKIMMEL.COM
Example Procedure Log From City of Raleigh Detailed Intersection Project
Charles Lee Kimmel
3/27/2017
This is an example procedure log from my work on the “Detailed Intersection Project” with the City of Raleigh. I created this project after a need was expressed to me that the detailed intersection files were a mess and slowing down efficiency with the GIS staff. Below illustrates how to replicate the project on a click by click basis. It may be useful to apply the principles and thought processes to another project based on these instructions. This information is © 2017 clkimmel.com and City of Raleigh. DO NOT DUPLICATE OR SHARE WITHOUT EXPRESSED PREMISSION FROM AUTHOR OR CITY OF RALEIGH.
City of Raleigh Public Utilities GIS Capital City Improvements 1
Prepared by: Charles Lee Kimmel 2
Date: 1 /22/2017 3
Procedure log for the Detailed Intersection Project: 4
Brief background: The Raleigh PUGIS utilizes historical drawings referred to as detailed intersection 5
drawings (DID) of waterlines along roadways or more commonly road intersections. These historic 6
documents were archived in books and as microfilm. The drawings were later scanned by the 7
department for geocoding into ESRI ArcMap so the PUGIS team could utilize them to aid in the 8
development of the waterline feature class. 9
Problems: 10
The DID are not properly geocoded in ArcMap. Many of the points are scattered, overlap or do not 11
match their intersection. 12
The DID are utilized throughout the PU department and the GIS team and there are many duplicates 13
of these files which should be removed for consistency. 14
Organizational and naming convention issues are abundant with the files. It was discovered that the 15
scanned files are missing various pages from the books. In an attempt to fix this the microfilm 16
(previously thought to be complete) were scanned as well to complete the digital archive. It has also 17
been determined that each set is incomplete and can also contain multiple copies of files. There are 18
now two separate incomplete sets of DID files. Also within each set the filenames differ greatly 19
because the people scanning the files did not follow the same standard filename convention. 20
Efficiency for the GIS staff to utilize these files to aid in the modification or addition of waterline has 21
been degraded. 22
Tasks: 23
Locate all known DID files 24
Organize the files, remove and archive duplicate files (i.e. if one file is duplicated from the scans and 25
the microfilm then the microfilm will be archived into a folder named duplicates with (2).pdf added 26
the filename). 27
Standardize filenames: 28
o The files will be sorted alphabetically and evaluated for standard naming errors. 29
o All the files will be standardized with the correct road type 30
o Separators will be standardized to “ & “ 31
o Names of roads will be evaluated for correctness if they are unable to geocode 32
Geocode files: 33
o Files will be geocoded via a .csv by the QGIS MMQGIS geocoding plugin 34
o Develop new schema for the feature class 35
o Utilize Google to locate intersections 36
o Store filenames that could not be located in a notfound.csv file 37
o Manually add not found files via the ArcMap editor 38
o Double check precision of the QGIS geocode output in ArcMap 39
Final product 40
o Add the final geocoded feature class to the SDE 41
o Upload all files to the main network drive to final DID_Project folder 42
o Remove all previous DID files from the main network drive and send out an memorandum 43
order to remove old DID files from personal computers and network folders 44
Software Needed: 45
ArcGIS, MS Excel, Notepad++ (or any text editor that can block select), QGIS 46
-------------------------------------------------------Begin Procedure Log------------------------------------------------------- 47
Section 1: Locating files and Updating Filename Convention 48
Locate all DID files 49
Search and find all the detailed intersection files on the main network drive 50
The files should be divided into two types 51
Scanned files 52
Microfiche (microfilm) 53
Once located move them into */ directory for processing 54
Update files: Filenames must be updated and will currently appear as follows 55
Scanned files: This St @ That Rd 56
Micofilm files: THIS ST @ THAT RD 57
This will help distinguish between the two sets of files while updating names in the future. 58
Open command window (CMD): Right Click + Shift on the folder for the microfilm files and the command 59
window will appear. 60
In the command prompt type: dir /b > _list.txt 61
This will generate a list of the files in that folder 62
Repeat this step for the scanned folder 63
Open the folder for the microfilm files then open _list.txt into notepad++.exe 64
Erase any non-DID files that may exist (i.e. NOTADIDFILE.BAT) from _list.txt including _list.txt 65
Double Check that files already look like the above example: THIS ST @ THAT RD 66
If not press ctrl + A and right click on the selection and press uppercase to convert all the text 67
and then save 68
Open the folder for the scanned files then open _list.txt into notepad++.exe 69
Erase any non-DID files that may exist (i.e. notadidfile.bat) from _list.txt including _list.txt 70
Double Check that files already look like the above example: This St @ That Rd 71
If not press alt and block highlight all the letters of a word except the first letter and convert it to 72
upper or lowercase whichever is needed. After all names have been fixed then save. 73
*NOTE* this step should not be needed for the scanned files but this is listed just in case. 74
75
Create folders: Create a main folder named DID_Project 76
Create folders: Create subfolders in \DID_Project for each letter of the alphabet, duplicates, Micofilm 77
and Scanned 78
Move all files into either Scanned or Micofilm directory. 79
Create a new “_list.txt” for each the Scanned and Micofilm folder following previous steps 80
Open the included MS Excel template file with the VBA macros named “Rename_List_Macro.xlsm” or 81
create a new excel sheet and manually update records. Note the VBA code has been included at the end 82
of this document along with more instructions to create a new macro file. 83
Open the _list.txt file from each Scanned or Micofilm into NotePad and remove all non-DID filenames 84
from the list. 85
Past the original filenames into column A and B. Column C should have the following code for each 86
filename: =CONCATENATE("ren """,A#,""""," ","""",B#,"""") update the # for the appropriate row 87
number. 88
Run the standardizing macros for the Microfilm (MICROFICHE) and the macro for Scanned (ODID) 89
Here are a few examples of the following items that will be updated (for a complete list see VBA code): 90
@, at, &, and, or 91
To: 92
“ & “ 93
Rd, St, Blvd, Ct, Cir, Ln, etc 94
To: 95
Road, Street, Boulevard, Court, Circle and Lane 96
Copy column C to column D and paste as values only to remove the formula 97
Open command window (CMD): Right Click + Shift on the folder for the microfilm files and the command 98
window will appear. 99
Copy column D in excel and Right Click on the CMD window and select paste 100
This will rename all the files to the new names from Excel column B 101
Move and combine the scanned and microfilm files together into their appropriate letter subdirectory in 102
this order so the microfilm files will be the last ones added 103
Beginning with folder A: 104
Any duplicated files that are microfilm at this point will be prompted to be automatically named to 105
EXAMPLE (2).pdf and then should be moved to the duplicated folder. 106
Open command window (CMD): Right Click + Shift on the folder and the command window will appear. 107
In the command prompt type: dir /b > _list.txt 108
This will generate a list of the files in that folder 109
Repeat these steps for each letter subfolder 110
Now all files have been located and stored on the network drive under /DID_Project *(to be updated 111
when finished). 112
113
Section 2: Standardizing Filenames Further and Creating the .csv Geocoding Template 114
Open _list.txt from folder A into NotePad and remove all non-DID files. 115
Open MS Excel and name the default worksheet GEOCODE_A 116
Create the following column headers: 117
FID, ADDRESS, GEOCODING_C, LOCATED, GRID_TYPE, DUPLICATED, CITY, STATE, COUNTRY, HYPERLINK, CODE_L 118
Create another worksheet in excel named “WORKING” and add the following column headers: 119
FID, INTERSECTIONS, DUPLICATED, GEOCODE, ORIGINAL, NEW FILE 120
Copy the filenames from _list.txt into worksheet “WORKING” under column “INTERSECTIONS” and 121
column “ORIGINAL” 122
Examination of file names: 123
Highlight column “INTERSECTIONS” and select conditional formatting > highlight cell rules > duplicate 124
values 125
At this point if there are any duplicates in the column they will be highlighted red (although this should 126
not be the case at this time because you should have already been prompted for duplicates when 127
copying and combining the files to their subfolders). 128
Populate the FID field giving each file a unique number 129
Highlight the column “INTERSECTIONS” and press Ctrl + H 130
Find and Replace the following in brackets with what is in curly brackets in the following order (these are 131
case sensitive): [.PDF] {.pdf}, [ ] { }, [, ] { & }, [U.S. #1] {US 1}, [Gird] {GRID], [Stirp Map] {Strip Map} 132
Now manually examine the filenames for: 133
Spelling mistakes 134
Parenthesis that are broken 135
A common issue with the microfilm files can be that they do not have any road type indicator 136
after the road name so this has to be manually added 137
Any other issues that may prevent duplicate files for matching 138
As these issues are fixed the column should begin to highlight the new duplicated filenames 139
Once the entire list has been examined sort the column “INTERSECTIONS” by cell color and A-Z 140
Fill in the column “DUPLICATED”: 141
Any cell that is NOT highlighted = N 142
Any highlighted cell that is All Caps for microfilm = 2 143
Any highlighted cell that is Normal text for Scanned = Y 144
After this is complete sort by column “DUPLICATED” and highlight any cell in column “INTERSECTIONS” 145
that has a 2 in column “DUPLICATED” associated with it. 146
Find and Replace the following in brackets with what is in curly brackets (these are case 147
sensitive): [.pdf] { (2).pdf} 148
Copy column “INTERSECTIONS” to column “GEOCODE” here 149
Find and Replace the following in brackets with what is in curly brackets (these are case 150
sensitive): [ (Grid*] {}, [ (Strip*] {}, [ (Zone*] {} and [.pdf] {} 151
This will clear the cells of any information after the road names 152
Reopen: “Rename_List_Macro.xlsm” 153
Past column “ORIGINAL” into column “A” and column “INTERSECTIONS” into column “B” 154
Copy column “C” to column “D” and past as values only and then copy column “D” again 155
Open command window (CMD): Right Click + Shift on folder A and the command window will appear. 156
In the command prompt: Right click and select paste 157
This will now update all the names in folder A 158
Populate the worksheet GEOCODE_A: Copy from “WORKING” Sheet TO “GEOCODE_A” Sheet 159
FID = Give sequential numbers for each file name i.e 0 - 100 160
ADDRESS = Copy column “INTERSECTIONS” here 161
GEOCODING_C = Copy column “GEOCODE” here 162
LOCATED = Assign all cells to “M” 163
GRID_TYPE = Copy column “INTERSECTIONS” here this will be the type of drawing or grid number 164
Do a Find and Replace the following in brackets with what is in curly brackets (these are case 165
sensitive): [*(Grid] { GRID}, [*(Strip] { Strip}, [*(Zone] { Zone} and [).pdf] {} 166
DUPLICATED = Copy column “DUPLICATED” here 167
CITY = Raleigh 168 STATE = North Carolina 169 COUNTRY = USA 170 HYPERLINK = *\A\Example Road & This Street (Grid 000).pdf 171
The easiest way to generate this is to prefill the standard directory name in this column and 172
then concatenate. Enter =J2&A2 into cell L and copy the quick fill the formula down and copy 173
and paste values only into column “HYPERLINK” 174
CODE_L = The Letter of the Folder the drawings are from i.e. “A” 175
Save the file as GEOCODE_A.xlsx and another as GEOCODE_A.csv 176
Open QGIS 177
Import the MMQGIS PLUGIN 178
Open the MMQGIS PLUGIN and select GEOCODE > Geocode CSV with Google / OpenStreetMap 179
Geocode CSV with Google / OpenStreetMap Tool: To utilize this tool click Browse > find and select 180
GEOCODE_A.csv > then fill in the fields as follows: Address Field = GEOCODING_C, City Field = CITY, State 181
Field = STATE, Country Field = COUNTRY, Web Services = Google Maps Google API Key = (none). Output 182
Shapefile = “*\A\Shapefile\GEOCODE_A.shp” Not found Output List = “*\A\Shapefile\notfound.csv” See 183
Figure 1 for detailed layout of QGIS and Figure 2 for the geocoding tool. 184
QGIS will show the geocoding progress in the lower left corner of the window. Once this is complete two 185
output files will be generated. 1. A shapefile containing the newly geocoded points and 2. a comma 186
delimited values file (.csv) that will contain the intersections that could not be located. 187
188
Figure 1: QGIS program layout. A: is the location of the MMQGIS plugin that the geocoding tool is located. B: represents the 189 progress of the geocoding tool during processing. 190
191
192
Figure 2: Geocode CSV with Google / OpenStreetMap Tool. To utilize this tool select Browse for select GEOCODE_A.csv > 193 then fill in the fields as shown above. Address Field = GEOCODING_C, City Field = CITY, State Field = STATE, Country Field = 194
COUNTRY, Web Services = Google Maps Google API Key = (none). Output Shapefile = “*\A\Shapefile\GEOCODE_A.shp” Not 195 found Output List = “*\A\Shapefile\notfound.csv” 196
Press OK after all the fields have been filled in 197
QGIS will geocode all the files from the GEOCODING_C column 198
Open ArcGIS and add the newly generated GEOCODE_A.shp to the data view. 199
Update the symbology to make the points more visible 200
Open the attribute table 201
From the WAKE SDE add the following features: 202
WAKE.HYDRO_LINE 203 WAKE.PROPERTY 204 WAKE.RAILROAD 205 WAKE.STREET_ALL 206 WAKE.YE_OLE_TAX_GRID 207
From the RPUD SDE add the following features: 208
RPUD.wAbandonedLine 209 RPUD.wControlValve 210 RPUD.wFitting 211 RPUD.wHydrant 212 RPUD.wLateralLine 213 RPUD.ssManhole 214 RPUD.wNetworkStructure 215 RPUD.wPressureMain 216
Apply the appropriate symbology to each feature class (See Figure 3 for an example) 217
From ArcGIS services maps.raleighnc.gov add all the “ortho-images” to the data view 218
Begin an edit session on GEOCODE_A.shp 219
Select points from GEOCODE_A and the intersecting roads under that point 220
Check that the filename matches the intersecting road names 221
If they do then type Y into the “LOCATED” field for that feature 222
If not then 223
Open the pdf file that was not properly located and examine the names on the drawing for to 224
make sure there are no spelling errors in the filename and possible road realignments or name 225
changes. Utilize Google Maps to double check the road names and locations. Fix any errors 226
found and update all occurrences of the filename i.e. in all entries in ArcMap and the actual file. 227
To locate the correct intersection or roads from the previous step do the following 228
In ArcGIS Search by attribute WAKE.STREETS_ALL and enter the following 229
CARTONAME LIKE ‘%EXAMPLE 1%’ OR CARTONAME LIKE ‘%EXAMPLE 2%’ 230
DO NOT ENTER THE NAMES AS FOLLOWS: 231
CARTONAME LIKE ‘%EXAMPLE 1 ROAD%’ OR CARTONAME LIKE ‘%EXAMPLE 2 STREET%’ 232
The % symbol is a wildcard character this will allow the SQL query to look for any strings 233
associated with the name i.e. CARTONAME LIKE ‘%EXAMPLE 1%’ can return many possible 234
selections for example: EXAMPLE 1 ST, EXAMPLE 1 RD, EXAMPLE 1 BLVD, W EXAMPLE 1 ST, and 235
etc. Utilize this operation to narrow the search that most logically fits the intersection names. 236
If the correct intersection is located after searching move the point over the newly selected 237
intersection or location 238
If the intersection still could not be located then further analysis is needed either enter N into 239
the “LOCATED” field or try and locate the intersection through other historical documentation. 240
Follow these procedures to enter and double check all geocoded points. 241
Save edits 242
Open the *\notfound.csv file in Excel 243
Open Google Maps or utilize any files with historic road names 244
Analyze historic documents and Google Maps to locate any of the intersections in the notfound 245
file. 246
Select create feature and manually add the “notfound” intersections to the shapefile 247
Copy and paste the attributes from the “notfound.csv” file into the shapefile attribute table 248
Add all the “notfound” intersections manually until completed 249
Click save edits to finalize the changes NOTE: it is a good management practice to save edits 250
often to prevent data loss or degradation 251
All the steps from Section 2 need to be repeated for each subfolder (i.e. folders A, B, C, …, Z) until all the 252
files are properly geocoded. 253
254
Figure 3: ArcMap layout. This represents the general layout of ArcMap during this project. Note the symbology of roads and 255 DID points. The utilization of max and min visibility of RPUD features and the orthoimages was set to 1:20,000 which will 256 greatly boot map refresh performance. 257
258
Figure 4: Utilize the attribute table in quadrants. This will allow all the important feature attributes open to help locate 259 known and unknown intersections. 260
Detailed Intersection Drawing Project Workflow
Start
Locate all Scanned
files Microfilm files Are all DID
files located?
Yes
Are filenames in
a standardized
convention?
Are filenames
clear enough to
be geocoded?
Yes
Rename and organize
files to prepare for
geocoding
No
No
No
Do most the
files need to
be fixed?
Develop a VBA script
to automate the
standardization.
Manually fix the few
filename problems
Filenames have
been
standardized
Geocode files using QGIS
alphabetically output will
be GEOCODE_%.shp
Sort all
shapefiles
and insure
that they are
complete
Open ArcMap and QA/QC
that QGIS geocoded
correctly
Create directories for
letters A-Z and sort all files
in to their alphabetical
directory
Repeat process until A-Z
files have been geocoded
No
Yes
Begin an edit session and
manually correct errors or
add files that were not
located by QGIS geocoding
Key to Workflow
Start workflow
Prepare action
Decision
Multiple documents
Process
Termination point
MS Excel VBA Code:
This section will discuss the creation of VBA macros in MS Excel. To create new
macros in Excel open the visual basic editor. To do this select the file tab and then
click the options button (see figure 5).
Figure 5: Excel 2010 menu layout and location of macros button.
Then click Customize Ribbon and under “Customize the Ribbon:” select Developer
(see figure 6) and press OK.
Figure 6: Location of the Developer tab to access the visual basic editor.
Click on the visual basic button to open the editor window (figure 7).
Figure 7: Access the VBA editor in Excel.
Inside the project window right click and select Insert > Module (figure 8).
Figure 8: The visual basic editor in MS Excel.
Create 2 new modules and paste the Microfilm VB Code into module 1 and then
paste the Scanned Files VB Code into module 2.
Brief understanding of the code:
Columns("X:X").Select = Where X is any letter that represents the desired column Selection.Copy = This command copies the selected cells ActiveSheet.Paste = This will paste the clipboard into selected cells Application.CutCopyMode = False = prevents the data from being cut or deleted from copy Selection.Replace What:="X ", Replacement:="Y", LookAt:=xlPart, _
This command will replace X with Y in a selection. Copy this whole segment, change X and Y to the desired stings for search and replace. LookAt =xlPart is used to search for any part of the string. Use xlWhole to search the entire cell for matching cases.
SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ SearchOrder by rows searches across rows then down to the next row, by columns searches down columns then to the next column. MatchCase matches the case of the text being searched. Search format looks for a predefined format when searching. ReplaceFormat:=False = Replaces the format of a selected cell. Sub SOMENAME() = This defines the start of a script End Sub = This defines the end of a script The remaining code should be copied as typed here is no further understanding of VBA exists.
Microfilm VBA Macro Code:
Sub MICROFICHE() ' ' MICROFICHE Macro ' ' Columns("A:A").Select Selection.Copy Columns("B:B").Select ActiveSheet.Paste Application.CutCopyMode = False Columns("B:B").Select Selection.Replace What:=" @ ", Replacement:=" & ", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=". & ", Replacement:=" & ", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=". - ", Replacement:=" - ", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=". ", Replacement:=" & ", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=".,", Replacement:=" & ", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:="_", Replacement:=" ", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=" ST ", Replacement:=" STREET ", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=" AVE ", Replacement:=" AVENUE ", LookAt:=xlPart _ , SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=" BLVD ", Replacement:=" BOULEVARD ", LookAt:= _ xlPart, SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=" BLVD,", Replacement:=" BOULEVARD,", LookAt:= _ xlPart, SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False
Selection.Replace What:=" LN ", Replacement:=" LANE ", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=" PL ", Replacement:=" PLACE ", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=" RD ", Replacement:=" ROAD ", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=" TR ", Replacement:=" TRAIL ", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=" TRL ", Replacement:=" TRAIL ", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=" DR ", Replacement:=" DRIVE ", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=" CT ", Replacement:=" COURT ", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=" CIR ", Replacement:=" CIRCLE ", LookAt:=xlPart _ , SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=" PL ", Replacement:=" PLACE ", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=" ST.", Replacement:=" STREET.", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=" DR.", Replacement:=" DRIVE.", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=" LN.", Replacement:=" LANE.", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=" TR.", Replacement:=" TRAIL.", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False
Selection.Replace What:=" BLVD.", Replacement:=" BOULEVARD.", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=" PL.", Replacement:=" PLACE.", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=" AVE.", Replacement:=" AVENUE.", LookAt:=xlPart _ , SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=" CT.", Replacement:=" COURT.", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=" CIR.", Replacement:=" CIRCLE.", LookAt:=xlPart _ , SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=" RD.", Replacement:=" ROAD.", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=" DR.", Replacement:=" DRIVE.", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=", ", Replacement:=" & ", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Sheets("File_List_Working").Select Selection.Replace What:=" - ", Replacement:=" (GRID ", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=".pdf", Replacement:=").pdf", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Columns("C:C").Select Selection.Copy Columns("D:D").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False End Sub
Scanned Files VBA Macro Code:
Sub ODID() ' ' ODID Macro '
' Columns("A:A").Select Selection.Copy Columns("B:B").Select ActiveSheet.Paste Application.CutCopyMode = False Columns("B:B").Select Selection.Replace What:=" @ ", Replacement:=" & ", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=" Tr ", Replacement:=" Trail ", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=" Tr.", Replacement:=" Trail.", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=" Tr,", Replacement:=" Trail,", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=" Rd ", Replacement:=" Road ", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=" Dr ", Replacement:=" Drive ", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=" St ", Replacement:=" Street ", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=" Ave ", Replacement:=" Avenue ", LookAt:=xlPart _ , SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=" Ave, ", Replacement:=" Avenue, ", LookAt:=xlPart _ , SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=" Ln ", Replacement:=" Lane ", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=" Cir ", Replacement:=" Circle ", LookAt:=xlPart _ , SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=" Blvd ", Replacement:=" Boulevard ", LookAt:= _
xlPart, SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=" Blvd.", Replacement:=" Boulevard.", LookAt:= _ xlPart, SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=" Blvd,", Replacement:=" Boulevard,", LookAt:= _ xlPart, SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=" Tr ", Replacement:=" Trail ", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=" Trl ", Replacement:=" Trail ", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=" Rd.", Replacement:=" Road.", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=" Rd,", Replacement:=" Road,", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=" Dr,", Replacement:=" Drive,", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=" Ct,", Replacement:=" Court,", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=" Ct ", Replacement:=" Court ", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=" Cir,", Replacement:=" Circle,", LookAt:=xlPart _ , SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=" Ln,", Replacement:=" Lane,", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=" St,", Replacement:=" Street,", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=" Pl,", Replacement:=" Place,", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=" Pl ", Replacement:=" Place ", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=" Dr.", Replacement:=" Drive.", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=" Trl ", Replacement:=" Trail ", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:="_", Replacement:=" ", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=" @ ", Replacement:=" & ", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=". & ", Replacement:=" & ", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=". - ", Replacement:=" - ", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=". ", Replacement:=" & ", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=".,", Replacement:=" & ", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:=", ", Replacement:=" & ", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False Selection.Replace What:="_", Replacement:=" ", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=True, SearchFormat:=False, _ ReplaceFormat:=False ActiveWindow.ScrollColumn = 2 Columns("C:C").Select Selection.Copy Columns("D:D").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False End Sub