How to extract video id from url

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Try
Code:
=RIGHT(A1,LEN(A1)-SEARCH("=",A1))
 
Upvote 0
It extract whole text after =
which i s
[TABLE="width: 104"]
<colgroup><col width="104"></colgroup><tbody>[TR]
[TD="width: 104"]rOG_bHqknTk&list=PLCfCFkNhhqbuX_NpY0n3tbIFHOWjwcjrJ
[/TD]
[/TR]
</tbody>[/TABLE]

but video id is only
rOG_bHqknTk
 
Upvote 0
When you data differs like this please give multiple examples of your data so the person helping can take the variations into account.


Book1
AB
1https://www.youtube.com/watch?v=Hc7BjYmn9z0Hc7BjYmn9z0
2https://www.youtube.com/watch?v=rOG_bHqknTk&list=PLCfCFkNhhqbuX_NpY0n3tbIFHOWjwcjrJrOG_bHqknTk
Sheet2
Cell Formulas
RangeFormula
B1=IF(ISERROR(SEARCH("&",A1)),RIGHT(A1,LEN(A1)-SEARCH("=",A1)),MID(A1,SEARCH("=",A1)+1,SEARCH("&",A1)-(SEARCH("=",A1)+1)))
B2=IF(ISERROR(SEARCH("&",A2)),RIGHT(A2,LEN(A2)-SEARCH("=",A2)),MID(A2,SEARCH("=",A2)+1,SEARCH("&",A2)-(SEARCH("=",A2)+1)))
 
Upvote 0
Thank you Colonel..it'll work. Since many of videos url I"m taking from playlist for which second solution will work and few of them I pick url from separate ..for which first will work. I'd be glad if there is any working formula for both condition in same line but If it's not possible then it is also a great help for me. Thanks again.
 
Upvote 0

Forum statistics

Threads
1,223,952
Messages
6,175,596
Members
452,657
Latest member
giadungthienduyen

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