Posts Tagged ‘tables’

h1

Word: Number of rows and/or columns in a table

November 12, 2012

Jeff wanted to know how to find out how many rows he had in a very long table in his Word document. Word Count doesn’t tell you — it tells you how many lines in the document, but each cell (except one) in a table is treated as a ‘line’ for Word Count purposes.

You can find out how many rows (and/or columns) there are in an individual table by checking the table properties. Here’s how:

  1. Select the entire table. This selects all rows and columns.
  2. Right-click on the selected table and select Table Properties from the shortcut menu.
  3. Click on the Row tab — the number of rows selected is listed at the top of the dialog box.
  4. Click on the Column tab — the number of columns selected is listed at the top of the dialog box.
  5. Click Cancel to close the Table Properties dialog box.

NOTE 1: If you now select another table to check its number of rows and columns, you may find that when the Table Dialog box opens to the last-viewed tab (Row or Columns, no numbers are displayed. Just go back to the Table tab, then click the Row or Column tab again and the number will display.

NOTE 2: Merged cells are mostly treated as though the rows and columns existed as they did when the table was first created. However, if you’ve merged all the cells from several adjacent rows, the row count will reduce.

h1

Fixing some table of contents update issues

June 20, 2012

(adapted from a ‘Writing Tip’ email I recently sent to work colleagues [Word 2007 environment])

***************

Bottom line: Before releasing your document, turn off Track Changes then update the Table of Contents, List of Tables, and List of Figures so that they reflect the current headings, captions, and page numbers.

Some recent questions from my authors have related to updating the Table of Contents (TOC), List of Tables (LOT), and List of Figures (LOF), common things that can go wrong when doing so, and how to fix them.

1. Why does my Table of Contents look a mess?

In this example, the TOC entries are all in red and there’s a change bar to the right of the TOC. There’s also a deleted TOC below the inserted TOC. How did it get like this? You had Track Changes turned on when you updated the TOC.

To fix it, turn off Track Changes (Review tab), then update the TOC again (see below for how).

That’s it! Super easy with an immediate reduction in stress related to things going wrong with your document just before your deadline ;-)

2. Why aren’t the things I’ve added, changed or deleted reflected in the TOC/LOT/LOF?

The second issue relates to why the new tables/figures, sections etc. that you’ve added to the document aren’t appearing in the TOC/LOT/LOF, or why your changes or deletions aren’t reflected in the TOC/LOT/LOF. Typically, the reason is that you’ve forgotten to update the TOC/LOT/LOF – these lists don’t update automatically. There are several ways you can update these lists, but the safest way that seems to work properly every time, is to use the ‘Update Table’ buttons on the References tab in Word.

To update a TOC:

  1. Turn off Track Changes.
  2. Click anywhere inside the TOC.
  3. Go to the References tab.
  4. Go to the far left of that tab, and click the Update Table button in the Table of Contents group.
  5. If asked, select the option to Update entire table and click OK.

To update a LOT:

  1. Turn off Track Changes.
  2. Click anywhere inside the List of Tables.
  3. Go to the References tab.
  4. Go to the middle of that tab, and click the Update Table button in the Captions group.
  5. If asked, select the option to Update entire table and click OK.

To update a LOF: Same procedure as for updating a LOT, but for step 2, you click anywhere inside the List of Figures first.

3. Why aren’t all my tables/figures listed even though I’ve updated the lists using the methods above?

This issue invariably relates to Track Changes. If you’ve inserted or deleted a table or figure, then it’s possible that the table or figure caption won’t get listed in the LOT/LOF. Dealing with the table/figure Track Changes by accepting/rejecting them usually sorts this out. After accepting/rejecting the change, update the LOT/LOF and all should be well again. I haven’t found any other way of solving this one.

4. I get an ‘Error! Reference not found’ message in the TOC/LOT/LOF instead of a page number.

I’m not sure what causes this, but turning off Track Changes and updating the TOC/LOT/LOF should fix it.

h1

Word: Table borders don’t hold

February 28, 2012

I got a Word 2007 document to edit the other day from one of my colleagues. As per our house style, it had a table of terms in it. However, instead of using the borderless table in the template, the author had inserted their own table, which had dashed borders.

Easy enough to fix — just set the ‘No borders’ attribute to the table. And that seemed to work, until I had to add new rows at the end of the table for extra terms I found in the document. Each new row I added had a gray horizontal internal border. I could get rid of it by reapplying the ‘No borders’ setting, but that border came back as I added more and more rows. I tried all sorts of things to get rid of it, including putting the table in a new doc then bringing it back in to the original doc. Nothing worked.

Added to my dilemma was the first row, which was in bold text. I removed the bold, but when I copied the table back in from the clean document I’d put it into, the first row was bolded again. There was no special style applied to this row, and if I added a row above it, the words I put into that new row were bolded too (and the words in the second row reverted to normal text). So something was affecting that first row and making it bold, and something was affecting the new rows too by adding a visible border to them.

The solution to both problems was easy! The author had applied a table design style to the table. Even though I’d manually removed the borders and unbolded the bolded text, the design they’d selected was still applied to new rows.

The author had applied a design to the table

To fix it, I only had to clear the check boxes on the left — there was no benefit in applying a different design as the issues wouldn’t go away with a new design.

These check boxes were affecting the first row and all new rows

Once I’d cleared the check boxes for Header Row, Banded Rows, and First Column [(1) in the screen shot above], the design changed to (2), and all the issues I was having disappeared.

h1

Word: Insert a tab in a table cell

September 13, 2011

This is something I learned YEARS ago, but based on the documents I get to edit, not everyone knows how to insert a tab into a table cell.

It’s really very easy — instead of pressing the Tab key as you would in a normal paragraph, you press Ctrl+Tab.

h1

Word: Macros to delete all tables and figures

June 23, 2011

I have NO idea why you might want to do this, but figured I’d share these two macros — one is to delete all tables, and the other is to delete all figures from a Word document.

The macro to delete all tables is from Allen Wyatt’s Word VBA Guidebook (http://store.tips.net/T010353_Word_VBA_Guidebook_Table_of_Contents.html); the one to delete all figures was one I created based on the tables one. However, it wasn’t easy! Unlike tables (Table object), figures aren’t under normal words like ‘figure’, ‘picture’, ‘photo’, ‘diagram’, or ‘image’ — no, they are part of the InlineShape object! That bit of information took some time to find.

Please use with caution — these macros WILL delete every table or figure, except those in your document’s headers and footers.

Macro to delete all tables in a document

Sub TablesDeleteAll()
    Dim tbl As Table
    For Each tbl In ActiveDocument.Tables
        tbl.Delete
    Next tbl
End Sub

Macro to delete all figures in a document

Sub FiguresDeleteAll()
    Dim fig As InlineShape
    For Each fig In ActiveDocument.InlineShapes
        fig.Delete
    Next fig
End Sub

[Links last checked June 2011]

h1

Word: Pasting a row into a table doesn’t keep the column widths

October 21, 2010

Problem

You have a Word table with several rows. You cut a row from the table and paste it into another position within the same table. The column widths don’t ‘honor’ the widths of the original row.

You figure out you can get around it by any of these methods:

  • split the table, resize the column widths, then join the table back together again
  • convert the table to text, then convert it back to a table again
  • drag the columns to lock them into the previously established positions
  • insert a blank row into the main table, then copy/paste the content from the cut row into the table cells.

But all of these solutions are painfully tedious and time-consuming. You should ask my husband just how painful — he had this problem and I heard him complain long and loud in frustration (he works with Word tables ALL the time)!

Solution

Check your Smart Cut and Paste settings and make sure the Adjust table formatting and alignment on paste check box is selected.

  1. Check the Smart cut and paste settings:
    • Word 2003: On the menu, go to Tools > Options. Click the Edit tab.
    • Word 2007: Click the Office button, then Word Options. Click Advanced in the left panel and scroll down to the Cut, copy and paste section.
  2. Make sure the Smart cut and paste check box is selected.
  3. Click the Settings button next to that check box.
  4. Make sure the Adjust table formatting and alignment on paste check box.
  5. Click OK to exit both windows.

Word 2003 window; the Word 2007 selections are the same, but the window is different

h1

Word: Header row won’t repeat revisited

October 8, 2010

I was trying to get the header row to repeat on a large and long table in a client’s Word document. But no matter what I did, it just wouldn’t repeat on the next and subsequent pages. I looked for a selected paragraph mark above it, but there was nothing there.

Then I selected a later row in the table to change its properties and noticed that the Header row repeat check box was checked, but dimmed/grayed out. Hmmm… I checked more rows — they all had the Header row repeat check box selected but dimmed out.

So on a whim I selected the entire table, went to Table Properties > Row tab and found that the Header row repeat check box was still selected but now it was clickable. Aha! I cleared that check box and clicked OK.

Then I selected just the header row and reapplied the Header row repeat to it. Now it worked!

Someone, somewhere, sometime had applied Header row repeat to the entire table and that’s why the real header row would not repeat on the subsequent pages. An easy fix — once I figured it out.

See also:

[Links last checked October 2010]