Help Extracting Text from Cell after last "/"

maximillianrg

Board Regular
Joined
Aug 7, 2014
Messages
74
Office Version
  1. 2016
Platform
  1. Windows
Hello Excel Masters

I'm writing to ask for help in creating a formula that will locate the last "/" in cell A1 and return all the text following the final "/" as shown below.


A1 = https://drive.google.com/drive/folders/1Lamt3zl4JR_6_-5x653edXt1oY7t6HbX'
B1 = 1Lamt3zl4JR_6_-5x653edXt1oY7t6HbX

Conditions
- Contents in Cell A1 can vary greatly in length
- The number of "/" in Cell A1 can range from 5-20
 
Last edited by a moderator:

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
How about
Excel Formula:
=TRIM(RIGHT(SUBSTITUTE(A1,"/",REPT(" ",500)),500))
 
Upvote 0
How about
Excel Formula:
=TRIM(RIGHT(SUBSTITUTE(A1,"/",REPT(" ",500)),500))
Hello and Thank you Fluff

That formula worked absolutely perfect for returning the value I I was looking for in my example but after doing a fill down, I wanted to ask if you can help modify it a bit more?

A1 = Google Drive: Sign-in
B1 = 1kFLhrpaNFXwFJU1bNrLZzJF5nbeU5KVA

In some cases A1 may have the contents "?usp=sharing" after the string. Can the formula be modified to also locate and strip out "?usp=sharing" if it exists?
 
Upvote 0
Try
Excel Formula:
=SUBSTITUTE(TRIM(RIGHT(SUBSTITUTE(A1,"/",REPT(" ",500)),500)),"?usp=sharing","")
 
Upvote 0
Solution
That also worked perfectly - Thank you soooooo much Fluff - Have a great weekend!
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,066
Messages
6,122,948
Members
449,095
Latest member
nmaske

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top