return value contained in cell within ""

AJohn01

New Member
Joined
Jun 27, 2012
Messages
10
I have an excel spreadsheet that contains a description column that has cells that contain numbers within ""
eg
Signal Mast @ 243.968 - R/R/ML/SG - 2002 Galv Tube - "244/12"</SPAN>

<TBODY>
</TBODY><COLGROUP><COL></COLGROUP>
I need to get a formula that extracts the numbers within the "" or if none return value of NIL

the cells are not consistant in length & some cells do not contain any ""
Thanks in anticipation ...
Anne
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Hello and welcome
Would this work for you?

Excel 2010
AB
1Signal Mast @ 243.968 - R/R/ML/SG - 2002 Galv Tube - "244/12"244/12
Sheet5
Cell Formulas
RangeFormula
B1=SUBSTITUTE(TRIM(RIGHT(SUBSTITUTE(TRIM(A1)," ",REPT(" ",99)),99)),"""","")
 
Upvote 0
Correction:

Excel 2010
AB
1Signal Mast @ 243.968 - R/R/ML/SG - 2002 Galv Tube - "244/12"244/12
2Signal Mast @ 243.968 - R/R/ML/SG - 2002 Galv Tube - 33444
Sheet5
Cell Formulas
RangeFormula
B1=IF(LEN(A1)-LEN(SUBSTITUTE(A1,"""",""))>0,SUBSTITUTE(TRIM(RIGHT(SUBSTITUTE(TRIM(A1)," ",REPT(" ",99)),99)),"""",""),"")
 
Upvote 0
Hello and welcome
Would this work for you?
Excel 2010
AB
1Signal Mast @ 243.968 - R/R/ML/SG - 2002 Galv Tube - "244/12"244/12

<COLGROUP><COL style="BACKGROUND-COLOR: #dae7f5"><COL><COL></COLGROUP><THEAD>
</THEAD><TBODY>
</TBODY>
Sheet5

Worksheet Formulas
CellFormula
B1=SUBSTITUTE(TRIM(RIGHT(SUBSTITUTE(TRIM(A1)," ",REPT(" ",99)),99)),"""","")

<THEAD>
</THEAD><TBODY>
</TBODY>

<TBODY>
</TBODY>
[=SUBSTITUTE(TRIM(RIGHT(SUBSITIUTE(TRIM(A25),"",REPT("",99)),99)),"""","") gives me an error message #NAME? what can you see wrong, I put spaces between the " " and it still gave the error??
thanks Anne]
 
Upvote 0
The only instances where it doesnt work on the sheet is when the data is "4,6" - Disused and it returns the word Disused instead of the 4,6
Guessing its because the comma is inbetween the numbers???
Anne
 
Upvote 0
Hi Robert,
I think when there is a comma seperating it then says Disused if its a / then its in operation...

Signal - Wire Operated-Electrically Lit</SPAN>
Signal Mast @ 244.795 - L/R/SG - 2002 Galv Tube - "244/32"</SPAN>
Signal Mast @ 267.589 - R/R/SG - 1982 Galv Tube - "214/12"</SPAN>
Signal Portal @ 264.660 - Over 2SG+BG - 1930 Ms/lattice - "4, 6" - Disused</SPAN>
Signal Portal @ 264.833 - Over SG+BG - 1930 Ms/lattice - "9, 11" - Disused</SPAN>

<TBODY>
</TBODY><COLGROUP><COL></COLGROUP>
 
Upvote 0
Sheet1

*AB
1Signal - Wire Operated-Electrically Lit*
2Signal Mast @ 244.795 - L/R/SG - 2002 Galv Tube - "244/32"244/32
3Signal Mast @ 267.589 - R/R/SG - 1982 Galv Tube - "214/12"214/12
4Signal Portal @ 264.660 - Over 2SG+BG - 1930 Ms/lattice - "4, 6" - Disused4, 6
5Signal Portal @ 264.833 - Over SG+BG - 1930 Ms/lattice - "9, 11" - Disused9, 11

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

Spreadsheet Formulas
CellFormula
B1=IF(COUNTIF(A1,"*""*")=0,"",LEFT(MID(SUBSTITUTE(A1,"""","~",2),FIND("""",SUBSTITUTE(A1,"""","~",2))+1,40),FIND("~",MID(SUBSTITUTE(A1,"""","~",2),FIND("""",SUBSTITUTE(A1,"""","~",2))+2,40))))

<tbody>
</tbody>

<tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4
 
Upvote 0

Forum statistics

Threads
1,214,403
Messages
6,119,308
Members
448,886
Latest member
GBCTeacher

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