Skip to main content

Kutools for Office — One Suite. Five Tools. Get More Done.

How to fill down IP Address with increment in Excel?

Author Siluvia Last modified

Assigning IP addresses efficiently in Excel can be particularly helpful, whether you're managing office devices, servers, or preparing bulk IT deployment. For example, you might need to generate a sequence of IP addresses, such as from 192.168.1.1 to 192.168.10.1, with part of the address incremented for each entry. Manually inputting these addresses can be time-consuming and error-prone, and Excel's standard Auto Fill feature typically does not handle IP-style numeric patterns as intended. Therefore, it's important to explore other methods that streamline this repetitive task, ensuring accuracy and consistency across your IP address allocations. This article will introduce several effective solutions, including built-in formula techniques, advanced utilities like Kutools for Excel, and more, to help you quickly fill down IP addresses with incremental values in Excel.


Fill down IP Address with increment with formulas

If you want to generate a range of IP addresses from 192.168.1.1 to 192.168.10.1, where the increment takes place in the third octet, you can accomplish this easily with an Excel formula. This method is especially useful if you have a regular increment pattern and require a flexible, formula-driven solution that only relies on built-in Excel functionality.

1. Select a blank cell (for example, cell B2), and enter the following formula. Then, press the Enter key to generate your first IP address in the sequence:

="192.168."&ROWS($A$1:A1)&".1"

enter a formula to Fill down IP Address with increment

2. Once the first IP address is generated, click the cell and drag its Fill Handle down the column to automatically create additional addresses in sequence. The number of rows should match how many addresses you need between the starting and ending values.

drag the Fill Handle down to the cell until all needed IP Addresses are created

ℹ️ Notes and Practical Tips:

  • In the formula above, 192, 168, and 1 refer to the fixed octets. The changing part—ROWS($A$1:A1)—generates sequential integers, increasing with each row to update the third octet. To start from a different number (e.g., 3), modify the reference (e.g., $A$3:A3).
  • To increment the first octet:
    =ROWS($A$1:A192)&".168.2.1"
  • To increment the second octet:
    ="192."&ROWS($A$1:A168)&".1.1"
  • To increment the fourth octet (host assignments):
    ="192.168.1."&ROWS($A$1:A1)
  • Always adjust the formula logic to match your required address range and start values.
  • Tip: If you intend to copy the formula down many rows, double-click the Fill Handle to auto-fill the column.
  • Precautions:
    • Ensure no octet exceeds the valid range (0–255).
    • The results are text strings. Ensure they match the formatting requirements of your target system.
  • Troubleshooting: If you see unexpected values, check row references and starting cell position.

This solution is best for straightforward, regular patterns and offers maximum flexibility if you’re already comfortable with Excel formulas. However, for more complex custom IP address increments or formatting, consider the other solutions below.


Fill down IP address with increment with Kutools for Excel

For users who prefer a graphical interface or need to generate more complex sequences (such as custom starting numbers, increments, or non-standard formatting), the Insert Sequence Number utility in Kutools for Excel provides a quick and versatile solution. This method is particularly suited if you work with large lists, require additional features such as automatic formatting, and want to minimize manual formula adjustments.

Kutools for Excel offers over 300 advanced features to streamline complex tasks, boosting creativity and efficiency. Itegarate with AI capabilities, Kutools automates tasks with precision, making data management effortless. Detailed information of Kutools for Excel...         Free trial...

1. Click Kutools > Insert > Insert Sequence Number. See screenshot:

click Insert Sequence Number feature of kutools

2. In the Insert Sequence Number dialog box, configure your IP address sequence as follows:

  • (1) Type a descriptive name for this rule in the Name box (e.g., OfficeIP3rdOctet).
  • (2) Enter the starting value for the increment octet in the Start number field. For example, use 1 to start from 192.168.1.x.
  • (3) Specify how much each IP should increment by in the Increment box (usually 1).
  • (4) Set the Number of digits if you need leading zeros in your sequence (e.g., 001, 002).
  • (5) Fill in fixed components (e.g., 192.168. as Prefix and .1 as Suffix), ensuring proper dot placement.
  • (6) Click the Add button to save this rule for later use.

set a sequence rule in the dialog box

3. When you're ready to populate the sheet with IP addresses, select the cells where you want the addresses to appear. Choose the saved rule and click Fill Range:

click the Fill Range button to fill the IP address

This utility also enables generation of other custom sequences, such as invoice numbers, employee IDs, or any repetitive string-number combination.

✅ Advantages:

  • Highly customizable – supports fixed text, variable increments, and formatting.
  • No need to remember or apply formulas manually.
  • Sequence rules can be saved and reused across workbooks.

⚠️ Precautions:

  • Make sure prefix, suffix, and digit count are correctly configured to avoid malformed addresses.
  • Double-check configuration before applying to large ranges.

🛠️ Troubleshooting:

  • If Fill Range doesn't work, ensure your rule matches the selected range format.
  • Some networks may require exclusion of specific address ranges (e.g., broadcast addresses).

  If you want to have a free trial (30-day) of this utility, please click to download it, and then go to apply the operation according above steps.


VBA Code - Programmatically generate a sequence of IP addresses with increments

If you require a flexible method to generate IP address ranges with custom start, end, and increment values—or if your address pattern is more complex than what formulas and sequence tools can handle—using a VBA macro can be highly effective. This solution is ideal for advanced Excel users, for automating bulk creation, and for scenarios where you may want to prompt for input parameters each time you generate a sequence.

1. To use VBA for generating IP addresses, click Developer > Visual Basic to open the Microsoft Visual Basic for Applications window. Then click Insert > Module and paste the following code into the module:

Sub GenerateIPSequence()
    Dim startThird As Long
    Dim endThird As Long
    Dim increment As Long
    Dim base1 As String
    Dim base2 As String
    Dim base4 As String
    Dim i As Long
    Dim rowStart As Long
    Dim outCell As Range

    On Error Resume Next
    xTitleId = "KutoolsforExcel"

    base1 = Application.InputBox("Enter the first octet:", xTitleId, "192", Type:=2)
    base2 = Application.InputBox("Enter the second octet:", xTitleId, "168", Type:=2)
    startThird = Application.InputBox("Enter starting value for third octet:", xTitleId, 1, Type:=1)
    endThird = Application.InputBox("Enter ending value for third octet:", xTitleId, 10, Type:=1)
    base4 = Application.InputBox("Enter the fourth octet:", xTitleId, "1", Type:=2)
    increment = Application.InputBox("Increment value for third octet:", xTitleId, 1, Type:=1)

    Set outCell = Application.InputBox("Select the first cell for output:", xTitleId, Type:=8)

    If increment <= 0 Then
        increment = 1
    End If

    rowStart = 0

    For i = startThird To endThird Step increment
        outCell.Offset(rowStart, 0).Value = base1 & "." & base2 & "." & i & "." & base4
        rowStart = rowStart + 1
    Next i
End Sub

2. Click the Run button button to run the macro. You will be guided through a series of input prompts:

  • First octet – Enter the initial part of your IP address (e.g., 192).
  • Second octet – Typically a fixed value like 168, depending on your subnet.
  • Starting value for the third octet – This defines where your incremented block begins (e.g., 1).
  • Ending value for the third octet – Determines when the sequence stops (e.g., 10 for generating 192.168.1.1 through 192.168.10.1).
  • Fourth octet – This is often fixed (e.g., 1) and represents the host part of the address.
  • Increment value – Controls how the third octet increases between each row (typically 1 for consecutive addresses).
  • Output cell – Choose the first cell where the generated IP addresses should be written. The macro will fill downward from this cell.

Once all values are entered, the macro will automatically construct and fill the IP addresses in the format: first.second.third.fourth (e.g., 192.168.3.1, 192.168.4.1, etc.).

✅ Usage Tips:

  • Always save your workbook before running new macros to avoid accidental data loss.
  • Run the macro multiple times with different parameters to generate different address blocks—no need to modify code.
  • Use this method when other formula or GUI tools can't handle complex or variable IP formats.

⚠️ Precautions:

  • All user inputs are validated—negative increments are automatically reset to 1.
  • Ensure that each IP octet remains in the valid range (0–255).
  • Make sure the output column has enough blank rows to avoid overwriting data.
  • Macro execution requires enabling Developer tab and allowing macros.

🛠️ Troubleshooting:

  • If you see errors, check your macro security settings under Developer > Macro Security.
  • If no result appears, verify that the selected output cell is on the correct worksheet and not locked.

Fill down IP address with increment with Kutools for Excel

 

Related articles:

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more
Use Kutools in your preferred language – supports English, Spanish, German, French, Chinese, and 40+ others!

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!

All Kutools add-ins. One installer

Kutools for Office suite bundles add-ins for Excel, Word, Outlook & PowerPoint plus Office Tab Pro, which is ideal for teams working across Office apps.

Excel Word Outlook Tabs PowerPoint
  • All-in-one suite — Excel, Word, Outlook & PowerPoint add-ins + Office Tab Pro
  • One installer, one license — set up in minutes (MSI-ready)
  • Works better together — streamlined productivity across Office apps
  • 30-day full-featured trial — no registration, no credit card
  • Best value — save vs buying individual add-in