Function Problems

How to Extract Barcode Data into Excel Without VBA

John WilsonJohn Wilson Nov 4, 2026 869 views

Question details

The user needs to extract specific data segments such as product digits, expiration dates, and lot numbers from a barcode text string in Excel without relying on VBA macros.

How to Extract Barcode Data into Excel Without VBA
Product
Excel
Device & OS
iPadOS
Scenario
Parsing specific information from a scanned barcode string using built-in formulas to ensure full compatibility on an iPad.
Observed behavior
Needs to isolate specific segments of a long numeric barcode string into separate columns, but VBA is unsupported on the target iPad device.
Before you start

Before applying formulas, ensure your barcode image has been scanned or converted into a plain text string using an OCR tool or a hardware barcode scanner.

Solution 1Recommended

Extract Barcode Data Using MID and RIGHT Functions

Use standard Excel text functions like MID and RIGHT to slice the barcode text into specific components without needing VBA macros.

By utilizing built-in text functions, you can reliably extract characters from any position in a text string. Because this relies entirely on standard formulas, it works seamlessly on devices like the iPad where VBA macros are not supported.

1
Insert Barcode Text

Convert the barcode image to text using a hardware scanner, OneNote, or an OCR app. Paste the resulting numeric string (e.g., 0105414734205575717230731107636514) into cell A1.

2
Extract Product Digits

To extract the 14-digit product number that appears after the first two characters, click on the target cell and enter the formula =MID(A1,3,14).

3
Extract Expiration Date

To extract the 6-digit expiration date, select the next cell and enter the formula =MID(A1,19,6). This pulls 6 characters starting from the 19th position.

4
Extract Lot Number

To extract the 7-digit lot number at the very end of the barcode, click a new cell and enter =RIGHT(A1,7).

Extract Barcode Data Using MID and RIGHT Functions
iPad Compatibility: Because this method uses standard built-in functions instead of VBA macros, it works flawlessly on Excel for iPad and WPS Office for iOS.
Powerful Spreadsheet Alternative

Effortlessly Manage Barcode Data with WPS Spreadsheet

WPS Office provides robust built-in text functions like MID, LEFT, and RIGHT that are perfectly compatible with Microsoft Excel formulas. It's fully functional on mobile devices including iPads, making data extraction seamless on the go.

  1. 1. Open WPS Spreadsheet: Launch WPS Spreadsheet on your iPad or PC and create a new blank workbook.
  2. 2. Input Barcode Data: Enter or scan your raw barcode text strings into column A of your worksheet.
  3. 3. Apply Text Formulas: Type the =MID() and =RIGHT() formulas into the adjacent columns to dynamically extract your required digits.
  4. 4. Save and Share: Save the file seamlessly in .xlsx format to ensure universal compatibility with other Office users.
100% compatible with Microsoft Excel formats (.xlsx)Cross-platform support for iPad, iOS, Android, Mac, and WindowsLightweight application with fast load timesAdvanced text parsing and data extraction capabilities without VBA
QA img-9

Frequently Asked Questions

Why can't I use VBA to extract barcode data on an iPad?

VBA (Visual Basic for Applications) is a desktop-only feature in Microsoft Excel and is not supported on mobile operating systems like iPadOS or iOS. You must use standard formulas to manipulate data on mobile devices.

How do I get the text from a barcode image into my spreadsheet?

You can use a hardware barcode scanner connected to your device, a mobile barcode scanning app, or an OCR (Optical Character Recognition) tool like OneNote to capture the text from the barcode image and paste it directly into a cell.

Can I use the LEFT function for barcode extraction?

Yes, if the specific data you need is located at the very beginning of the barcode string, you can use the =LEFT(cell, number_of_characters) function to extract it efficiently.

What if the lengths of my barcode segments vary?

If your barcode segments vary in length, simple MID or RIGHT functions won't be enough. You will need to use delimiter-based extraction by nesting SEARCH() or FIND() functions inside your MID() functions, or utilize the Text to Columns feature.