Extract data within 1 cell

faizee

Board Regular
Joined
Jan 28, 2009
Messages
213
Office Version
  1. 2016
Platform
  1. Windows
Hi all
I have this data in one cell "L/L Helvatica font 2mg Vit (2ddd)"


1. i just want to exact "Helvatica" , first 3+1 letter space is fixed. i mean before the helvatica 4 letter space will be always there.


2. i want the data within first two spaces "Helvatica"

Please help
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off

Excel 2010
AB
1L/L Helvatica font 2mg Vit (2ddd)"Helvatica
Sheet7
Cell Formulas
RangeFormula
B1=MID(A1,5,FIND(" ",A1,5)-5)
 
Upvote 0
I have this data in one cell "L/L Helvatica font 2mg Vit (2ddd)"

1. i just want to exact "Helvatica" , first 3+1 letter space is fixed. i mean before the helvatica 4 letter space will be always there.

2. i want the data within first two spaces "Helvatica"
Font names can consist of more than one word ("Times New Roman" for example), so if you use a formula that does exactly what you asked for, you will not always get the correct font name from it. Does the word "font" always follow the font name? If so, you could use this formula...

=TRIM(MID(LEFT(A1,SEARCH("font",A1)-1),5,99))
 
Upvote 0
Font names can consist of more than one word ("Times New Roman" for example), so if you use a formula that does exactly what you asked for, you will not always get the correct font name from it. Does the word "font" always follow the font name? If so, you could use this formula...=TRIM(MID(LEFT(A1,SEARCH("font",A1)-1),5,99))
Thank you for both of.youBut I could not.describe my query clearly.My data in one could be any, likeMy name is faizeehis class is fiveSo I want to exact the word between first two space, likeMy name is faizee -----> "name"His class is five ------> "class"
 
Upvote 0
Sheet2

*AB
1L/L Helvatica font 2mg Vit (2ddd)Helvatica
2My name is faizeename
3his class is fiveclass

<colgroup><col style="font-weight:bold; width:30px; "><col style="width:213px;"><col style="width:64px;"></colgroup><tbody>
</tbody>

Spreadsheet Formulas
CellFormula
B1=MID(SUBSTITUTE(SUBSTITUTE(A1," ","#",1)," ","^",1),FIND("#",SUBSTITUTE(SUBSTITUTE(A1," ","#",1)," ","^",1))+1,FIND("^",SUBSTITUTE(SUBSTITUTE(A1," ","#",1)," ","^",1))-FIND("#",SUBSTITUTE(SUBSTITUTE(A1," ","#",1)," ","^",1))-1)
B2=MID(SUBSTITUTE(SUBSTITUTE(A2," ","#",1)," ","^",1),FIND("#",SUBSTITUTE(SUBSTITUTE(A2," ","#",1)," ","^",1))+1,FIND("^",SUBSTITUTE(SUBSTITUTE(A2," ","#",1)," ","^",1))-FIND("#",SUBSTITUTE(SUBSTITUTE(A2," ","#",1)," ","^",1))-1)
B3=MID(SUBSTITUTE(SUBSTITUTE(A3," ","#",1)," ","^",1),FIND("#",SUBSTITUTE(SUBSTITUTE(A3," ","#",1)," ","^",1))+1,FIND("^",SUBSTITUTE(SUBSTITUTE(A3," ","#",1)," ","^",1))-FIND("#",SUBSTITUTE(SUBSTITUTE(A3," ","#",1)," ","^",1))-1)

<tbody>
</tbody>

<tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4
 
Upvote 0
Thank you for both of.youBut I could not.describe my query clearly.My data in one could be any, likeMy name is faizeehis class is fiveSo I want to exact the word between first two space, likeMy name is faizee -----> "name"His class is five ------> "class"
This formula will do that...

=TRIM(MID(SUBSTITUTE(A1," ",REPT(" ",500)),501,500))
 
Last edited:
Upvote 0
Thank you both of you
Rick Rothstein formula worked 100%
but
njimack also worked. but gives error when there are only two values in a cell

Rick, can you please also tell me the formula, if i need the values. after first space and before third space,
means two words,
for L/L Helvatica font 2mg Vit (2ddd),, the result should be "Helvatica font"
and for My name is faizee, the result should be "name is"

 
Upvote 0
Hi,

Simply change the final 500 to 1000 in the formula provided.

Regards
 
Upvote 0

Forum statistics

Threads
1,215,059
Messages
6,122,918
Members
449,094
Latest member
teemeren

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