Help with imported data from ERP system - issues with leading zeros, text to date


New Member
Aug 2, 2013
I just started at a new company and am having issues using the information I have pulled from our ERP system (SyteLine, which uses a SQL back end) into excel. The problem is the formatting of our sku's... there is no common part number format across all of our product lines. Some start with letters and some start with numbers. The length varies from 1 to 30 characters. Some of the SKU's have leading zeros and the sku "000001" is a different part than "001". In addition to letters and numbers, the following special characters are also in some of the SKUs:
. periods
- hyphen
_ underscore
() parenthesis
/ forward slash
, comma
: colon
& ampersand

I need to figure out a way to setup the data so that I can use it... When I straight import the data, it shows up exactly like it does in the ERP system.. but then I get a "#N/A" error if I try to do a VLOOKUP function against it. Whatever the solution, it needs to be formula based as I'm not going to go through 110,000 SKU's to manually change each one.

I have tried using 'Text to Columns', but that does not effectively work. I have tried using various other tactics, but they either end up eliminating the leading zeros or they end up converting some of the numbers (e.g. 2-1271) to a date format.

Please help! (Thank you!) :)


New Member
Aug 2, 2013
Sorry for follow-up post...

To make things more complicated... Our ERP database is connected (ODBC, i think) to an Access database. I then use the "Get External Data" function to import data from Access. [Enterprise security prevents a direct connection to the ERP's SQL database]

Every time I open the excel workbook that has this data table, it refreshes (which is important) - and any manual formatting is lost :(

Unfortunately, whatever solution we come up with would either have to be dynamic OR would need to be a change to the way I use the VLOOKUP function to pull information from this spreadsheet.

Forum statistics

Latest member

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...