extract value

S

stevenszoe

i need assistance extract the following

12345 from 3001-12345Y
653 from 2007-653Z
23 from 4009-23p

the number of places after the dash will be variable. I have tried using
the following with a field named test, but getting #Error when run query

Expr1: Mid([test],InStr([test],"-",1)+1,Len([test]-InStr([test],"-",1)-1))
 
J

JLamb

There is a misplaced parentheses:

Mid([test],InStr([test],"-",1)+1,Len([test] ) -InStr([test],"-",1)-1)
 
S

stevenszoe

still getting #Error.

HELP!

JLamb said:
There is a misplaced parentheses:

Mid([test],InStr([test],"-",1)+1,Len([test] ) -InStr([test],"-",1)-1)


stevenszoe said:
i need assistance extract the following

12345 from 3001-12345Y
653 from 2007-653Z
23 from 4009-23p

the number of places after the dash will be variable. I have tried using
the following with a field named test, but getting #Error when run query

Expr1: Mid([test],InStr([test],"-",1)+1,Len([test]-InStr([test],"-",1)-1))
 
J

JLamb

The last Instr parameter is unnecessary and is throwing off the calc. This
works:

Mid([test],InStr([test],"-")+1,Len([test])-InStr([test],"-")-1)

stevenszoe said:
still getting #Error.

HELP!

JLamb said:
There is a misplaced parentheses:

Mid([test],InStr([test],"-",1)+1,Len([test] ) -InStr([test],"-",1)-1)


stevenszoe said:
i need assistance extract the following

12345 from 3001-12345Y
653 from 2007-653Z
23 from 4009-23p

the number of places after the dash will be variable. I have tried using
the following with a field named test, but getting #Error when run query

Expr1: Mid([test],InStr([test],"-",1)+1,Len([test]-InStr([test],"-",1)-1))
 
S

stevenszoe

that worked. thanks much!

JLamb said:
The last Instr parameter is unnecessary and is throwing off the calc. This
works:

Mid([test],InStr([test],"-")+1,Len([test])-InStr([test],"-")-1)

stevenszoe said:
still getting #Error.

HELP!

JLamb said:
There is a misplaced parentheses:

Mid([test],InStr([test],"-",1)+1,Len([test] ) -InStr([test],"-",1)-1)


:

i need assistance extract the following

12345 from 3001-12345Y
653 from 2007-653Z
23 from 4009-23p

the number of places after the dash will be variable. I have tried using
the following with a field named test, but getting #Error when run query

Expr1: Mid([test],InStr([test],"-",1)+1,Len([test]-InStr([test],"-",1)-1))
 
Top