My problem is that I need a VBA routine to check the 67 character DNA string and return a Process Name in a field called Process. I do not want use Excel as the number of record often exceeds the Excel row limit
ContactID DNA
4479850 0000000000000000000000000000000000000000000000000000000000000000001
4479851 0000000000000000000000000000000000000000000000000000000000000000001
4479852 0000000000000000000010100100000000000000000000000000000000000000001
4479853 1001000000000000000000000000000000000000000000000000000000000000001
4479855 0000000000000000000000000000000000000000000000000000000110000000001
4479857 0000000000000000000010000100000000000000000000000000000000000000001
4479859 1100000000000000000000000000000000000000000000000000000000000000001
4479862 0000000000000000000010100100000000000000000000000000000000000000001
4479863 0000000000000000000000000000000000000000000000000000000000000000001
4479865 0000000000000000000000000000000000000000000000000000000000001000000
4479866 0000000000000000000000000000000000000000000000000000000000000000001
4479871 0000000000000000000000000000000000000000000000000000000000000000001
4479873 0000000000000000001000000000000000000000000000000000001000000000001
I had been looking at Excel using a routine similar to the following, but I must admit I am new to Access VBA
ContactID DNA
4479850 0000000000000000000000000000000000000000000000000000000000000000001
4479851 0000000000000000000000000000000000000000000000000000000000000000001
4479852 0000000000000000000010100100000000000000000000000000000000000000001
4479853 1001000000000000000000000000000000000000000000000000000000000000001
4479855 0000000000000000000000000000000000000000000000000000000110000000001
4479857 0000000000000000000010000100000000000000000000000000000000000000001
4479859 1100000000000000000000000000000000000000000000000000000000000000001
4479862 0000000000000000000010100100000000000000000000000000000000000000001
4479863 0000000000000000000000000000000000000000000000000000000000000000001
4479865 0000000000000000000000000000000000000000000000000000000000001000000
4479866 0000000000000000000000000000000000000000000000000000000000000000001
4479871 0000000000000000000000000000000000000000000000000000000000000000001
4479873 0000000000000000001000000000000000000000000000000000001000000000001
I had been looking at Excel using a routine similar to the following, but I must admit I am new to Access VBA
Code:
Public Sub rnatest()
Dim RNArng As Range, cl As Range
Dim rna As String
Dim reason As String
Set RNArng = Range("b2", Range("b65536").End(xlUp))
For Each cl In RNArng
cl.Select
rna = ActiveCell.Value
If rna >= "1101000000000000000000000000000000000000000000000000000000001110000" Then
reason = "Comp resolved"
'places reason in active cell
'Debug.Print reason
ElseIf rna >= "1100000000000000000000000000000000000000000000000000000000000000000" Then
reason = "Comp resolved"
'Debug.Print reason
ElseIf rna >= "1010000000000000000000000000000000000000000000000000000000000000000" Then
reason = "Comp unresolved"
'Debug.Print reason
ElseIf rna >= "1001000000000000000000000000000000000000000000000000000000000000000" Then
reason = "comp view"
'Debug.Print reason
ElseIf rna >= "1000000000000000000000000000000000000000000000000000000000000000000" Then
reason = "comp no action"
' Debug.Print reason
Else
reason = "msa"
'Debug.Print reason
ActiveCell.Value = reason
End If
Next cl
End Sub