cat / 012
clone

a spreadsheet for the terminal: lotus 1-2-3 looks, google sheets keys and formulas, one go binary

cat/module-path
012 / docs / sheets / formatting.md
formatting.md 8.5K rendered
1---2title: "Formatting"3sidebar_position: 34---56# Formatting78Formats change how values show, never what they are. Select cells,9whole columns or rows, then pick a format from the Format menu, a key10([keys](../reference/keys.md#formatting)) or the palette. Entries such as11`$1,200`, `12%` or `9/26/2026` take their format as you type them12([formulas](../formulas/README.md#what-you-type)).1314## Number formats1516![Monthly spending in Currency rounded, a bold header row, and totals that take the currency format](../media/formats-budget.png)1718Format > Number, as Sheets names them:1920| Format | Shows |21|---|---|22| Automatic | Numbers as typed, or as formulas infer from what they read |23| Plain text | Entries exactly as typed, even numbers and formulas |24| Number | Thousands separators: 1,000.12 |25| Percent | 10.12% |26| Scientific | 1.01E+03 |27| Accounting | $ at the left, negatives in parentheses: $ (1,000.12) |28| Financial | Negatives in parentheses: (1,000.12) |29| Currency | $1,000.12 |30| Currency rounded | $1,000 |31| Date | 9/26/2026 |32| Time | 3:59:00 PM |33| Date time | 9/26/2026 15:59:00 |34| Duration | Elapsed hours, minutes and seconds: 24:01:00 |35| Size | A count of bytes, as nushell shows file sizes: 1.6 kB |3637Format > Increase decimal places and Format > Decrease decimal places38show one more or one less.3940Size isn't one of Sheets' formats; it's what a41[nushell](../nushell/types.md) table's sizes come in as. It shows42whole bytes below 1000 (`512 B`), and above that the number in the43largest unit that keeps it under 1000 once rounded, units a thousand44apart: kB, MB, GB, TB, PB and EB, with one decimal place until you45change it (`1.6 kB`, `999,999` as `1.0 MB`). Sheets would write the46first three units as the custom format47`[<1000]0" B";[<1000000]0.0," kB";0.0,," MB"`, which is what an Excel48download keeps, and what reads back as Size.49A formula left Automatic shows the format of what it reads50([building formulas](../formulas/building.md)).5152## Text5354Bold, italic, underline and strikethrough, and Format > Alignment's55left, center or right. Numbers align right, text left, booleans and56errors center, as in Sheets, until you align them yourself. Format >57Clear formatting resets number formats and text styles and keeps the58contents.5960## Vertical alignment6162Format > Alignment's Top, Middle and Bottom say where a value sits in63a row taller than it, as in Sheets: on the row's first line, its middle64one or its last. Wrapped text starts there, so it fills the row from65the top, around the middle, or up to the bottom. Until you choose, values66sit at the bottom, as Sheets aligns them, and a67[merged cell](#merged-cells)'s in its middle.6869## Wrapping7071![A trip plan getting a merged title, borders with a thick outline and a double line under the headers, and notes that wrap](../media/layout.gif)7273Format > Wrapping says what text wider than its column does, as in74Sheets:7576| Wrapping | Text |77|---|---|78| Overflow | Runs on into the blank cells beside it (the default) |79| Wrap | Breaks into lines that fit the column, at spaces where it can; the row grows to fit them |80| Clip | Is cut off at the cell's edge |8182Values sit on the last line of a tall row, as Sheets aligns them to the83bottom, unless [aligned](#vertical-alignment) otherwise, and the row's84number is on that line, so a tall row ends on the line that numbers it.85Text doesn't run on across a [border](#borders) or into86[merged cells](#merged-cells).8788## Row heights8990A row is as tall as the text it wraps, up to 50 lines, unless it has a91height of its own: Format > Row height (1 to 50 lines, with a live92preview as Left and Right change it), or drag the bottom-right corner of93the row's number, where `▄` shows on hover. Format > Fit rows to data,94or double-clicking that corner, has rows fit their contents again.95Heights follow inserted and deleted rows and travel with whole rows96copied, cut or moved.9798## Borders99100![A trip plan with thin lines between its cells, a thick outline and a double line under the headers, under a title merged across it; the notes wrap, and their rows grow to fit](../media/layout-dark.png#gh-dark-mode-only)101![A trip plan with thin lines between its cells, a thick outline and a double line under the headers, under a title merged across it; the notes wrap, and their rows grow to fit](../media/layout-light.png#gh-light-mode-only)102103Select the cells, then Format > Borders:104105- **All**, **Outer** (the outline) or **Inner** (the lines between the106 cells) draws those edges; **Top**, **Bottom**, **Left** and **Right**107 one side; **None** removes them.108- **Thin lines**, **Thick lines** and **Double lines** pick the line the109 next border is drawn with, thin until you pick, as Sheets' border110 style keeps its choice.111- Alt+Shift+1 to 4 draw the top, right, bottom and left border,112 Alt+Shift+7 the outline and Alt+Shift+6 clears them113 ([keys](../reference/keys.md#formatting)).114115Where two cells share an edge, the heavier line shows, and drawing an116edge again from one side replaces the other side's line. Borders are117part of a cell's formatting: they fall back on rows and columns, travel118with copies and go with Clear formatting. The outline of whole columns119or rows runs along the sheet's own edges too: over row 1 and under the120last row, or down column A and the last column.121122The grid draws borders with box-drawing characters, which terminals123join where lines meet. A line down the side of a cell takes the first124column of the cell to its right, which is padding anyway. A terminal125has no thinner line between two rows of characters, so a line along126the top of a row takes a line of the screen above it, as tables printed127in a terminal do: a bordered table is taller than a plain one. Unicode128has no joint where a double line meets a thick one, so there the joint129is drawn thick, and the double line starts beside it.130131### Border colors132133Format > Borders > Border color picks the color borders draw with from134here on, as the line style is kept: Automatic draws them in the text's135color, as Sheets draws borders black, or red, yellow, green, cyan, blue136or magenta, the terminal's own colors as137[conditional formats](rules.md#conditional-formatting) use them, so the138palette or the [color scheme](../terminal/themes.md) decides how they139look. Where lines of two colors meet, the heavier line's color shows,140and a line's color goes with it.141142## Merged cells143144Format > Merge cells joins the selection into one cell (Merge all), or145each of its rows or columns into one (Merge horizontally, Merge146vertically). A merged cell shows its top-left cell's value centered147across it, unless that cell is aligned, and draws no lines inside.148Merging clears the values of the other cells, as Sheets does, so when149any would be lost it asks first: Enter merges, Esc backs out, and undo150brings them back. Unmerge splits merged cells back into cells.151152Its value sits on the middle one of the lines its rows take on screen,153counting rows of any height and the border lines between them, unless154its top-left cell is [aligned](#vertical-alignment) to the top or155bottom.156157The active cell moves onto a merged cell's top-left and steps off it158from its edges, along the row or column it came in by, as in Sheets:159coming in from A2 into B1:C3, Right goes on to D2. Clicking any part160of it selects it, typing edits it in an entry as wide as the merge, and161a selection that touches it takes in all of it. Merges follow inserted162and deleted lines, and a copy, cut or move carries the merges wholly163inside it. Sorting a range that holds merged cells is refused, as is164[freezing](sort-filter.md#freeze) rows or columns through one; an array165can't [spill](../formulas/arrays.md) over them, cells an array spills166into or a pivot table's results can't be merged, and merging in a167[protected range](notes-protection.md#protected-sheets-and-ranges) asks168first.169170## Whole columns and rows171172Formatting whole columns or rows (select them with Ctrl+Space or173Shift+Space, or click their headers) keeps the format on the column or174row, as Sheets does, rather than on each of their million cells: every175cell of it shows the format unless it has its own, and a cell typed into176later takes it. A cell's format comes from the cell, else its row, else177its column, else the whole sheet's (Ctrl+A twice, then a format); the178number format and the text style fall back separately. Copies carry what179cells show ([editing](editing.md#copy-paste-and-fill)).180181## Column widths182183Drag a column header's right edge, or use Format > Column width (1 to184240 characters); double-clicking the edge fits the contents, and Format >185Reset column width goes back to the default.186187Conditional formats, which color cells by their values, are on188[their own page](rules.md).