Extract a number from a long Cell

shlomek12

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


[TABLE="width: 1142"]
<tbody>[TR]
[TD="class: xl65, width: 1142"][TABLE="width: 1142"]
<tbody>[TR]
[TD="class: xl65, width: 1142"][TABLE="width: 1142"]
<tbody>[TR]
[TD="class: xl65, width: 1142"]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:[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
<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:>[/TD]
[/TR]
</tbody>[/TABLE]
p8s3dj


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

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
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:
Upvote 0
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
 
Upvote 0
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
 
Upvote 0
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)
 
Upvote 0

Forum statistics

Threads
1,223,958
Messages
6,175,636
Members
452,662
Latest member
Aman1997

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