View Full Version : VBA Word parse string help


yournamehere9982
05-07-2008, 01:00 PM
Hello everyone,

I'm trying to figure out how to parse a string I have that comes from a document I've read in. It's a revision number and looks something like 100 or 1000 which I need to add a period to them which should look like 1.00 or 10.00(so two spaces in from the right). How can I do something like this? Thanks in advance.

georgedwilkinson
05-07-2008, 01:16 PM
Multiply the value times .01.

Or, if you want to deal with/stay within text, use:

left(myfield,len(myfield) - 2) & "." & right(myfield,2)

In SQL Server qry syntax, you must replace the "&" with "+".

yournamehere9982
05-07-2008, 03:50 PM
Multiply the value times .01.

Or, if you want to deal with/stay within text, use:

left(myfield,len(myfield) - 2) & "." & right(myfield,2)

In SQL Server qry syntax, you must replace the "&" with "+".

Sweet! Works great, ty.

georgedwilkinson
05-07-2008, 07:42 PM
Eeeeehhhhcksuhlent!