Extract a number from a long Cell

shlomek12

Board Regular
This is the data in my cell:

<tbody>
</tbody>

<tbody>
</tbody>

<tbody>
</tbody>

I am trying to extract the first number which is “23.93” from the cell

Last edited:

JugglerJAF

Active Member
A quick and dirty way of doing this (assuminng all your data has exactly the same layout/structure in each cell) would be to use text to columns.

Specify semicolon AND + as the delimiters. Skip the first two columns and then delete all other columns to the right of the one that now contains the value you want 23.93

If this doesn't work for all of your data, you'll need to provide more examples (specifically for any rows that don't work using the quick method above).

[edited to change two steps of TTC to one step)

Last edited:

BlakeSkate

Well-known Member
in order for there to be a clean cut way to do this you need to provide some sort of pattern that your data has
i.e

if this number always appears after the second set of semicolons, etc

JoeMo

MrExcel MVP
Assuming the number you want always appears immediately after the 2nd semicolon, and immediately before the first +
Try (change cell reference to suit):
Code:
``=MID(SUBSTITUTE(A1,";","@",2),SEARCH("@",SUBSTITUTE(A1,";","@",2))+1,SEARCH("+",SUBSTITUTE(A1,";","@",2))-SEARCH("@",SUBSTITUTE(A1,";","@",2))-1)+0``

Rick Rothstein

MrExcel MVP
Assuming the number you want always appears immediately after the 2nd semicolon, and immediately before the first +
Using your assumptions, this shorter formula should also work...

=0+MID(LEFT(A1,FIND("+",A1)-1),FIND(";",A1,FIND(";",A1)+1)+1,99)

1,082,282
Messages
5,364,225
Members
400,787
Latest member
bs04c

This Week's Hot Topics

• populate from drop list with multiple tables
Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
• Find list of words from sheet2 in sheet1 before a comma and extract text vba
Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
• Dynamic Formula entry - VBA code sought
Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...