+ Reply to Thread
Results 1 to 14 of 14

Empty Cells apparently have spaces

  1. #1
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Angry Empty Cells apparently have spaces

    I have an access database (2010) that I feed quite often with a saved import excel spreadsheet (a lot of confidential data). The import contains over 98 columns. The data is appended to previous data. The excel spreadsheet contains a lot of formulas that pull data together for a final import sheet. Because of the original source for the data I have 6 different reports I have to pull and I place the results on 6 different worksheets that I then combine into a sheet and a final import sheet. So the combine sheet contains formulas like =IF(VLOOKUP($A3,'MDD3'!$A:$AD,AY$1,FALSE)="","",(VLOOKUP($A3,'MDD3'!$A:$AD,AY$1,FALSE))) then the final sheet (IMPORT) has =combined!AY3 - both actual formulas pointing to the same info.

    Now the problem. I found that when I go to pull a field from my access database where the column is not null I get all the data returned - nulls and not null. When I paste the results into excel nothing appears in those "blank" cells, no spaces or anything i can find. If I point Code to the cell that appears blank it returns #VALUE. If I put a space in it I get 32 so I know it appears empty. I need to make these that appear blank to be truly blank. I know that I could create a table in either excel or access where I remove those that appear blank and create a version where they are truly blank then link them to the event number and do an update query but this would require that I have to do something like this every time I upload another data set and would need something like this for many of the columns.

    Is there an upate query I could use that would find the blanks and actually make them null?

    I have attached the results of one of the access output in excel. Maybe this will help.
    Attached Files Attached Files
    Last edited by Sam Capricci; 02-26-2015 at 11:08 AM.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,879

    Re: Empty Cells apparently have spaces

    Why paste the results into Excel. Why not export the results to an excel file.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Empty Cells apparently have spaces

    Hey Sambo Kid,

    The problem in Access between Null, Blanks and Missing data always confused me. I finally realized this is confusing for lots of people. That is why they have in access the

    NZ() function that changes Null to Zero.

    Read these two sites for more help:
    http://allenbrowne.com/vba-NothingEmpty.html
    http://www.techonthenet.com/access/f...dvanced/nz.php
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Empty Cells apparently have spaces

    So to answer Alan's issue, see attached. (not sure what difference it makes but since you asked and BTW, I never did it that way before).
    Attached Files Attached Files

  5. #5
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Empty Cells apparently have spaces

    So Marvin, I read both links, the first seems to clarify differences between empty, missing, nothing or null but it doesn't really help me get to the results I need for my output. And I have no experience with VBA. The second link seems like it holds out the most promise but when I follow the query example at the bottom it still produces the same results that I showed in post #4.
    here is the SQL code...
    SELECT [New PRISM].[File ID], Nz([New PRISM]![Equipment Brand Name],'not found') AS Expr1
    FROM [New PRISM];
    And, please don't confuse me showing the SQL code with the possibility I could write SQL code.
    If I can get that or something like it to work, I believe I will be using it quite a lot as it seems very promising.

  6. #6
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,879

    Re: Empty Cells apparently have spaces

    Sambo
    I am confused. When I apply formulas to Column B of your examples, I am unable to get #VALUE returned as you indicated in post 1. It acts as if it is an empty cell. Perhaps I am not understanding your issue.

  7. #7
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Empty Cells apparently have spaces

    Alan, when in access I apply the query, give me all the equipment brand names for all the events that are not blank (not null) I get back the whole list that I showed you in the excel export from access (SQL below for query)...
    SELECT [New PRISM].[File ID], [New PRISM].[Equipment Brand Name]
    FROM [New PRISM]
    WHERE ((([New PRISM].[Equipment Brand Name]) Is Not Null));

    and if i rewrite it to be...
    SELECT [New PRISM].[File ID], [New PRISM].[Equipment Brand Name]
    FROM [New PRISM]
    WHERE ((([New PRISM].[Equipment Brand Name]) Is Null));

    it returns nothing.
    If you click in cell B1 of the query1 spreadsheet export and (as I do a lot) hold down control/shift and the down arrow, it acts like it is all filled with data instead of jumping down to row 271 for example where the first value shows up (across from file ID 507).
    So I am trying to get a query that will treat the blanks as null and when I want to pull out the equipment that is tagged to an event (file id) I only want the list with something in it and not all 12812 rows most of which have no data in them.

    AND, if you click on any cell in col B that seems to have nothing in it, hit delete, then go back to the top of that column and repeat the shift control down arrow trick it will jump to that cell then jump past it acting like something was actually in it.
    Last edited by Sam Capricci; 02-27-2015 at 11:03 AM. Reason: further clarification

  8. #8
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,879

    Re: Empty Cells apparently have spaces

    Much clearer Sambo. Can you sanitize your data base and upload it for analysis and experimentation. We will only need a sample of the data and not the whole database. Make sure to dummy up any confidential data. Run a Compact and Repair before uploading. You will have to zip the file as this forum does not allow uploading of Access files.

  9. #9
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Empty Cells apparently have spaces

    Alan, that would take a while to do. I'm not at work now so I will have to work on it Monday . Thanks for sticking with this.

  10. #10
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,879

    Re: Empty Cells apparently have spaces

    No issues. Will look for it on Monday. Have a great weekend.

  11. #11
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Empty Cells apparently have spaces

    I'm getting an error trying to upload the file. It says that it is an invalid file. It is a .accdb access database 932kb in size. Thoughts?

  12. #12
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Empty Cells apparently have spaces

    trying again, this time zipping it...
    Attached Files Attached Files

  13. #13
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Empty Cells apparently have spaces

    Hi Sambo kid,

    After re-reading your posts, there is an easy way to convert the SQL statement to what we like in Excel.
    Here is my sql statement

    Please Login or Register  to view this content.
    Copy the above SQL statement into the window buffer using Ctrl C.
    Then create a new query and right click on the new Query TAB and select "SQL View"

    Paste the above string into the upper portion of the Design Query box.

    Right Click on the Query Tab again and select "Design View".

    I think this is the Update Query you are looking to run to make all those "blanks" Nulls.

  14. #14
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Empty Cells apparently have spaces

    WOW! That did it. Thanks Marvin, you deserve the forum guru title.

+ 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. [SOLVED] sheet1 row with spaces between cells, pulled to sheet2 column with no spaces between cells
    By chestersneakers7 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-18-2013, 05:56 PM
  2. remove empty spaces in data
    By kisboros in forum Excel General
    Replies: 8
    Last Post: 02-13-2013, 12:06 AM
  3. Can anyone stop my charts plotting apparently blank cells?
    By willneal in forum Excel Charting & Pivots
    Replies: 12
    Last Post: 08-07-2009, 09:12 AM
  4. [SOLVED] Two apparently identical cells in excel fail an equality test,Y?
    By shane in forum Excel General
    Replies: 1
    Last Post: 08-04-2006, 03:20 PM
  5. deleting empty spaces
    By vrijbergen in forum Excel General
    Replies: 1
    Last Post: 10-03-2005, 08:05 PM

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