Extract a number from a long Cell

shlomek12

Board Regular
Joined
Aug 2, 2011
Messages
231
This is the data in my cell:


ANUZ2B2KI2XTG;ANUZ2B2KI2XTG;23.93+0=23.93;Me;26.12;Ig:r#5:A20AY8YZ1X41HY;A20AY8YZ1X41HY;23.96+0=23.96;Me;26.12;Ig:r#5:>A2FATTUNY7ADJL;A2FATTUNY7ADJL;23.99+0=23.99;Me;26.12;Ig:r#5:

<tbody>
</tbody>

<tbody>
</tbody>
<anuz2b2ki2xtg;anuz2b2ki2xtg;23.93+0=23.93;me;26.12;ig:r#5:><a20ay8yz1x41hy;a20ay8yz1x41hy;23.96+0=23.96;me;26.12;ig:r#5:><a2fattuny7adjl;a2fattuny7adjl;23.99+0=23.99;me;26.12;ig:r#5:></a2fattuny7adjl;a2fattuny7adjl;23.99+0=23.99;me;26.12;ig:r#5:></a20ay8yz1x41hy;a20ay8yz1x41hy;23.96+0=23.96;me;26.12;ig:r#5:></anuz2b2ki2xtg;anuz2b2ki2xtg;23.93+0=23.93;me;26.12;ig:r#5:>

<tbody>
</tbody>


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

JugglerJAF

Active Member
Joined
Feb 17, 2002
Messages
264
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
Joined
Jan 26, 2015
Messages
517
Office Version
2016
Platform
Windows
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
Joined
May 26, 2009
Messages
16,645
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
Joined
Apr 18, 2011
Messages
35,431
Office Version
2010
Platform
Windows
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)
 

Forum statistics

Threads
1,078,467
Messages
5,340,495
Members
399,378
Latest member
voodoo1

Some videos you may like

This Week's Hot Topics

  • Problem with Radio Button's format control
    I am creating an employee evaluation template (a sample is below) Column A is the category Column B, C D, E and F will be ratings (unacceptable...
  • Last Display on userform to a Listbox
    [CODE=vba] lstdisplay.ColumnCount = 15 lstdisplay.RowSource = "A1:O600000" [/CODE] So when i do this it Displays everything on the sheet i am...
  • Rename and move files to a new location
    Dear all, I have an excel file with the following information. The actual file name is at column A but i want to rename it using the following...
  • Help with True/False Formula
    Hello! Am stumped how to fix this formula, in which my result returns 'True', but it should return False. =IF(AG2=True...
  • Clear extra characters from a provided range of cells
    Dear All, I have following code which gives me desired output to remove extra characters from a provided range. But it takes too much time when...
  • Help with Current and highest streaks
    Hi there, I've just joined the forum and this is my first post. I've already spent quite a bit of time searching the net and this forum for a...
Top