+ Reply to Thread
Results 1 to 5 of 5

Importing HTML 'blank' [cells] to a spreadsheet

  1. #1
    Registered User
    Join Date
    01-17-2010
    Location
    London, England
    MS-Off Ver
    Excel 2003, 2007, & 2010 Beta
    Posts
    86

    Importing HTML 'blank' [cells] to a spreadsheet

    Hi,
    I've this spreadsheet that solves Sudoku puzzles, or helps the user to solve them. I would like to copy Sudoku's from websites to the spreadsheet but, when there are blanks, and there will be blanks, they copy over as something or other different (to a blank) in excel; excel thinks the 'blank' cells have 'something' in them. It is not a space character, but the counta function thinks there is something. I have some conditional formatting in the 81 cells saying: if all cells are full [and another test to emphasize that they must be validly full], then colour up all the 81 cells; otherwise don't. But all the blanks. copied in from the website, are getting counted up as well.
    So: how do I convert these 'apparent blanks', pasted in from a website, to actual blanks, in excel?
    I have tried the trim formula, plus another one to say: if it's a number, fine, otherwise, make it a "". No effect.
    Thanks for any help.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Importing HTML 'blank' [cells] to a spreadsheet

    Hi,
    Untested in the absence of the workbook but try the following macro

    Please Login or Register  to view this content.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    01-17-2010
    Location
    London, England
    MS-Off Ver
    Excel 2003, 2007, & 2010 Beta
    Posts
    86

    Re: Importing HTML 'blank' [cells] to a spreadsheet

    Richard, I only saw your reply now, it looks very promising. Could I send you a sample workbook of the problem if need be . . .? (How do I do that?) Thanks,
    Lotusman

  4. #4
    Registered User
    Join Date
    01-17-2010
    Location
    London, England
    MS-Off Ver
    Excel 2003, 2007, & 2010 Beta
    Posts
    86

    Re: Importing HTML 'blank' [cells] to a spreadsheet

    Actually, no need, Richard, to send you the s'sheet I was having trouble with ('blank' cells etc); your solution was 100% what I was looking for. Thanks again.
    LotusMan...

  5. #5
    Forum Expert
    Join Date
    05-01-2014
    Location
    California, US
    MS-Off Ver
    Excel 2010
    Posts
    1,795

    Re: Importing HTML 'blank' [cells] to a spreadsheet

    Quote Originally Posted by lotusman View Post
    I would like to copy Sudoku's from websites to the spreadsheet but, when there are blanks, and there will be blanks, they copy over as something or other different (to a blank) in excel; excel thinks the 'blank' cells have 'something' in them.
    They probably contain nonbreaking spaces (HTML nbsp; ASCII 160). No need for a VBA solution, unless you want to automate the following steps.

    If the Sudoku is in A1:I9, enter the following formula into K1:

    =SUBSTITUTE(A1,CHAR(160),"")

    Copy K1 into K1:S9, then copy K1:S9 and paste-special-value into A1:I9.

    You might keep the formulas in K1:S9 to save some steps the next time that you paste a Sudoku puzzle from HTML into the Excel 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. [SOLVED] Skipping Blank Cells in a HTML Email Body
    By bocaj315 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-24-2013, 04:03 PM
  2. Importing html web data
    By yutz23 in forum Excel General
    Replies: 1
    Last Post: 07-06-2012, 11:55 AM
  3. Importing Selected Cells from Spreadsheet
    By EddieN1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-28-2012, 02:00 AM
  4. Importing html docs
    By analystman in forum Excel General
    Replies: 0
    Last Post: 07-12-2011, 05:33 PM
  5. Importing data, and removing blank cells
    By pauls in forum Excel General
    Replies: 5
    Last Post: 03-05-2009, 03:54 PM
  6. Replies: 3
    Last Post: 01-26-2007, 10:30 PM
  7. Replies: 0
    Last Post: 08-15-2006, 04:00 PM
  8. Importing HTML File
    By gunny1979 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-23-2006, 04:54 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