Extracrting string from cell - still getting error

rangequestion

Board Regular
Joined
Nov 21, 2016
Messages
62
Hi,

I have multiple rows where my cells look something like this: "+USD 17,286.24" or "-USD 40,918.66" . I just want to extract the number and I'm using this formula:
=RIGHT(F9,(FIND(" ",F9,1)-1))
which works on every other cell I have except where the format reads like my examples above.

Any ideas?
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Maybe this?
Code:
=RIGHT(F9,LEN(F9)-(FIND(" ",F9,1)))
 
Upvote 0
I do not.
Where exactly are you getting this data from?
I suspect maybe the web or another program, and you are dealing with some special characters that are messing things up for you.
What does it say the length of those entries is, i.e.
Code:
=LEN(F9)
 
Upvote 0
What does this return?
=FIND(" ",F9)
 
Upvote 0
Nothing...argh.... Sample data below pasted directly from spreadsheet

[TABLE="width: 221"]
<tbody>[TR]
[TD]+USD 17,286.24[/TD]
[/TR]
[TR]
[TD]+USD 40,918.66[/TD]
[/TR]
[TR]
[TD]+USD 1,938,014.40[/TD]
[/TR]
[TR]
[TD]+USD 26,025.08[/TD]
[/TR]
[TR]
[TD]+USD 1,284.98[/TD]
[/TR]
</tbody><colgroup><col></colgroup>[/TABLE]
 
Upvote 0
What does this return?
Code:
=CODE(MID(F9,5,1))

Edit: checking the for same things that Fluff is. The fact that your answer to him is "nothing", that means you are not dealing with normal spaces here (so you cannot find one).

The code I gave you above will tell you what are dealing with, as it will return the ASCII code of the character in that place.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,175
Members
453,021
Latest member
Justyna P

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