Custom Text Formula Columns

leewayn1

New Member
Joined
Jul 14, 2016
Messages
11
Hello all,

I am new to Power Query and was wondering if there was a similar Power Query syntax/formula as excel.

I have the following string of information:

Jon.Mathan (312345) » Video (893481) » Gallery (1239814)
Dog.day (251654) » video_preroll (23918475)
MobileApps (new ad unit) (45917839) » en-CA (2938754) » news (1924785)

I want to get the middle text from each of these so I get

Video
video_preroll
en-CA

I also want to get the end text:

Gallery
"blank"
news

I used the following two formulas in excel to complete:

=IFERROR(TRIM(LEFT(REPLACE(B2,1,FIND("» ",B2),""),FIND("(",REPLACE(B2,1,FIND("» ",B2),""))-1)),0)
=IFERROR(TRIM(LEFT(REPLACE(B2,1,FIND("|",SUBSTITUTE(B2,"» ","|",2)),""),FIND("(",REPLACE(B2,1,FIND("|",SUBSTITUTE(B2,"» ","|",2)),""))-1)),"")

Is there an equivalent Power Query formula I can use in the "Add Custom Column"?

Thanks!
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

Forum statistics

Threads
1,216,101
Messages
6,128,841
Members
449,471
Latest member
lachbee

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