Function Problems

How to Extract Text from a URL Between Two Delimiters in WPS Office Spreadsheets

John WilsonJohn Wilson Nov 13, 2026 869 views

Question details

The user needs to extract a page name from a URL by returning the text after /web/en/ and before the file extension.

How to Extract Text from a URL Between Two Delimiters in WPS Office Spreadsheets
Product
WPS Office Spreadsheets
Device & OS
not provided
Scenario
A URL is stored in a spreadsheet cell, and the user wants to isolate the page name segment between two delimiters.
Observed behavior
The goal is to return the page name, such as home-of-electric, from the full URL.
Before you start

Confirm that the URL is in a single cell, such as A1, and identify the delimiter /web/en/ and the file extension. In current WPS Office versions, TEXTBEFORE and TEXTAFTER are available; older versions can use MID, FIND, and LEN.

Solution 1Recommended

Use TEXTBEFORE and TEXTAFTER to Extract Text Between Delimiters

Best for current WPS Office Spreadsheets versions because it extracts the page name in one short formula.

This method uses TEXTAFTER to locate the text after the sixth slash and TEXTBEFORE to remove the file extension.

1
Select the output cell

Click a blank cell, such as B1, where the extracted page name should appear.

2
Enter the formula

Type =TEXTBEFORE(TEXTAFTER(A1,"/",6),".") and press Enter.

Use TEXTBEFORE and TEXTAFTER to Extract Text Between Delimiters
Expected result: For a URL like https://www.example.com/web/en/home-of-electric.html, the formula returns home-of-electric.

Extract URL Text Between Delimiters in WPS Office Spreadsheets

WPS Office Spreadsheets gives you the same formula-based text extraction workflow as Excel. Use TEXTBEFORE and TEXTAFTER in current versions, or MID, FIND, and LEN for legacy compatibility, without converting files.

  1. 1. Open WPS Office Spreadsheets: Launch WPS Office and open the workbook that contains the URL cells.
  2. 2. Select the output cell: Click the blank cell where you want the extracted page name to appear.
  3. 3. Enter the extraction formula: Type =TEXTBEFORE(TEXTAFTER(A1,"/",6),".") and press Enter.
  4. 4. Apply the formula to other rows: Use the fill handle to copy the formula down if you have multiple URLs.
Supports TEXTBEFORE and TEXTAFTER in current WPS Office versionsOpens and saves .xlsx, .xls, and .csv files with Microsoft Excel compatibilityFree, lightweight, and familiar spreadsheet interfaceCopy formulas, fill handles, and workbook workflows work the same way
microsoft office alternative - wps office

Frequently Asked Questions

Does WPS Office support TEXTBEFORE and TEXTAFTER?

Current versions of WPS Office Spreadsheets support TEXTBEFORE and TEXTAFTER. If these functions are not available, use the MID, FIND, and LEN formula instead.

What happens if the URL does not contain /web/en/?

The formula returns an error such as #VALUE!. You can adjust the delimiter in the formula or wrap it with IFERROR to show a custom message.

Can I extract a different segment from the URL?

Yes. For TEXTBEFORE and TEXTAFTER, change the delimiter or the instance number. For MID, FIND, and LEN, change the start text and end text arguments.

How do I apply this to many URLs?

After entering the formula in the first row, select the cell and drag the fill handle down to copy the formula to adjacent rows.

Are WPS Office Spreadsheets files compatible with Excel?

Yes. WPS Office Spreadsheets opens and saves .xlsx, .xls, and .csv files, so workbooks can move between WPS Office and Microsoft Excel.