View Single Post
  #8   Report Post  
Harlan Grove
 
Posts: n/a
Default

"Frank Kabel" wrote...
....
=INT(--MID(x,FIND(CHAR(127),SUBSTITUTE(x,".",CHAR(127),2) )+1,3))


though I like your solution idea this may not work in non-English
countries. e.g. for the following IP address
172.24.1.12

your formula returns a date value ("1-Jan-2004") if the dot is used for
delimiting the date parts.


Part of me wants to respond that continental Europe has lost whatever
contest there may have been to establish computer and IP standards, and the
sooner y'all recognize that '.' is the decimal point and ',' the thousands
separator, and '/' or '-' date component separators, the better for all.

However, I'll address your point. If you live in some backwards region that
doesn't use US-standard settings by default, and you need to work with data
using US-standard separators (such as the .s in IP addresses), then change
those US-standard separators to your local separators as the initial step.

=INT(--MID(SUBSTITUTE(x,".",","),
FIND(CHAR(127),SUBSTITUTE(x,".",CHAR(127),2))+1,3) )

Or download and install Laurent Longre's MOREFUNC.XLL add-in, available at

http://longre.free.fr/english/

and use it's WMID function.