+ Reply to Thread
Results 1 to 7 of 7

Empty cells from imported spreadsheet are not recognized as 0's

  1. #1
    Registered User
    Join Date
    05-12-2016
    Location
    Germany
    MS-Off Ver
    2010
    Posts
    6

    Angry Empty cells from imported spreadsheet are not recognized as 0's

    I imported a bunch of data from a DB and have encountered a Problem...

    I have written a fairly simple formula: =IF(OR(B3>=60;C3>=60;D3>=60);TRUE;FALSE) which searches three cells and Returns a true if there is a number >=60 otherwise it should return a false.

    In the spreadsheet with the DB data, blank cells are being read as nothing and returning a true. When I open a new workbook and try the formula, the empty cells are being read as a 0 and the formula works flawlessly. I have checked the cell formatting and they look identical to me.

    Any suggestions??
    Thanks!

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,411

    Re: Empty cells from imported spreadsheet are not recognized as 0's

    Try using LEN to check the length of the data. Could be a non-printing character like CHAR(160)
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,411

    Re: Empty cells from imported spreadsheet are not recognized as 0's

    And, if you can, post a sample workbook that demonstrates the problem. You can clear everything except the cells under discussion.

  4. #4
    Registered User
    Join Date
    05-12-2016
    Location
    Germany
    MS-Off Ver
    2010
    Posts
    6

    Re: Empty cells from imported spreadsheet are not recognized as 0's

    Here is the sample workbook.
    Attached Files Attached Files
    Last edited by Kyle18; 05-25-2016 at 10:00 AM.

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,411

    Re: Empty cells from imported spreadsheet are not recognized as 0's

    Interestingly, if you use LEN to check the length of the data, it returns 0. However, if you use ISBLANK(...), it returns FALSE. Odd.

    Must be something to do with the way the data is output.

    Anyway, you can use this short macro to clean the data:

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    05-12-2016
    Location
    Germany
    MS-Off Ver
    2010
    Posts
    6

    Re: Empty cells from imported spreadsheet are not recognized as 0's

    Thanks TMS!

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,411

    Re: Empty cells from imported spreadsheet are not recognized as 0's

    You're welcome. Thanks for the rep.

+ 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. Comparing dates as IF condition (empty cell not recognized)
    By v2ikevaal in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-12-2015, 09:24 AM
  2. Imported datanot always going into correct cells on spreadsheet
    By MicroMac in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-27-2013, 09:33 AM
  3. Empty cells but still being being recognized by my "last column" check
    By chemeng1T4 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-22-2012, 12:25 PM
  4. Imported contacts not recognized.
    By L_ter in forum Outlook Formatting & Functions
    Replies: 1
    Last Post: 04-13-2009, 06:39 AM
  5. How do I count cells in spreadsheet that are not empty?
    By Paul in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-11-2005, 03:05 PM
  6. macro to colour empty cells (cells not recognized as empty)
    By Gerben in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-30-2005, 11:05 AM

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