HOW TO: Work with an HTML Table That Contains Merged Cells in Excel 2000 (275611)



The information in this article applies to:

  • Microsoft Excel 2000

This article was previously published under Q275611

SUMMARY

This article describes how to import a Hypertext Markup Language (HTML) table and unmerge any cells, so that Excel 2000 can filter and sort the data.

Although you can import HTML tables into Excel, many HTML tables use merged cells that prevent Excel from sorting or filtering the data.

back to the top

Open the HTML Page in Excel

To open an HTML page (including tables) in Excel, follow these steps:
  1. Start Excel.
  2. On the File menu, click Open.
  3. In the Files of type list, click Web Pages (*.htm; *.html).
  4. To find your Web page, use the Look In box, or copy and paste the page's Web address in the File name box.
  5. Click Open.
back to the top

Unmerge Any Merged Cells

To unmerge any merged cells and sort the data, follow these steps:
  1. Click any table column header to select the whole column.

    NOTE: Although you may not see any table gridlines, you can still click column letters or row numbers to select an whole column or row.
  2. On the Data menu, click Sort.
  3. In the Sort dialog box, click OK.
  4. If you receive the following error message, click OK:
    This operation requires the merged cells to be identically sized.
  5. If you received the error message in step 4, your worksheet contains merged cells. To unmerge these cells, follow these steps:
    1. Press CTRL+A to select the whole worksheet.
    2. On the Format menu, click Cells, and then click the Alignment tab.
    3. Click to clear the Merge Cells check box (you may have to click two times), and then click OK.
    4. Repeat steps 2 and 3.

      Excel sorts the data as usual.

      NOTE: Excel does not automatically expand the selection to sort all the data on the worksheet. Excel sorts only the data in the selected column unless you specify otherwise.
back to the top

REFERENCES

For more information about merged cells, click Microsoft Excel Help on the Help menu, type split a merged cell into separate cells in the Office Assistant or the Answer Wizard, and then click Search to view the topic.

For additional information about related topics, click the article numbers below to view the articles in the Microsoft Knowledge Base:

210320 XL: Web Page Saved in Excel Displays Differently in Web Browser

211710 XL2000: Cells in a Protected Worksheet May Become Unmerged

For additional information about problems when you open Excel files in Microsoft Internet Explorer, click the article number below to view the article in the Microsoft Knowledge Base:

200704 XL2000: Error Opening Excel File from Internet Explorer Address Bar

back to the top

Modification Type:MajorLast Reviewed:9/25/2003
Keywords:kberrmsg kbHOWTOmaster KB275611