My situation
My main reason why i made this code is to check if a ip address is a intern or extern connection.
A cell in my data sheet, does not only contain a IP address value but can also contain other type of text. F.e. :
"BE-ABCDDD-DDS 172.16.23.3"
My problem
I want to check if a cell contains a ip address of "172.16" between "172.31" In the example above it would return a value true/Intern. If the cell conaints a value of "172.32" would return false/extern.
this is my code:
For Each source In Range("E6", Range("E" & Rows.Count).End(xlUp))
If (InStr(source, "-10.") <> 0 Or InStr(source, "-192.168.") <> 0 Or InStr(source, "- 172.") <> 0) And InStr(source.Offset(0, 22).Value, "Extern") = 0 Then
source.Offset(0, 22) = "Intern"
End If
Next source
As you can see in my code, it only checks on "172." at the moment.
Thanks in advance