Moving non numeric characters

Associate
Joined
1 Dec 2002
Posts
1,884
Hi all,

I have a field that will contain the premise number. So it can be either
1,2,3 or 1a, 25a 1333b etc...

I am wondering if it is possible to write a macro or some kind of script that would move any non numerical characters from this field into the next field.

Example:

If field A1 had 25a, then i would like the script to keep 25 in A1, and move the "a" to B1
 
if this is in excel then you should be able to write a small macro.

don't know vba but it would be something like
chars = ""
nums = ""
for (i = 0; i < string.length; i++){
c = string.charAt(i)
if c is char then chars ++ c
else nums ++ c
}

A1 = chars
B1 = nums

daven
 
its either excel or access. but as long as its possible ill start digging. I found an article by an MVP on using the ISNUMBER function

but now i am having trouble seperating the "-" in numbers like house 11-12 lol.

one problem after another ;)
 
Back
Top Bottom