detecting integer

# Thread: detecting integer

1. Member
Join Date
Dec 1969
Posts
96

## detecting integer

Hi there <BR>lets say I have an ID as such "125-1" is there a way where I can compare and check what number is after the "-" and increment it by 1 so that it would become "125-2" keeping in mind tha the first 3 numbers are always incrementing and and could become a 4 or 5 number digit before the "-"<BR>thanx for any sugestions.

2. Senior Member
Join Date
Dec 1969
Location
Los Angeles, CA
Posts
21,192

## Use the SPLIT function

take the second element of the array and increase by 1<BR><BR><BR>you MAY have to use clng though<BR><BR><BR>

3. God
Senior Member
Join Date
Dec 1969
Posts
18,177

## RE: detecting integer

Create an array Split()&#039;ing the value at the "-" character. The data at the 0 location is BEFORE the -. If there is a 1 location, it&#039;s the data AFTER the -.<BR><BR>If the 1 location data is numeric, increment it by 1.<BR><BR>Reassemble the 2 pieces, seperating them with a -.

4. Member
Join Date
Dec 1969
Posts
96

## got it ,thanx .

.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•