How do I remove unknown leading character from bar code scanner input

gudnitram

New Member
Joined
Dec 28, 2020
Messages
4
Office Version
  1. 365
Platform
  1. MacOS
Using a barcode scanner to input data into excel (365 on Mac). Any barcode (numeric, alpha numeric) that I scan to excel adds two leading characters that I can only describe as a lowercase 99 when the cell is selected for input (see photo 1) and then changes to a double question mark when cell is deselected (photo 2). This seems to be an excel setting and not the bar code scanner settings as I can scan into other programs i.e. Word and Chrome and the barcodes scan in exactly as I would expect with no extra characters. I know I can use a formula to remove the characters, but I am often times adding data to many different files I get from others, and would prefer not to have to add the formula in every single time, plus I know it works as others in my company have the same devices/setup with no issues, driving me nuts! Thanks!

photo 1.png

photo 2.png
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Would
Excel Formula:
=CLEAN(ScannedCode)
work?
 
Upvote 0
Sounds more like the scanner isn't configured correctly, do you get the same result using another scanner?
 
Upvote 0
What does the formula
VBA Code:
=CODE(A1)
return when you change the A1 to a cell reference containing the barcode?
 
Upvote 0
What happens if you run the macro below after changing the range to match yours. Make sure that you test on a copy of your data.
VBA Code:
Sub removeSQ()
    Range("A1:A100).Replace Chr(95), "", xlPart
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

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