If cell contains

billandrew

Well-known Member
Joined
Mar 9, 2014
Messages
743
Good morning

Wondering if it is conceivable to search if a cell contains "PO" "PO1", "PO3" up to possibly "PO8" in a string and return the data on the left which will be separated by a space.

Ex.


Northwest 654 PO1 ID236

The "PO" is not in the same position in all cells.

Thank you
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
You didn't say what should be returned if "PO" is not found in the cell. This suggestion returns nothing in that case.
If this is not what you need please give 5-10 samples of data and the expected results. You make it hard if we have to guess from one example only.

=IFERROR(LEFT(A1,FIND(" PO",A1)-1),"")
 
Upvote 0

Forum statistics

Threads
1,216,105
Messages
6,128,859
Members
449,472
Latest member
ebc9

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