+ Reply to Thread
Results 1 to 3 of 3

How to Control Cell Formatting on Imported (CSV) Data

  1. #1
    Registered User
    Join Date
    12-13-2020
    Location
    Houston, TX
    MS-Off Ver
    Auto-updated
    Posts
    1

    How to Control Cell Formatting on Imported (CSV) Data

    I discovered a very useful "Library" app (Libib) which is very simple and easy to use to catalog a modest collection of books. My question is this... Some of the older books (pre-1967) had one less digit than the original ISBN standard, so a leading zero was added to create the new ISBN number. When I export the data to Excel, the leading zero is discarded, except for a very few older books that had a single alpha character added to the (right) end. The leading zero is in the CSV export file, how can I prevent Excel from removing it - I tried changing the cell format but it appears that the zero was already removed when the file was opened by Excel. The problem is that if I try to look up a book w/o the leading zero, the database can't fine it - the leading zero is a significant digit and, if it is corrupted on export, this impacts proper identification of quite a few older books.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: How to Control Cell Formatting on Imported (CSV) Data

    Have you considered adding a helper column, adding the leading zero there, then using that for the search?

    Should be a (relatively) simple matter to test for length, then add the 0 if the length is less that the required amount.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Contributor
    Join Date
    08-26-2016
    Location
    UK
    MS-Off Ver
    O365
    Posts
    260

    Re: How to Control Cell Formatting on Imported (CSV) Data

    Try formatting the desination cells as Text before importing the csv file.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Formatting Imported Data Help
    By rmeadow8 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-07-2020, 01:18 PM
  2. Imported Data Formatting Issue
    By mwhite18 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-10-2016, 02:51 PM
  3. Formatting Imported Data After a Refresh
    By ctrapper in forum Excel General
    Replies: 0
    Last Post: 01-04-2013, 11:39 AM
  4. [SOLVED] need vba formatting help!!! this is imported data that needs to be re-formatted!!!
    By julienaas in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 08-27-2012, 03:08 PM
  5. Formatting imported data
    By Jsb in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 03-26-2006, 06:55 PM
  6. Formatting web imported data correctly
    By Bob Smith in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 12-23-2005, 11:15 AM
  7. Replies: 1
    Last Post: 03-02-2005, 05:06 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1