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
 

Some videos you may like

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.

GraH

Well-known Member
Joined
Mar 22, 2020
Messages
702
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Would
Excel Formula:
=CLEAN(ScannedCode)
work?
 

MARK858

MrExcel MVP
Joined
Nov 12, 2010
Messages
13,850
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
  2. Mobile
Sounds more like the scanner isn't configured correctly, do you get the same result using another scanner?
 

gudnitram

New Member
Joined
Dec 28, 2020
Messages
4
Office Version
  1. 365
Platform
  1. MacOS

ADVERTISEMENT

Sounds more like the scanner isn't configured correctly, do you get the same result using another scanner?
Yes, same result with another scanner from a coworker.
 

MARK858

MrExcel MVP
Joined
Nov 12, 2010
Messages
13,850
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
  2. Mobile
What does the formula
VBA Code:
=CODE(A1)
return when you change the A1 to a cell reference containing the barcode?
 

MARK858

MrExcel MVP
Joined
Nov 12, 2010
Messages
13,850
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
  2. Mobile
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
 

Watch MrExcel Video

Forum statistics

Threads
1,122,753
Messages
5,597,925
Members
414,191
Latest member
debbhatta

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
Top