Simulate Shift+Tab in Excel for Barcodes

Cook09 used Ask the Experts™
Would like to know if there is a way to enter Shift+Tab into a cell, so that a 3 of 9 barcode can be created? Attached is a spreadsheet where the apparent ASCII codes (Char) were entered...but as can be seen, it doesn't produce a clean barcode.  Is there another solution?
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Sorry, what do you expect to happen when [SHIFT]+[TAB] is used?

Perhaps you can mock-up what your expectation is in another attachment.


It is not apparent if one doesn't have a barcode font installed. The attached file has an image of each barcode, when the 3of9 font is installed.  The expectation is to have C5(6) and D5(6) look like B5(6)
byundtMechanical Engineer
Most Valuable Expert 2013
Top Expert 2013
The 3 of 9 font on my computer (IDAutomationHC39M) does not have barcode-like glyphs for every ASCII code. I suspect the same thing is true for the font you are using.

To see the glyphs available in your font, please change the font for cell A1 in the attached workbook, then click the command button.
HTML5 and CSS3 Fundamentals

Build a website from the ground up by first learning the fundamentals of HTML5 and CSS3, the two popular programming languages used to present content online. HTML deals with fonts, colors, graphics, and hyperlinks, while CSS describes how HTML elements are to be displayed.

The standard Code 39 ("3 of 9") repertoire defines 44 characters: 26 upper-case alphabetics, 10 digits, space character, stop/start character, 6 punctuation symbols.
It does not include any control-code characters.

The extended Code 39 repertoire adds lower-case alphabetic characters, additional punctuation symbols, and control-code characters - but you'd require a font which provides glyphs for all of these extra characters.

But (for a valid Code 39 bar-code) these additional characters have to be encoded as two characters; for example:

o; should be encoded as +O/Z
t<HT>y should be encoded as +T$I+Y

See for a description & longer explanation.

Note also that horizontal tab (commonly referred to as Tab or <Tab> or <HT>) is a control-code character (so it is present in the extended ASCII repertoire).
But Shift is not a control-code character; it is a modifier which affects the interpretation of the following key; as such, it is not represented by a character in the extended-ASCII repertoire (or any standard repertoire, as far as I'm aware).


Thanks for the information and spreadsheet...they really provided some insight. Looks like another option may be needed. Appreciate you assistance with this.
To correct an error in my previous post; where I stated:

"you'd require a font which provides glyphs for all of these extra characters"

This not true, since the extended repertoire uses the same font characters as the non-extended mode, but encodes all of the additional characters (and some of the original punctuation ones as well) using pairs of characters from the standard repertoire.

To use Code 39 extended, you'd have to be able to switch the scanner into extended mode, since there is no way to determine the mode from the bar-code - you'll just get different values depending on whether the scanner is assuming standard mode or extended mode.


Thanks for the additional information.  Now all I have to do is figure out how to use the Symbol LS2208 in extended mode, and how that would be different than regular mode. However, from what I understand, even if figured out, I still would not be able to the Shift key in conjunction with the Tab that correct?

>> ... I still would not be able to the Shift key in conjunction with the Tab that correct?

The Shift key is not associated with a character code - it merely modifies the action of other keys (e.g. the 'A' key normally produces the lower-cases character 'a', whilst Shift+A produces upper-case 'A (assuming that Caps-Lock is not set).

So all that you can 'record' is the character associated with the 'Shift + key' combination.
The 'Tab' key generates the <HT> horizontal tab control-code character; I've no idea what 'Shift + Tab' will produce (if anything different).
I set up a small test using NotePad:

Typed in the characters "abcde" followed by <Tab>, then "pqrst" and <Enter> (for a new line)
Repeated this, but using <Shift> + <Tab> instead.
Saved the file (as a .txt text file).
Examined the file with a hexadecimal editor; this shows that both <Tab> and <Shift> + <Tab> generated the <HT> horizontal tab control-code character (the character with decimal code 9, or hexadecimal 09).

So it seems that the <Shift> key has no effect when paired with the <Tab> key, although this may of course be application-specific?

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial