Special Character(Question Mark enclosed within a box)

ayoungs

New Member
Joined
Jul 6, 2012
Messages
8
I haven't been able to figure this one out yet. I have searched many forum posts but cannot find the answer. I did not create the spreadsheet I am currently working on so I have formatting from PDFs and the internet jumbled into one. I am working on a vba routine to parse my text fields and format them the way I want. The question mark enclosed in a box has shown up so I tried a variety of Characters (10,12,13). I then pasted this character from B1 to B255 with the following formula next to it:

=SUBSTITUTE(B1,CHAR(ROW(A1)),"999")

This worked on none of the rows. I also printed out all of the characters with =CHAR(ROW(A1)), and the character looks exactly like char(12) on my spreadsheet, but that doesn't work to replace it. Has anyone experienced this? From most forum posts I've seen, it seems that clean would get rid of the character (not what I want because this question mark seems to be in place of a bullet). However, clean does not work on this character which means it must be printable. Other posts said char(13) would work as it was a carriage return, but it did not work for me. Any help is greatly appreciated.
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Does the font in the output cell match the font from the input?

Char(10) looks like an empty box in Arial but a box with a question mark in Calibri.
 
Upvote 0
Does the font in the output cell match the font from the input?

Char(10) looks like an empty box in Arial but a box with a question mark in Calibri.


I hadn't thought about that, but it turns out all fonts are Calibri, so I guess that's not the case.
 
Upvote 0
Try using the CODE function to figure out which character it is. CODE only works for the first character in a cell, but if you've already copied it by itself to B1, then in C1, the following formula SHOULD give you the ASCII code for it:
Code:
=CODE(B1)
 
Upvote 0
I've tried that but it returns 63 for a question mark. I'm not really sure why. It doesn't recognize it as chr(63) when I search for it.
 
Upvote 0
Have you tried copying the character to the Find/Replace dialog? Sometimes that works when nothing else seems to work. Put the problem character in "Find what", and leave "Replace with" blank.
 
Upvote 0
In excel I just tried copying and pasting the symbol into my substitute function and that worked, but when I try doing that into vba, I get '??'. So then I decided to read that cell into VBA. It works but now takes twice as long because it flips between sheets(I have the question mark on a separate ref sheet). It's not a very elegant workaround.
 
Upvote 0
Thanks. I checked out that post and found it may be unicode 0xDBC0. How can I use this in my vba routine?
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,173
Members
451,543
Latest member
cesymcox

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