Excel Formulas to Split IP Addresses by Dot Delimiter

📅 Jul 19, 2026 📝 Sarah Miller

Managing network data often becomes frustrating when you need to parse IPv4 addresses into individual octets, a tedious task that disrupts database normalization and reporting workflows. While manual features like "Text to Columns" offer a temporary fix, they lack real-time adaptability when your source data updates.

Utilizing a dynamic Excel formula grants you instant, automated extraction that maintains spreadsheet integrity seamlessly. As an important stipulation, however, your formula choice depends on your Excel version, as modern builds support streamlined array functions while legacy versions require nested text formulas.

For instance, modern Office 365 users can leverage TEXTSPLIT(A2, ".") to instantly separate the dots, whereas older environments rely on robust FILTERXML functions. Below, we will detail both step-by-step methods to help you deploy the ideal solution for your specific system.

Excel Formulas to Split IP Addresses by Dot Delimiter

In network administration, data analysis, or IT asset management, dealing with IP addresses is a common occurrence. Often, you will find these IP addresses consolidated into a single string within a single cell (e.g., 192.168.1.1). However, to perform subnetting analysis, group ranges, sort IPs chronologically, or run database queries, you need to split this single IP address into its four constituent parts, known as octets.

An IPv4 address consists of four numbers separated by periods (dots). Because the length of each octet can vary from one to three digits (e.g., 10.0.0.1 versus 192.168.255.254), a simple character-count split will not work. Fortunately, Excel offers several dynamic formulas to handle this task effortlessly. This guide explores the best Excel formulas to split IP addresses with dots, ranging from modern Microsoft 365 functions to legacy formulas compatible with older Excel versions.


Method 1: The Modern & Simplest Way – TEXTSPLIT (Excel 365 & 2021)

If you are using Microsoft 365, Excel for the Web, or Excel 2021, you have access to the powerful TEXTSPLIT function. This function is designed specifically to split text strings across columns or rows using a designated delimiter.

The Formula:

=TEXTSPLIT(A2, ".")

How It Works:

  • A2: Represents the cell containing the IP address.
  • ".": Specifies the dot (period) as the; marks where the split should occur.

Because TEXTSPLIT is a dynamic array function, you only need to type this formula into the first destination cell. Excel will automatically "spill" the results across the next three adjacent columns, giving you all four octets instantly. If you want the split values to be returned as numbers rather than text, wrap the formula in the VALUE or NUMBERVALUE function, or simply multiply the output by 1:

=VALUE(TEXTSPLIT(A2, "."))

Method 2: The Classic Universal Formula (All Excel Versions)

If you are working on an older version of Excel (such as Excel 2019, 2016, or 2013) or need to share your workbook with users on older platforms, the TEXTSPLIT function will not be available. In this case, you can use a clever nested formula combining TRIM, MID, SUBSTITUTE, and REPT.

The General Formula:

To extract any specific octet, use this template, replacing N with the octet number (1, 2, 3, or 4):

=TRIM(MID(SUBSTITUTE($A2, ".", REPT(" ", 100)), (N-1)*100+1, 100))

The Formulas for Each Column:

Assuming your IP address is in cell A2, copy these formulas into separate columns:

  • First Octet: =TRIM(MID(SUBSTITUTE($A2, ".", REPT(" ", 100)), 1, 100))
  • Second Octet: =TRIM(MID(SUBSTITUTE($A2, ".", REPT(" ", 100)), 101, 100))
  • Third Octet: =TRIM(MID(SUBSTITUTE($A2, ".", REPT(" ", 100)), 201, 100))
  • Fourth Octet: =TRIM(MID(SUBSTITUTE($A2, ".", REPT(" ", 100)), 301, 100))

How It Works:

  1. SUBSTITUTE($A2, ".", REPT(" ", 100)): This replaces every dot in the IP address with 100 spaces. An IP address like 192.168.1.1 becomes a massive string where each number is padded by 100 spaces of buffer.
  2. MID(..., Start_Num, 100): The MID function extracts a segment of 100 characters from this padded string. By starting at position 1, 101, 201, and 301 respectively, Excel guarantees; it lands somewhere inside the padded zone of the 1st, 2nd, 3rd, or 4th number.
  3. TRIM(...): Finally, the TRIM function strips away all the excess leading and trailing spaces, leaving only the pure clean octet digits behind.

Method 3: The XML Parsing Alternative – FILTERXML (Excel 2013 to 2019)

If you are using Excel 2013 through 2019 on Windows, you can utilize a highly efficient workaround using the FILTERXML function. This turns your IP address string into an XML format, allowing Excel to parse it as an array.

The Formula:

To extract the first octet, write this in your first destination cell and drag it across/down:

=FILTERXML("<t><s>" & SUBSTITUTE($A2, ".", "</s><s>") & "</s></t>", "//s[1]")

How to Adjust for Other Octets:

Simply change the index number at the very end of the XPath query ("//s[N]"):

  • First Octet: "//s[1]"
  • Second Octet: "//s[2]"
  • Third Octet: "//s[3]"
  • Fourth Octet: "//s[4]"

How It Works:

The SUBSTITUTE function converts an IP like 192.168.1.1 into an XML-compliant string: <t><s>192</s><s>168</s><s>1</s><s>1</s></t>. The FILTERXML function then easily queries the specific node array by index, extracting whichever numeric octet you specify.


Method 4: Step-by-Step Character Extraction (Legacy Basic Functions)

If you want to understand how Excel handles string manipulation without complex spacing tricks or dynamic arrays, you can use traditional text functions: LEFT, MID, RIGHT, and FIND. This method is highly calculated and resource-light, though the formulas get progressively complex for the middle octets.

The Formulas:

Octet Excel Formula (Assumes IP in A2)
1st Octet =LEFT(A2, FIND(".", A2) - 1)
2nd Octet =MID(A2, FIND(".", A2) + 1, FIND(".", A2, FIND(".", A2) + 1) - FIND(".", A2) - 1)
3rd Octet =MID(A2, FIND(".", A2, FIND(".", A2) + 1) + 1, FIND(".", A2, FIND(".", A2, FIND(".", A2) + 1) + 1) - FIND(".", A2, FIND(".", A2) + 1) - 1)
4th Octet =RIGHT(A2, LEN(A2) - FIND(".", A2, FIND(".", A2, FIND(".", A2) + 1) + 1))

While highly robust, these formulas are long and prone to typos during manual entry. They are generally recommended only if you want to strictly avoid memory-intensive arrays in massive workbooks.


Non-Formula Alternatives: Fast & Simple

If you only need to split your IP addresses once and do not require your data to be dynamically linked to the source cells, you can skip formulas entirely and use Excel's built-in data tools.

Option A: Text to Columns

  1. Select the column containing your IP addresses.
  2. Navigate to the Data tab on the Ribbon and click Text to Columns.
  3. Select Delimited and click Next.
  4. Uncheck all delimiters, check Other, and type a dot (.) in the input box.
  5. Click Next, select your destination cell range, and click Finish.

Option B: Flash Fill (Excel 2013 and Newer)

  1. In the column next to your IP address, manually type the first octet of the first row and press Enter.
  2. In the next cell down, start typing the first octet of the second row.
  3. Excel will detect the pattern and display a ghost list of predicted values down the column. Press Enter to accept the Flash Fill suggestion (or select the column and press Ctrl + E).
  4. Repeat this process for the remaining three columns.

Summary: Which Method Should You Choose?

  • Choose Method 1 (TEXTSPLIT) if you are using Microsoft 365 or Excel 2021. It is clean, dynamic, and does not require complex nested functions.
  • Choose Method 2 (TRIM-MID-REPT) if your workbook needs to be compatible across different versions of Excel, including old desktop editions.
  • Choose Method 3 (FILTERXML) if you are on Excel 2013-2019 Windows and want a clean index-based formula approach.
  • Choose Text to Columns if you just want a quick, one-off cleanup of your network data without managing active formulas.

Disclaimer:
The documents and templates provided on this page are for informational and illustrative purposes only. They do not constitute professional, legal, or financial advice, and should not be relied upon as such. Because individual circumstances and regulatory requirements vary, these materials may not be suitable for your specific needs. We recommend consulting with a qualified professional before adapting or using any of these examples for official or commercial purposes.