Skip to content
xlsoffice. All Rights Reserved
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Lookup and Reference Examples

  • Count unique text values with criteria
  • Count rows that contain specific values in Excel
  • Approximate match with multiple criteria in Excel
  • How to reference named range different sheet in Excel
  • Find closest match in Excel

Data Analysis Examples

  • Understanding Pivot Tables in Excel
  • Add Outline to Data in Excel
  • Error Bars in Excel
  • Example of COUNTIFS with variable table column in Excel
  • Conflicting Multiple Conditional Formatting Rules in Excel

Data Validation Examples

  • Excel Data validation date in specific year
  • Excel Data validation allow weekday only
  • Excel Data validation number multiple 100
  • Excel Data validation no punctuation
  • Excel Data validation whole percentage only

How to get page from URL in Excel

by

To extract the page, or the part of a path after the last forward slash (/), you can use a formula based on several Excel functions: TRIM, RIGHT, SUBSTITUTE, and REPT.

Formula

=TRIM(RIGHT(SUBSTITUTE(url,"/",REPT(" ",100)),100))

Explanation

In the example shown, the formula in C5 is:

=TRIM(RIGHT(SUBSTITUTE(B5,"/",REPT(" ",100)),100))

How this formula works

At the core, this formula replaces all forward slashes (/) with 100 spaces, then extracts  100 characters from the RIGHT and cleans this up with the TRIM function.

Worked Example:   How to extract domain name from URL in Excel

The replacement is done with SUBSTITUTE and REPT here:

SUBSTITUTE(B5,"/",REPT(" ",100))

Then, the RIGHT function extracts the last 100 characters of the string returned by SUBSTITUTE.

Worked Example:   How to create email address from name in Excel

Finally, TRIM removes all leading and trailing space characters and returns the result.

Worked Example:   How to extract name from email address in Excel

Note: the use of 100 in this formula is arbitrary, and represents the maximum number of characters to be found after the final forward slash (/) in the original text. Adjust to suit your use case.

Post navigation

Previous Post:

How to extract name from email address in Excel

Next Post:

How to get top level domain (TLD) in Excel

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Learn Basic Excel

Ribbon
Workbook
Worksheets
Format Cells
Find & Select
Sort & Filter
Templates
Print
Share
Protect
Keyboard Shortcuts

Categories

  • Charts
  • Data Analysis
  • Data Validation
  • Excel Functions
    • Cube Functions
    • Database Functions
    • Date and Time Functions
    • Engineering Functions
    • Financial Functions
    • Information Functions
    • Logical Functions
    • Lookup and Reference Functions
    • Math and Trig Functions
    • Statistical Functions
    • Text Functions
    • Web Functions
  • Excel VBA
  • Excel Video Tutorials
  • Formatting
  • Grouping
  • Others
  • Manipulating text strings using Left, Mid, Right, Len, Substitute in Excel
  • How to count specific characters in a cell in Excel
  • Clean and reformat telephone numbers using SUBSTITUTE function in Excel
  • Extract word that begins with specific character in Excel
  • Get last name from name with comma — Manipulating NAMES in Excel
  • Convert text to date in Excel
  • Convert decimal hours to Excel time
  • Get first day of month in Excel
  • How to calculate next day of week in Excel
  • DATE function: Description, Usage, Syntax, Examples and Explanation
  • CUMIPMT function: Description, Usage, Syntax, Examples and Explanation
  • IPMT function: Description, Usage, Syntax, Examples and Explanation
  • DISC function: Description, Usage, Syntax, Examples and Explanation
  • Future value vs. Present value examples in Excel
  • DB function: Description, Usage, Syntax, Examples and Explanation
© 2022 xlsoffice . All Right Reserved. | Teal Smiles