A alan04 New member Local time Tomorrow, 00:12 Joined Dec 31, 2005 Messages 1 Apr 17, 2007 #1 My students reg numbers are written as 01/2007, 101/07 and 1/07. How to trim the numbers to get the numbers left to the sign / only.
My students reg numbers are written as 01/2007, 101/07 and 1/07. How to trim the numbers to get the numbers left to the sign / only.
Bodisathva Registered User. Local time Today, 12:12 Joined Oct 4, 2005 Messages 1,274 Apr 17, 2007 #2 alan04 said: My students reg numbers are written as 01/2007, 101/07 and 1/07. How to trim the numbers to get the numbers left to the sign / only. Click to expand... tgtNum = Left(regNum, 1, InStr(regNum,"/"))
alan04 said: My students reg numbers are written as 01/2007, 101/07 and 1/07. How to trim the numbers to get the numbers left to the sign / only. Click to expand... tgtNum = Left(regNum, 1, InStr(regNum,"/"))
rainman89 I cant find the any key.. Local time Today, 12:12 Joined Feb 12, 2007 Messages 3,015 Apr 17, 2007 #3 Search for Parsing on the forum! you should be able to find an answer there Edit: Or someone will tell you!
Search for Parsing on the forum! you should be able to find an answer there Edit: Or someone will tell you!
G GregVB New member Local time Today, 09:12 Joined Feb 15, 2007 Messages 9 Apr 18, 2007 #4 Bodisathva said: tgtNum = Left(regNum, 1, InStr(regNum,"/")) Click to expand... This almost works for me as well. I had to change it to tgtNum=left(regnum, instr(regnum,"/")) but it returns the "/" as well. is there a way to omit that?
Bodisathva said: tgtNum = Left(regNum, 1, InStr(regNum,"/")) Click to expand... This almost works for me as well. I had to change it to tgtNum=left(regnum, instr(regnum,"/")) but it returns the "/" as well. is there a way to omit that?
R raskew AWF VIP Local time Today, 11:12 Joined Jun 2, 2001 Messages 2,734 Apr 18, 2007 #5 from the debug (immediate) window: Code: regnum = "101/07" tgtNum=left(regnum, instr(regnum,"/")-1) ? tgtNum 101
from the debug (immediate) window: Code: regnum = "101/07" tgtNum=left(regnum, instr(regnum,"/")-1) ? tgtNum 101
R RoyVidar Registered User. Local time Today, 18:12 Joined Sep 25, 2000 Messages 805 Apr 18, 2007 #6 For the fun of it, here's another one MsgBox Split("01/2007", "/")(0) Is there any possibility that there is no "/" in the string?
For the fun of it, here's another one MsgBox Split("01/2007", "/")(0) Is there any possibility that there is no "/" in the string?