How to extract video id from url

Some videos you may like

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.

Scott T

Well-known Member
Joined
Dec 14, 2016
Messages
2,616
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Try
Code:
=RIGHT(A1,LEN(A1)-SEARCH("=",A1))
 

Nayasoch

Board Regular
Joined
Sep 9, 2016
Messages
73
It extract whole text after =
which i s
rOG_bHqknTk&list=PLCfCFkNhhqbuX_NpY0n3tbIFHOWjwcjrJ

<colgroup><col width="104"></colgroup><tbody>
</tbody>

but video id is only
rOG_bHqknTk
 

Scott T

Well-known Member
Joined
Dec 14, 2016
Messages
2,616
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
When you data differs like this please give multiple examples of your data so the person helping can take the variations into account.

<b></b><table cellpadding="2.5px" rules="all" style=";background-color: rgb(255,255,255);border: 1px solid;border-collapse: collapse; border-color: rgb(187,187,187)"><colgroup><col width="25px" style="background-color: rgb(218,231,245)" /><col /><col /></colgroup><thead><tr style=" background-color: rgb(218,231,245);text-align: center;color: rgb(22,17,32)"><th></th><th>A</th><th>B</th></tr></thead><tbody><tr ><td style="color: rgb(22,17,32);text-align: center;">1</td><td style=";">https://www.youtube.com/watch?v=Hc7BjYmn9z0</td><td style=";">Hc7BjYmn9z0</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">2</td><td style=";">https://www.youtube.com/watch?v=rOG_bHqknTk&list=PLCfCFkNhhqbuX_NpY0n3tbIFHOWjwcjrJ</td><td style=";">rOG_bHqknTk</td></tr></tbody></table><p style="width:4.8em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid rgb(187,187,187);border-top:none;text-align: center;background-color: rgb(218,231,245);color: rgb(22,17,32)">Sheet2</p><br /><br /><table width="85%" cellpadding="2.5px" rules="all" style=";border: 2px solid black;border-collapse:collapse;padding: 0.4em;background-color: rgb(255,255,255)" ><tr><td style="padding:6px" ><b>Worksheet Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: rgb(255,255,255);border-collapse: collapse; border-color: rgb(187,187,187)"><thead><tr style=" background-color: rgb(218,231,245);color: rgb(22,17,32)"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: rgb(218,231,245);color: rgb(22,17,32)">B1</th><td style="text-align:left">=IF(<font color="Blue">ISERROR(<font color="Red">SEARCH(<font color="Green">"&",A1</font>)</font>),RIGHT(<font color="Red">A1,LEN(<font color="Green">A1</font>)-SEARCH(<font color="Green">"=",A1</font>)</font>),MID(<font color="Red">A1,SEARCH(<font color="Green">"=",A1</font>)+1,SEARCH(<font color="Green">"&",A1</font>)-(<font color="Green">SEARCH(<font color="Purple">"=",A1</font>)+1</font>)</font>)</font>)</td></tr><tr><th width="10px" style=" background-color: rgb(218,231,245);color: rgb(22,17,32)">B2</th><td style="text-align:left">=IF(<font color="Blue">ISERROR(<font color="Red">SEARCH(<font color="Green">"&",A2</font>)</font>),RIGHT(<font color="Red">A2,LEN(<font color="Green">A2</font>)-SEARCH(<font color="Green">"=",A2</font>)</font>),MID(<font color="Red">A2,SEARCH(<font color="Green">"=",A2</font>)+1,SEARCH(<font color="Green">"&",A2</font>)-(<font color="Green">SEARCH(<font color="Purple">"=",A2</font>)+1</font>)</font>)</font>)</td></tr></tbody></table></td></tr></table><br />
 

Nayasoch

Board Regular
Joined
Sep 9, 2016
Messages
73
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.
 

Watch MrExcel Video

Forum statistics

Threads
1,123,489
Messages
5,601,982
Members
414,489
Latest member
Xlambda

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
Top