The following macros are included in the sample Excel spreadsheets. They help with the automation of IP address calculation within the spreadsheets.


Note: While the macros below are created by the Gen IT team and are part of the sample spreadsheets, they are not part of the Gen IT product. We will provide support for them as and when we are able to.


MasktoLen(Subnet Mask) – Convert a subnet mask to bit length, e.g. MasktoLen(255.255.255.0)

LentoMask(Subnet Length) – Converts bit length to subnet mask., e.g. LentoMask(24)

MaskLentoIPCount(MaskLength) – Counts IP’s available within a subnet length, e.g. MaskLentoIPCount(24)

IPChange(IP Address, Amount) – Add or subtract the specified amount from a IP address, e.g. IPChange(10.0.0.0, 255)


Much of the functionality provided by these macros has been added into Gen.IT and variables within the templates should be used rather than these macros.