Space sign not recognised?

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
I cannot view files/images from my current location (those sites are blocked via corporate security policy).
However, can you post the rest of your pertinent code? It is important to see how "comment_original" is being set.
And can you just an example or two of data that is not working properly?
And where is the data coming from? Data that comes from the internet or other programs often has "special" characters in it, like non-breaking spaces which are not treated the same as the regular spaces we are used to.
 
Upvote 0
Data that comes from the internet or other programs often has "special" characters in it, like non-breaking spaces which are not treated the same as the regular spaces we are used to.

The data comes into my code via the REST API to Confluence cloud. So your suspicion is right :cool:

Do you have a list of signs that look like " " but aren't, and code that will return TRUE if the sign is one of them? Like:

Code:
Public Function is_this_a_space_of_any_kind(spacesign As String) As Boolean

Thank you for your help!!!
 
Upvote 0
What I typically do is to try to find out what kind of character we are dealing with. So find an example that is causing problems. Let's say that it is in cell A1, and is something like "B dog", and it is the second character. You can find out what that second character is with this formula:
Code:
=CODE(MID(A1,2,1))
Normal spaces will return a value of 32.

If yours is something different, look at an ASCII table and see what it is: http://www.asciitable.com/

A non-breaking space is ASCII character 160.
 
Upvote 0
What I typically do is to try to find out what kind of character we are dealing with. So find an example that is causing problems. Let's say that it is in cell A1, and is something like "B dog", and it is the second character. You can find out what that second character is with this formula:
Code:
=CODE(MID(A1,2,1))
Normal spaces will return a value of 32.

If yours is something different, look at an ASCII table and see what it is: http://www.asciitable.com/

A non-breaking space is ASCII character 160.

Thanks for great advise!

BW Peter
 
Upvote 0
So were you able to sort your problem with that information, or do you still need help in devising a solution?
 
Upvote 0
Yes, I had exactly the answer I needed; it was the text
Data that comes from the internet or other programs often has "special" characters in it
that just gave me the right idea. Thank you!
 
Upvote 0

Forum statistics

Threads
1,215,521
Messages
6,125,303
Members
449,218
Latest member
Excel Master

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