![]() |
return a value of specific text within a sentence
Is there a function for: If a column contains certain text/sentence, return the value of the specific text?
examples: A1: 961-San Francisco Giants 1 -25 962-Arizona Diamondbacks A2: 963-Los Angeles Dodgers 1 PK 964-San Diego Padres A3: 966-New York Yankees 1 L 965-Baltimore Orioles A4: 974-Minnesota Twins 1 +5 973-Chicago White Sox I only want to get: A6: 1 -25 A7: 1 PK A8: 1 L A9: 1 +5 thanks in advance! |
return a value of specific text within a sentence
Hi,
Am Sun, 22 Jun 2014 11:46:06 +0100 schrieb top00001: A1: 961-San Francisco Giants 1 -25 962-Arizona Diamondbacks A2: 963-Los Angeles Dodgers 1 PK 964-San Diego Padres A3: 966-New York Yankees 1 L 965-Baltimore Orioles A4: 974-Minnesota Twins 1 +5 973-Chicago White Sox I only want to get: A6: 1 -25 A7: 1 PK A8: 1 L A9: 1 +5 in A6 try: =MID(A1,FIND(" 1",A1)+1,IF(ISNUMBER(FIND(LEFT(A1,3)+1,A1)),FIND(L EFT(A1,3)+1,A1),FIND(LEFT(A1,3)-1,A1))-FIND(" 1",A1)-2) and copy down Regards Claus B. -- Vista Ultimate / Windows7 Office 2007 Ultimate / 2010 Professional |
All times are GMT +1. The time now is 07:20 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com