+ Reply to Thread
Results 1 to 7 of 7

NULLs and empty strings

  1. #1
    Registered User
    Join Date
    05-17-2010
    Location
    london, england
    MS-Off Ver
    Excel 2007
    Posts
    3

    Question NULLs and empty strings

    Hi All,

    In Excel 2007, how can I search all cells in all worksheets in a spreadsheet for an empty string, and replace each occurence with a NULL?

    I want to do this in Excel - not programatically.

    Really hope someone can help.

    Thanks,

    T.

  2. #2
    Registered User
    Join Date
    05-31-2007
    Posts
    16

    Re: NULLs and empty strings

    You can use the build in "Find and Replace" function.

    1) Press Ctrl+H
    2) Expand the options (press the options button)
    3) Change the "within" from Sheet to "Workbook"
    4) Set the Find to be whatever you want to find
    5) and the replace to whatever you want the find to become

    That should do it.

  3. #3
    Registered User
    Join Date
    05-17-2010
    Location
    london, england
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: NULLs and empty strings

    ...but what do I enter in Find for empty string?
    And what do I enter in Replace for NULL?

  4. #4
    Registered User
    Join Date
    05-31-2007
    Posts
    16

    Re: NULLs and empty strings

    Don't put anything in the find field.

    I'm a bit confused what you mean by "NULL"? The string "NULL" or nothing. Wouldn't an empty string and null be the same thing then? Or do you mean an empty string as in " " (a space) and you want to remove the spaces.

    Perhaps you can post a sample of data so we can get an idea.

  5. #5
    Registered User
    Join Date
    05-17-2010
    Location
    london, england
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: NULLs and empty strings

    I definately mean NULL as in nothing, not string "NULL" - i.e. I want ISBLANK() on the cell to return TRUE. Currently I have cells which appear empty, but for which ISBLANK() returns FALSE. If I then hit delete on that cell, ISBLANK() will return TRUE. But I want to clean the whole spreadsheet similarly in as few steps as possible. Any ideas..??

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: NULLs and empty strings

    Enter this formula referencing one of those "empty" cells

    =CODE(A1) where A1 contains the "empty" string...

    what does that return?
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  7. #7
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: NULLs and empty strings

    Search for "" (that's two double quotes)
    Entia non sunt multiplicanda sine necessitate

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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