Hi all I am trying to do something like this, I have a database field that is zip codes I want to separate zip codes by state I have a text list like this already done
IF (ZIP GE 01000 AND ZIP LE 02699) ZIPC=1.
IF (ZIP GE 02700 AND ZIP LE 02999) ZIPC=2.
IF (ZIP GE 03000 AND ZIP LE 03499) ZIPC=3.
IF (ZIP GE 03800 AND ZIP LE 03999) ZIPC=3.
and at the end of the text lisrt is this
VALUE LABELS
ZIPC 1'MA' 2'RI' 3'NH' 4'VT' 6'ME' 7'CT' 8'NJ' 9'NY' 10'PA'
11'DE'
12'DC' 13'MD' 14'VA' 15'WV' 16'NC' 17'SC' 18'GA' 19'FL' 20'AL' 21'MS' 22'TN'
23'KY' 24'OH' 25'IN' 26'MI' 27'IA' 28'WI' 29'MN' 30'SD' 31'ND' 32'MT' 33'IL'
34'MO' 35'KS' 36'NE' 37'LA' 38'AR' 39'OK' 40'TX' 41'CO' 42'WY' 43'ID' 44'UT'
45'AZ' 46'NM' 47'NV' 48'CA-SO' 49'CA-NO' 50'HI' 51'OR' 52'WA' 53'AK'
54'CANADA'.
And so on,
what I am trying to do is come up with a formula to make this check my zip code field and bring it back by the state it is in
I do not know how to do this I was thinking their has to be a way that I can use these existing text files and come up with some kind of formula any and all help would be fantastic
Thanks in advance
IF (ZIP GE 01000 AND ZIP LE 02699) ZIPC=1.
IF (ZIP GE 02700 AND ZIP LE 02999) ZIPC=2.
IF (ZIP GE 03000 AND ZIP LE 03499) ZIPC=3.
IF (ZIP GE 03800 AND ZIP LE 03999) ZIPC=3.
and at the end of the text lisrt is this
VALUE LABELS
ZIPC 1'MA' 2'RI' 3'NH' 4'VT' 6'ME' 7'CT' 8'NJ' 9'NY' 10'PA'
11'DE'
12'DC' 13'MD' 14'VA' 15'WV' 16'NC' 17'SC' 18'GA' 19'FL' 20'AL' 21'MS' 22'TN'
23'KY' 24'OH' 25'IN' 26'MI' 27'IA' 28'WI' 29'MN' 30'SD' 31'ND' 32'MT' 33'IL'
34'MO' 35'KS' 36'NE' 37'LA' 38'AR' 39'OK' 40'TX' 41'CO' 42'WY' 43'ID' 44'UT'
45'AZ' 46'NM' 47'NV' 48'CA-SO' 49'CA-NO' 50'HI' 51'OR' 52'WA' 53'AK'
54'CANADA'.
And so on,
what I am trying to do is come up with a formula to make this check my zip code field and bring it back by the state it is in
I do not know how to do this I was thinking their has to be a way that I can use these existing text files and come up with some kind of formula any and all help would be fantastic
Thanks in advance