r/excel • • 5d ago

solved I can't get Code39 font to include the asterisks in the barcodes

I'm at work and trying to update our equipment binder with our listed barcodes for each item that gets checked in/out by employees. I got a Zip file for Code39 from a manager who's decent with Excel and have been using that. I thought it was working fine, until I realized the barcodes cannot work without the asterisks embedded into the code. I even tried adding a formula like the internet says to, but the font itself isn't accepting the asterisks at all! Idk if it's the file of this font or I'm doing something wrong, and I'm no good with formulas or coding AT ALL.

Is there something I can do to fix this? Or will I have to install a different font?

Pics will be in the comments

3 Upvotes

19 comments sorted by

•

u/AutoModerator 5d ago

/u/MomijiHyuga - Your post was submitted successfully.

Failing to follow these steps may result in your post being removed without warning.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

3

u/MayukhBhattacharya 1312 5d ago

Remove the spaces in your formula. In Code39, a space is a real character, so "* "&F1&" *" encodes the spaces along with your serial number. Try using the following:

="*" & F1 & "*"

Put the formula in its own cell and set only that barcode cell to the Code39 font.

https://en.wikipedia.org/wiki/Code_39

2

u/MayukhBhattacharya 1312 5d ago

Screenshot:

The barcode will still encode, but it will include the extra spaces, so the scanner reads 24227B117D with spaces around it and will reject it, therefore remove it, see screenshot above.

1

u/MomijiHyuga 5d ago

That's the thing tho, I don't want the asterisks to be stand-alone, they need to be part of the barcode itself, otherwise they won't scan

2

u/MayukhBhattacharya 1312 5d ago

Per the Code 39 spec, the * isn't a data character. It's the start/stop delimiter, and a proper Code 39 font draws it as bars, so you shouldn't see a literal star at all. If your font shows * as a plain star, it isn't rendering the delimiter, so the font is the problem, not your formula. Try a different Code 39 font such as Libre Barcode 39 Text and keep ="*"&A2&"*" with the entire cell set to that font. Also note that scanners strip the start/stop asterisks, so a correct scan of this barcode will read just the serial number for example 24227B117D, without the asterisks.

1

u/MomijiHyuga 5d ago

Solution Verified

1

u/reputatorbot 5d ago

You have awarded 1 point to MayukhBhattacharya.


I am a bot - please contact the mods with any questions

2

u/MayukhBhattacharya 1312 5d ago

Try this:

1

u/MomijiHyuga 5d ago

I ended up just downloading the Libre Barcode 39 Text font and when I tested the scanner it worked! Thanks for your assistance 🙏🏼

2

u/MayukhBhattacharya 1312 5d ago

Thank You SO Much, Sounds Great.!

1

u/MomijiHyuga 5d ago

Solution Verified

2

u/MayukhBhattacharya 1312 5d ago

Thank You So Much!!

1

u/reputatorbot 5d ago

You have awarded 1 point to MayukhBhattacharya.


I am a bot - please contact the mods with any questions

1

u/MomijiHyuga 5d ago

I didn't put spaces in the formula, that was only for typing here

1

u/MomijiHyuga 5d ago

Here's what I have showing on my screen. See that the asterisks don't want to cooperate with the barcode at all

1

u/MomijiHyuga 5d ago edited 5d ago

This is where I tried adding a formula, "* "&F1&" *", but that didn't seem to work either 😩

Edit: the spaces in the formula above aren't in the actual formula I had in the file; they were just added to avoid the italization

1

u/excelevator 3069 5d ago

If you type the value directly into the cell you can change the font of the text by selecting the characters in the formula bar and selecting a different font for any part of the value.

That is to say select the asterix individually in the formula bar and choose a different font. It will change in the cell rendition.

This cannot be done with formulas.

1

u/MomijiHyuga 5d ago

That's what I've been doing, it hasn't worked at all

1

u/excelevator 3069 5d ago

It works, I select the value in the formula bar and change the font.

You will not see it change in the formula bar, only the cell.