I need to select the terms that have the same base value to perform my next instruction. These are sequential in my list.
Data Example: 3256305BW is in cell B4, the inital cell in the range.
This will match the next value and would return a true. On the offset of 4, this should return false. It still returns true.
3256305BW
3256305BW10
3256305BW11
3256LASBGR
3256LASBGR10
3256LASBGR11
3256LASBGR7
3256LASBGR
83256LASBGR9
3256LASBGR95
3256LASBK
I am using the Len Function. I am attempting to use the index value's len in this case 3256305BW, a length of 9, and subtract this number from the next value in the list, if string matches, based on the number of characters specificed by the function then we have a true scenario.
I am setting up a test condition currently, so I am only using hardcoded values at the moment to keep it simple.
My code is returning inaccurate results. This should fail, but does not. I must have something crisscrossed on the Len and Value here.
[vba]
If Len(ActiveSheet.Range("B4").Offset(4, 0).Value) - Len(ActiveSheet.Range("B4").Value) Then
ActiveSheet.Range("B4").Offset(4, 0).Activate
End If
[/vba]