Is the code always the same amount of chars? Gots to love consistency of data Lets say its ABC001 so in other words consistently 6 chars Add another 2 to take into account of the space and comma + 1 to start on the Name = 9
So your expression would then look like... If it is you could just use Mid$(TAG,9,Len(TAG)-8) Or you could try this =) Which blows my mind as I am tired from lack of sleep. Mid$(InStr(1, TAG+",", ","),Len(TAG)+1-InStr(1, TAG+",", ","),TAG) Tell me how you go.. On Wed, 23 Mar 2005 12:18:45 +1100, Daniel Bowles <[EMAIL PROTECTED]> wrote: > Hi list > > I am working with the NSW (Australia) digital topographic database > (DTDB) which has a data format of > > TAG = "CODE, NAME" > > within one field containing the important information for each object. > > I would like to be able to auto-label entire layers with just NAME. > > At the moment I'm using the following expression > > Right$(TAG, Len(TAG)-InStr(1, TAG, ",")) > > which will return all the characters after the comma when there is a > name. However, if there is no name and just a code (there are many > objects like this), I would like no label at all. My current expression > returns the code if there is no comma/name in the field. > > Any ideas? > > Cheers > > Dan Bowles > GIS Officer > Harper Somers O'Sullivan > > T +61 2 4961 6500 > M +61 4 3834 8372 > E [EMAIL PROTECTED] > > --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 15766
