
Not applicable
2016-10-19
07:15 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to group the Ip addresses
HI all
how to group the Ip addresses with the same numbers upto 3 octets
like 192.168.1.1
192.168.1.2
192.168.2.1
192.168.2.3
192.169..1
192.169.3.3
from the above values in a column , I would like to display a list box with the values like
192.168.1
192.168.2
Thanks
694 Views
1 Solution
Accepted Solutions

MVP
2016-10-19
07:42 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think more like this:
Mid('192.168.1.1', 1, Index('192.168.1.1', '.', 3) - 1)
or
Mid(IPAddress, 1, Index(IPAddress, '.', 3)-1) as GroupedID
2 Replies


Specialist II
2016-10-19
07:22 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can use mid with index
mid(IPfield,0, index(IPfield,'. ', 2) + 1)

MVP
2016-10-19
07:42 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think more like this:
Mid('192.168.1.1', 1, Index('192.168.1.1', '.', 3) - 1)
or
Mid(IPAddress, 1, Index(IPAddress, '.', 3)-1) as GroupedID
