J
JeanPierre Charron
Within a sorted list of non contiguous alphanumeric ID's, I often have some ID's that are contiguous.
I need to flag with an "X" in the adjacent column, the lead ID of any contiguous group,
or isolated ID if not contiguous.
..
I assume that with a loop thru my sorted list
I will store the current record in three variables:
ID, ID Length, Type (Numeric or Alpha)
..
IF Next Record Has same ID length and Same type as the Current Record
IF Next Record ID Value = Current Record Value + 1 Then Flag current Record with "X"
Loop
ENDIF
etc...
..
For instance :
ID Flag Comment
111 x is a lead
112
113
115 X Complex Case involving a similar numeric & alphanumeric
115A
123 x is isolated
250A x is a lead
250B
300A1 X is a lead
300A2
I need the VBA Code to get me started thru looking at the next record while being at the current record to compare if it is the next sequential or not.
Thank you for your help,
J.P.
I need to flag with an "X" in the adjacent column, the lead ID of any contiguous group,
or isolated ID if not contiguous.
..
I assume that with a loop thru my sorted list
I will store the current record in three variables:
ID, ID Length, Type (Numeric or Alpha)
..
IF Next Record Has same ID length and Same type as the Current Record
IF Next Record ID Value = Current Record Value + 1 Then Flag current Record with "X"
Loop
ENDIF
etc...
..
For instance :
ID Flag Comment
111 x is a lead
112
113
115 X Complex Case involving a similar numeric & alphanumeric
115A
123 x is isolated
250A x is a lead
250B
300A1 X is a lead
300A2
I need the VBA Code to get me started thru looking at the next record while being at the current record to compare if it is the next sequential or not.
Thank you for your help,
J.P.