Data Input

Put data in a cell? Sure, just click in a cell and type—what else is there to know? Well, there’s the many different Types of Data that Numbers recognizes, how to make sure it knows which you’re entering, and how Text Wrap in Cells works when your cell runneth over.

And then there’s letting Numbers do more of the work for you with Autocomplete and Autofill. You can also do more than just copy and paste data with Copy and Paste; you can leave the cells’ formatting behind if you want, for instance, or paste only the formatting in the new location.

There’s also Numbers’ very Special Data-input Formats that both speed data entry and ensure accuracy: Checkboxes, Star Ratings, Pop-up Menus, and Sliders and Steppers.

Data Entry Basics

To enter data, click a cell to select it and type. This is convenient—you don’t have to click a second time to put the blinking insertion point in the cell before you type, but it can also be dangerous because it’s so easy to mistakenly type over existing data. If you want to edit in a specific spot in a cell that’s not selected, double-click at that spot; the first click selects the cell, and the second one places the insertion point.

Each cell is like a teeny-tiny word processor. This means, for instance, that you can double-click to select a word or drag across characters to select them when you want to edit a selected cell’s contents.

You have to let Numbers know that you’ve finished your input before it can calculate formulas or do its auto-formatting tricks. For that, go to another cell, or press Command-Return to deselect the contents but remain in the current cell.

To erase all data from a cell, select the cell and press Delete. This works for a selected range of cells, too, so you can clear multiple cells with a single keypress. Cell formatting, including text formatting, remains “attached” to the cell; comments are removed.

Types of Data

For a cell that you’ve left with the default Automatic data format setting in the Format Inspector’s Cell pane, Numbers automatically recognizes most data types:

Text Wrap in Cells

When you type too much text in a cell, it wraps inside the confines of the cell, changing the cell’s height as necessary. This is controlled by a setting in the Format Inspector’s Text pane: in the Alignment section, Wrap Text in Cell is checked by default.

As you can see in Figure 42, long words in a narrow cell are broken where necessary, irrespective of proper hyphenation.

**Figure 42:** With text wrap, the text breaks into separate lines in a narrow cell, and words may be broken apart irrespective of syllabification.
Figure 42: With text wrap, the text breaks into separate lines in a narrow cell, and words may be broken apart irrespective of syllabification.

When you turn off Wrap Text in Cell for selected cells and then type too much text, the words continue merrily on their way into the next cell if it’s empty, and even into the following cells if necessary. This is a convenience when you’re creating multi-column headings because you won’t have to merge cells to span the columns. If the next cell is occupied, all the text you type is stored in the first cell, but you won’t see the overflow unless the cell is selected.

Letting text spill over into adjacent cells can be convenient, but there are formatting advantages to merging cells purposely (see Merge and Unmerge Cells) rather than letting the spillover do it for you, as you can see in Figure 43.

**Figure 43:** Left: Original cells. Center: Text “spillover” when text wrap is inactive. Right: Text entered in merged cells, and formatted to be centered over the two columns beneath it.
Figure 43: Left: Original cells. Center: Text “spillover” when text wrap is inactive. Right: Text entered in merged cells, and formatted to be centered over the two columns beneath it.

Autocomplete

To turn on Autocomplete, choose Numbers > Preferences > General and then, under Editing, check Show Suggestions When Editing Table Cells.

This is not the infamous autocorrect that sends messages saying you’ll be late because you haven’t finished eating your kids for lunch. Autocomplete works smoothly and both saves time and ensures accuracy: when you start typing text in a cell, it provides a pop-up of matching contents elsewhere (above or below) in the column (Figure 44).

**Figure 44:** Left: Typing `n` triggers a list of entries beginning with N. Center: While `ne` kept Nebraska and Nevada in the list, with `new`, the list is down to four states. Right: Adding a space and `j` suggests New Jersey; arrow down to New Jersey to see `Jersey` selected in the cell. If you keep typing, it will be overwritten.
Figure 44: Left: Typing n triggers a list of entries beginning with N. Center: While ne kept Nebraska and Nevada in the list, with new, the list is down to four states. Right: Adding a space and j suggests New Jersey; arrow down to New Jersey to see Jersey selected in the cell. If you keep typing, it will be overwritten.

Continue typing to narrow the list—or to make an entirely new entry, of course—or select from the list by clicking the item you want. Or, press the Up and Down arrow keys to move in the list (or Tab to cycle through it) and when your target is highlighted, press Return to place it in the cell.

Autofill

I love autofill—and so will you once you see its versatility. It is, in effect, a smart-copy feature that figures out what to put in cells when you drag the autofill handle from a selected cell, or cells, in any direction. It can simply repeat the same information (handier than you might think), or recognize a pattern and continue it int0 other cells. It’s an incredible timesaver.

To use autofill, select one or more cells (even a complete row or column), hover near the midpoint of any side of the selection, and drag the yellow autofill handle (Figure 45) across the cells you need filled.

**Figure 45:** When you hover near the edge of a selected cell or group of cells, the yellow autofill handle appears at the midpoint.
Figure 45: When you hover near the edge of a selected cell or group of cells, the yellow autofill handle appears at the midpoint.

As an alternative to dragging the autofill handle, you can select the cells where you want the data to go, with the source cell as the first or last cell in the selection, and then use the Table > Autofill Cells submenu, choosing Right, Left, Up, or Down.

Before we move on to details about autofilling, here are some basics to keep in mind:

Start with a Single Cell

When you select only a single cell to start the autofill process, its contents populate the other cells. Whether the cells are filled with identical or altered data depends on what’s in the original cell:

You can do multiple autofills at once. Figure 46 shows the result of selecting cells in a row and autofilling all of them downward.

**Figure 46:** All these columns were autofilled from the top row with a single drag. Note the first two columns were simply copied as is, since they had nothing that indicated a pattern.
Figure 46: All these columns were autofilled from the top row with a single drag. Note the first two columns were simply copied as is, since they had nothing that indicated a pattern.

Start with Multiple Cells

You can use multiple-cell autofill in three ways: to repeat the contents of the selected cells, to define a pattern for a fill, and to override what might otherwise be interpreted as a pattern.

Repeat the Cell Contents

Say you have data that tracks mental acuity stats in the morning and the evening for each person in a study. The people’s names are in a header row, and a subheader row contains the Morning and Evening labels for each person. You can fill in the subheaders for the first person, and then select them and drag the autofill handle to the right to fill in the rest of the row with the pair of labels (Figure 47).

**Figure 47:** Autofilling can start with multiple cells.
Figure 47: Autofilling can start with multiple cells.
Define a Pattern

While certain entries trigger a pattern autofill from a single selected cell, as described previously, you can define all sorts of patterns by creating “sample cells,” and autofilling from them. Two cells can easily define a pattern for autofill:

Figure 48 shows various multiple-cell patterns used as the basis for autofill sequences.

**Figure 48:** For each of these columns, the autofill started with the two shaded cells as the pattern.
Figure 48: For each of these columns, the autofill started with the two shaded cells as the pattern.
Override a Pattern

Say you need multiple rows labeled Sample 1 because the table contains data for every hour of a test. If you start with Sample 1 for an autofill, the number will change for each row. Instead, put Sample 1 in two consecutive cells, select them both, and autofill from there.

Copy and Paste

Copy-and-paste is still, at its heart, a simple procedure: grab something from one place, and clone it to another. But when you deal with more-complicated spreadsheet scenarios, such as a copied grid of cells going to another, perhaps mismatched grid, or copying a single cell with different types of formatting (for the cell, its text, and its data), you must pay attention to many details. Once you learn those details, you’ll have a great deal of flexibility, and fewer surprises, when you’re moving things around.

In Numbers Tables

Basic copy-and-paste operations within or between tables work as expected (except, perhaps, for the part where existing data is overwritten without any warning if you paste on top of it).

All you have to do is select some cells and choose Edit > Copy. Click the cell that you want as the first cell for the pasted data, and then choose Edit > Paste. Here’s what else you should know:

**Figure 49:** Left: A selected (and then copied) block of cells. Right: A selection in the target table and the paste result.
Figure 49: Left: A selected (and then copied) block of cells. Right: A selection in the target table and the paste result.

From (or to) Another App

While it’s fairly straightforward to transfer information from a table in another app to a table in Numbers, you can also paste in text that started in columnar form, with tabs typed between the snippets of information (aka tab-delimited text). (For the purposes of this topic, “table” also means Excel’s window-filling grid.)

Although the following copy-and-paste procedures refer to data coming into Numbers, they generally work in reverse too. Paste a copied swath of cells from a Numbers table into an amicable app, for instance, and you get, depending on the receiving program: the data entered into cells in a spreadsheet or table; a freestanding table made from the copied data; or text separated by tabs and paragraphs.

From a Table

Tables know how to talk to each other when it comes to where pasted information winds up in a Numbers, but when it comes to what—the cell contents—they don’t always speak the same language. And as for cell formats… well, only one other program is fluent in Numbers’ formatting.

Pasting data copied from a table in any of these programs behaves the same as intra-Numbers pastes when it comes to using the correct matrix of cells—even adding rows and columns when necessary—but other paste scenarios have varying mileage:

From Text

Inter-app copy/paste operations follow a simple, standard rule: columns are separated by tabs, and rows are delineated by return/paragraph characters. So, if you copy data that’s separated by tabs and divided into lines (which are actually short paragraphs) from any source, it neatly pastes into a Numbers table.

Insert Copied Rows and Columns

Numbers doesn’t make it easy to move rows or columns with the Cut and Paste commands. The problem is that you can’t actually cut a row or column: select it, choose Edit > Cut, and the cell contents are cut, leaving an empty row or column behind, which you must then explicitly delete. How elegant!

The best way to move a row or column a short distance is to drag it to the new position (see Move Rows and Columns), because the gap left behind automatically closes.

However, when you’re moving a row beyond the displayed area of a table, dragging can be a problem because it’s easy to overshoot your mark. Instead, try this copy-delete-insert procedure:

  1. Select the row (or rows) you want to “move,” and choose Edit > Copy.
  2. With the row(s) still selected, choose Table > Delete Row(s).
  3. Select the row that’s after the desired insertion spot, and choose Insert > Copied Rows.

Numbers inserts the copied row(s) above the selected row.

You can also use Insert > Copied Rows to move copied rows from one table to another. If you do this and the target table has a different number of columns, the outcome is fairly predictable. If you’ve copied a row shorter than the target table’s, a full row is still inserted. If the target table has shorter rows, new columns are added to accommodate the incoming information; this is not necessarily a Bad Thing, but you should keep an eye on what’s happening to the rest of your table setup.

Special Copy and Paste Options

So you want to paste data but not the cell and data styles that come along with it. Or maybe you’d like to paste just the formatting information that you painstakingly developed in another table. Or how about pasting just the formula results? Here’s how to do each:

Special Data-input Formats

Numbers has five special cell-formatting options that can limit the scope of what data can be entered (only numbers from 1 to 10, for instance), as well as speed up data entry. As a bonus, some of these formats provide at-a-glance information; you don’t have to read a number, for example, when you see a string of stars. The formats are:

Checkboxes

Checkboxes are easy to add to a table, and incredibly handy when all you need is to indicate whether a certain condition has been met or not: registered, passed exam, met quota, was present. They let you quickly enter information, and make it easy to scan a column for checked or unchecked boxes.

Set Up Checkboxes

You’d typically add checkboxes to a column that has a header or subheader label describing what the checkboxes stand for—such as the conditions I just mentioned: registered and passed exam.

To set up the checkbox format:

  1. Select the cells. (You can select blank or filled cells; Change Data to Checkboxes, a little ahead, describes what happens if the cells contain data).
  2. Go to the Format Inspector’s Cell pane.
  3. Choose Checkbox from the Data Format pop-up menu.

Numbers puts checkboxes in all the cells. To use the checkbox… well, you know what to do.

Manipulate Checkbox Data

What information does Numbers actually enter when you check or uncheck a box? An unchecked box puts the value FALSE in the cell, while a checked one evaluates to TRUE, as you can see if you look at the Quick Calc bar when a checkbox cell is selected. These are very important values, since they’re used as the basis for IF-statement decisions (described in IF Statements).

To remove a cell’s checkbox formatting, select it and then choose a different format from the Data Format pop-up menu in the Format Inspector’s Cell pane. If you choose Text, you’ll see TRUE and FALSE entries in the cells; choosing Number instead gives you ones (for TRUE) and zeros (for FALSE). As explained in What Is Truth?, these are equivalent values: zeros are false, and non-zero numbers are true.

Change Data to Checkboxes

Numbers can translate your data into checkboxes by following simple rules regarding what a checkbox represents: a zero is unchecked, or false, and any non-zero number (including negative values) is checked, or true. Blank cells are unchecked, the words true and false are predictably translated, and any other text is unaffected (Figure 50). Just select the cells and apply checkbox formatting from the Cell pane.

**Figure 50:** Left: The original data. Right: The data with checkbox formatting applied (including the bottom cell).
Figure 50: Left: The original data. Right: The data with checkbox formatting applied (including the bottom cell).
Change Checkboxes to Data

To translate checkboxes back to “raw” data, select the cells and choose either Number or Text from the Data Format pop-up menu in the Format Inspector’s Cell pane—but don’t expect your original data to be there: you get only ones and zeros in cells formatted for numbers, and TRUE and FALSE for text cells (Figure 51).

**Figure 51:** Left to right: The original data; checkbox formatting applied; checkboxes reformatted as numbers; checkboxes reformatted as text. Note that an empty cell is an unchecked box, which turns to a zero when the checkbox formatting is removed.
Figure 51: Left to right: The original data; checkbox formatting applied; checkboxes reformatted as numbers; checkboxes reformatted as text. Note that an empty cell is an unchecked box, which turns to a zero when the checkbox formatting is removed.
Represent Data with Checkboxes

You can’t always just change a column of data to checkboxes because it’s easier to read; as you’ve just seen, that can change the underlying data in a way that means you can’t recover it. (In the previous figure, for instance, a 14 is changed to a checkbox, and then changed to either a 1 or TRUE.) But you can create a checkbox column that represents data kept safely elsewhere in the table. This two-step procedure first calculates something from the data, and then turns it into checkboxes, leaving the original data unchanged.

Although we haven’t worked with formulas yet in this book (that’s in Fun with Formulas and Functions), this example is quite straightforward, as you can see in Figure 52 and shouldn’t present a problem whether you’re just reading, or trying it:

  1. Type a formula in E2, the first cell in the Dif >= $100 column:
    1. Type the equals sign to open the formula editor.
    2. Click in D2 to enter it in the editor. (The token says Difference Auto rather than D2 because it’s using the labels of the column and row instead of the cell’s column and row coordinates.)
    3. Type >=100 so that the formula is Difference Auto >= 100, and click Accept to close the editor (the >= characters will change to the single ). This may not “feel” like a formula, but it is: it’s comparing two values. You see TRUE in the cell, because the value in D2 (Difference Auto) is over 100. (There’s more about TRUE and FALSE values in What Is Truth?.)
  2. Autofill from E2 down to the bottom of the table (select the cell, hover near the midpoint at the bottom of the selection, and drag the yellow autofill handle).
  3. With the values in column E still selected, go to the Format Inspector’s Cell pane and choose Checkbox from the Data Format pop-up menu.

Numbers changes all the TRUE and FALSE entries to checked and unchecked boxes (Figure 52).

**Figure 52:** The formula calculates which items are more than $100 over budget; the TRUE/FALSE results can be turned into checkboxes.
Figure 52: The formula calculates which items are more than $100 over budget; the TRUE/FALSE results can be turned into checkboxes.

Note that this is a one-time, static translation. If you change the values in the table, they won’t be reflected in the checkbox column; the formula you entered was replaced by the TRUE or FALSE result when you changed the cells to checkboxes. If you add rows to the table, you can’t autofill down the checkboxes—you’ll just be copying the last checked or unchecked box.

If you do translate data to checkboxes like this, and think you might have to re-do it later for updated or added data, preserve the formula before you format the cells for checkboxes:

  1. Double-click in the first cell where you’ve put the formula to open the formula editor.
  2. Press Command-A to select all of the formula; this will ignore the token with the equals sign in it.
  3. Press Command-C to copy the formula.
  4. Press Return to close the formula editor.
  5. Click an empty spot on the sheet to deselect the table.
  6. Press Command-V to paste the formula in a text box (you don’t have to insert a text box first—Numbers creates one to accommodate pasted text when nothing’s selected).

Tuck the text box somewhere on your sheet. Should you ever want to reinstate the formula, you can paste the text into the formula editor.

Use Checkbox Data in Formulas

The data stored by a checkbox is a “logical value” of true or false—a concept discussed in IF Statements and Logical Operators. Sometimes, such as when you want to filter rows for those values, you treat them as text, but most of the time you should let Numbers treat them as the special values they are. You’ll see, for instance, in this next example, that true and false values are represented by tokens in a formula.

If you want a total for a group of checked or unchecked checkboxes, you can do that with the COUNTIF function, which counts the cells in a range that meet certain criteria. In Figure 53, for example, you can see that the formulas in the Present column give the number of cells in a row that are checked by looking for true values, while the formulas in the Absent row add up the checkmarks in columns by counting the false values.

**Figure 53:** Count the number of true values in a row to get how many students were present each day; count the false values in a column to total the absences for each student. (The formulas in the cells each refer to their own rows or columns.)
Figure 53: Count the number of true values in a row to get how many students were present each day; count the false values in a column to total the absences for each student. (The formulas in the cells each refer to their own rows or columns.)

We haven’t fully described formulas yet (that’s in Fun with Formulas and Functions), but don’t worry, because the ones in these examples are simple to enter.

To count checked or unchecked boxes:

Star Ratings

When you need to enter only a limited range of values, clicking is quicker than typing. Star ratings let you represent the numbers zero through five by clicking a dot in a cell that turns it, and the preceding dots, into stars.

Star ratings are easy to set up and use:

**Figure 54:** Left: In this star-rating table, the final column sums the ratings, which are stored simply as numbers. Right: You can make color-coded star ratings that change color based on the number of stars by using conditional highlighting.
Figure 54: Left: In this star-rating table, the final column sums the ratings, which are stored simply as numbers. Right: You can make color-coded star ratings that change color based on the number of stars by using conditional highlighting.

Pop-up Menus

Numbers’ Autocomplete feature makes it easy to enter data that already exists anywhere in a column. But with the Pop-up Menu cell format, you can create a list of up to 250 entries that needn’t already be in the column—and you can do the same for rows, making repetitive horizontal data entry easier. And because then the only way to enter data is choosing from the menu, input is restricted to those items, not only saving time but also decreasing input errors.

Because Pop-up Menu is a cell format, the menu’s existence depends upon its being in a cell; it can’t exist on its own. If you delete all the cells that use a specific menu, you’ll have to create it all over again.

Because you’ll be using existing data to create menus, let’s take a quick look at how table data translates into menu items:

Build a Menu

It’s easy to build a menu when you already have data in some cells that are representative of all the items that you want in your pop-up menu. (If your table has only a small proportion of the items you need in your menu, start with Build a Longer Menu, just ahead; it describes how to add temporary menu data to the table.)

To create a pop-up menu:

  1. Select the cells that contain the information you want in your pop-up menu and the cells where you want the menu to be available (Figure 55), since this procedure both gathers the existing entries and formats the cells for the menus.
    **Figure 55:** Left: The selected data. Center: The menu entries in the Cell pane. Right: The pop-up menu for a formatted cell.
    Figure 55: Left: The selected data. Center: The menu entries in the Cell pane. Right: The pop-up menu for a formatted cell.
  2. Go to the Format Inspector’s Cell pane and choose Pop-up Menu from the Data Format pop-up menu.

    Items in the selected cells appear in the menu list.

  3. Set a starting item (or not). Choose an option from the menu beneath the item list:
    • Start with First Item: With this very restrictive option applied to a cell, once you open that cell’s menu, you can’t leave the cell without a menu item being entered; if you don’t choose something, the first item is entered as you leave the cell. In addition, when you initially format a cell with this option, the first item in the list is automatically placed in the cell. This is a useful when you want a default cell entry, or if you want to put a prompt in a cell by making something like CHOOSE FROM MENU the first menu choice. Otherwise, it’s incredibly annoying, and makes it very easy to mistakenly populate a table with the wrong data.
    • Start with Blank: This is the better choice in most situations. Cells formatted with this kind of menu start out blank, and if you’ve selected something from the menu and want to delete it, the menu provides a None choice that blanks the cell.

That’s it: click in, or move to, any cell you just formatted, and you see the pop-up menu arrow appear, with a None choice at the top of the menu that was triggered by the Start with Blank option.

Build a Longer Menu

Adding more than a few items to a menu list from within the Format Inspector, as I describe just ahead, is tedious at best, but you’ll usually want a full menu before you start your data entry. Here’s how to add temporary data to a column from which you can create a menu list:

  1. Add temporary rows to the table, and in the appropriate column, enter the additional items you want in your menu. Since there will be no entries in the other cells of these rows, they will be easy to identify and delete after you create the menu list.
  2. Sort the table by the column of data that will make your menu list (see Sorting Data), so that the menu will be in alphabetical order.
  3. If you want your menu list mostly alphabetical, with a few specially placed terms, reorder those rows by dragging them into position; this is much easier than moving the items in the menu list later.
  4. Create the pop-up menu as just described in Build a Menu, above.
  5. Delete the rows you added in Step 1; their entries will remain in the menu list. If the rows are dispersed throughout the table, sort by another column (your fake-data rows are blank everywhere except for the menu-data column) to make it easy to delete them as a group.
Edit a Menu List

No matter how carefully you plan, you’ll probably need to edit your menu list eventually: add a new item, get rid of an existing one, reorder the list, correct a misspelling, and so on.

When you edit a menu list, start by selecting the cells that are formatted for the menu. You can’t see the menu list in the Format Inspector unless at least one cell with the menu in it is selected, but if you don’t select them all, you’ll end up with some cells using the old version of the menu, and some using the new. (Combine Menu Lists can help you with that situation.)

With your cells selected, work in the Format Inspector’s Cell pane to:

**Figure 56:** Select an item to edit it.
Figure 56: Select an item to edit it.
**Figure 57:** Drag to reorder items in the menu list.
Figure 57: Drag to reorder items in the menu list.
Combine Menu Lists

If you set up a column with pop-up menus, and then carelessly edit a menu list without selecting all the cells first—and maybe even do it more than once so that you have several different menus in the column—you don’t have to start again:

  1. Select all the cells in the column that you want to standardize to a single menu.
  2. In the Format Inspector’s Cell pane, click the Merge Menu Items button that appears in the Data Format section beneath the menu where you selected Pop-up Menu. (If there’s no Merge Menu Items button, then all the selected cells already have the same menu.)

You’ll probably want to fine-tune the combined list. Numbers filters out duplicates, but things you deleted from one version of the menu will reappear in the combined version, or you may have what are essentially duplicates (“Egg allergy” and “Egg allergies”). You also may need to reorder the list.

Work with Pop-up Menu Cells

When you go to a cell with a pop-up menu, a tab with a menu arrow in it appears to the right of the cell; click it to pop open the menu, and choose an item. You can also:

Sliders and Steppers

When you have cells that are for only numeric input—and, more specifically, numbers in a predetermined range with perhaps even definable internal increments—you don’t have to create pop-up menus to keep data entry accurate. Instead, you can format the cells for a slider or a stepper input control.

A slider-formatted cell pops up a vertical bar; slide the ball up or down to change the number in the cell. A stepper control provides up and down arrows, which you click to increment or decrement a number. I recommend the former for all but a very narrow range of numbers, as clicking the arrows on a stepper input is incredibly tedious.

To set up a slider or stepper:

  1. Select the cells to be formatted, and go to the Format Inspector’s Cell pane.
  2. In the Data Format section, choose Slider or Stepper from the pop-up menu. (Use sliders when there are more possibilities to be accommodated: a smaller increment, a larger range, or both.)
  3. Enter minimum and maximum values and any increment you need.
  4. Configure your slider or stepper further with the Format pop-up menu and the controls beneath it (Figure 58 and Figure 59).
**Figure 58:** Left: The setup for a slider control. Right: Sliders pop out from formatted cells.
Figure 58: Left: The setup for a slider control. Right: Sliders pop out from formatted cells.
**Figure 59:** Left: The options for the Stepper control. Right: The results of repeated clicks in the control for a formatted cell; the values increment by .25, as defined.
Figure 59: Left: The options for the Stepper control. Right: The results of repeated clicks in the control for a formatted cell; the values increment by .25, as defined.

Numbers applies your stepper or slider to the selected cells.

Here’s what you need to know about using sliders and steppers: