I have a shapefile with over 1000 features with three fields, x,y and one field has numbers and letters designating points e.g.
What I want to do is create another field that will keep the numbers and get rid of the letters. The reason for this is there is a database file I want to link this to that does not have x,y data. Any suggestions? Thanks in advance.
VBA string functions are pretty easy to use in ArcGIS, but they are very difficult to find in the ArcGIS help. Create a string variable in your attribute table (open the attribute table in your Map, click Options, select Add a Field and give the field a name (less than 8 characters), a data type (string) and a length (3) and click OK (the window closes and the field is created). Now RIGHT click on the new field and select Field Calculator. This will do an on-the-fly computation and put the results into this new field. In the VBA builder windows you can select MID (upper right frame) and it will be added to the lower frame. (Check that the new variable name is in the grey area just above the lower frame followed by an equals sign. This is the variable you will be calculating; you don't want to accidentally overwrite an existing attribute variable.) Now select the old variable name from the upper left frame (this puts the old variable into the parenthesis following the MID command. Now insert ,1,3 between the old variable and the closing parenthesis (to indicate you start at position 1 and take 3 characters) to get something like:
When you click OK, the new field should be filled by the computed value of the first 3 characters of the old variable.
Good luck. - Lilli