Skip to content

Instantly share code, notes, and snippets.

@xunil154
Created November 21, 2018 06:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xunil154/c99c660694671479e3aa39b21265502b to your computer and use it in GitHub Desktop.
Save xunil154/c99c660694671479e3aa39b21265502b to your computer and use it in GitHub Desktop.
Excel IP to Integer formula: Assumes I2 is the IP address
=BITLSHIFT(INT(MID($I2,1,FIND(".",$I2,1)-1)),24)+BITLSHIFT(INT(MID($I2,FIND(".",$I2)+1,FIND(".",$I2,FIND(".",$I2)+1)-FIND(".",$I2)-1)),16)+BITLSHIFT(INT(MID($I2,FIND(".",$I2,FIND(".",$I2)+1)+1,FIND(".",$I2,FIND(".",$I2,FIND(".",$I2)+1)+1)-FIND(".",$I2,FIND(".",$I2)+1)-1)),8)+INT(MID($I2,FIND(".",$I2,FIND(".",$I2,FIND(".",$I2)+1)+1)+1,LEN($I2)-FIND(".",$I2,FIND(".",$I2,FIND(".",$I2)+1)+1)-1))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment