When you have the correct formula in a cell, use your macro recorder, click on the cell then hit F2 to edit it. Then hit enter, this is what your formula will be in VBA.![]()
Dim Rws As Long, Rng As Range, c As Range Rws = Cells(Rows.Count, "A").End(xlUp).Row Set Rng = Range(Cells(1, 1), Cells(Rws, 1)) For Each c In Rng.Cells If c = "," Then c.Offset(0, 7) = "=IF(RC[-7]="","",CONCATENATE(""network "",""IpAnd(A1,B1)"",255-RC[-5],""."",255-RC[-4],""."",255-RC[-3],""."",255-RC[-2]))" Next c
Bookmarks