How to Remove Leading Zeros in Excel

I had the occasion to download a blacklist of IPs. The problem was that this machine generated list padded zeros in front of it. For example, instead of 1.2.3.4 it was listed as 001.002.003.004. I didnt relish having to manually edit all 10,000 IP addresses. So I did research.

This post gave a formula to do it:
=INT(MID(A1,1,3)) & “.” &
INT(MID(A1,5,3)) & “.” &
INT(MID(A1,9,3)) & “.” &
INT(MID(A1,13,3))

Source: http://superuser.com/questions/931682/excel-remove-leading-0s-from-ip-address

Leave a Reply

Time limit is exhausted. Please reload CAPTCHA.