Knowledge Base

Our Knowledge Base covers a wide variety of technical topics, from the basic to the complex.

How do I write a formula that pads out IP Addresses with leading zeros so I can sort them properly? For example, I want 56.2.23.78 to come out in the formula field as 056.002.023.078.

The formula looks like this:

Right("00" & Left([IP Address], "."), 3) & "." &

Right("00" & Left(Right([IP Address], -1 + Length([Ip Address]) - Length(Left([IP Address],"."))),"."),3) & "." &

Right("00" & Right(Left([IP Address], -1 + Length([Ip Address]) - Length(Right([IP Address],"."))),"."),3) & "." &

Right("00" & Right([IP Address], "."), 3)

This formula field might be used only for sorting and not for display purposes.

Thanks to Keith Ratliff for the formula.

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
Type the characters you see in this picture. (verify using audio)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.

© 1997-2014 Intuit Inc. All Rights Reserved.

Online Database VeriSign Secured Web Based Software TRUSTe Certification Online Database SSAE Audit