Skip to content
Free Excel Tutorials
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Data Analysis

  • Reverse List in Excel
  • How To Perform and Interpret Regression Analysis in Excel
  • Get column name from index in Excel Table
  • Excel Line Chart
  • Understanding Pivot Tables in Excel

References

  • How to use Excel MMULT Function
  • Merge tables with VLOOKUP in Excel
  • How to get last row in text data in Excel
  • Get nth match with INDEX / MATCH in Excel
  • Excel Advanced Lookup using Index and Match Functions

Data Validations

  • Prevent invalid data entering in specific cells
  • Excel Data validation allow weekday only
  • Excel Data validation must not contain
  • Excel Data validation require unique number
  • Excel Data validation number multiple 100

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 create email address with name and domain 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 remove trailing slash from url 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 count line breaks in cell in Excel worksheet

Next Post:

How to count total words in a cell 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

Logical Functions

  • Invoice status with nested if in Excel
  • NOT function: Description, Usage, Syntax, Examples and Explanation
  • OR function Examples in Excel
  • IFERROR function: Description, Usage, Syntax, Examples and Explanation
  • How to use Excel AND Function

Date Time

  • Generate series of dates by weekends in Excel
  • WORKDAY function: Description, Usage, Syntax, Examples and Explanation
  • Get first day of month in Excel
  • Get last working day in month in Excel
  • WEEKDAY function: Description, Usage, Syntax, Examples and Explanation

Grouping

  • Categorize text with keywords in Excel
  • Group times into unequal buckets in Excel
  • Calculate conditional mode with criteria in Excel
  • How to randomly assign people to groups in Excel
  • Group times into 3 hour buckets in Excel

General

  • Creating and Opening an existing file in Excel
  • How to add sequential row numbers to a set of data in Excel
  • How to calculate percent of students absent in Excel
  • Lock Cells in a Worksheet Excel
  • How to get original price from percentage discount in Excel
© 2023 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning