> For the complete documentation index, see [llms.txt](https://notes.davidfeng.us/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://notes.davidfeng.us/misc/microsoft-excel.md).

# Microsoft Excel

## Pivot Table

### Prepare the data

* Remove the blank rows/columns
* Add headers for columns
* convert data to excel table: **`cmd` + `t`**, enter.
* Go to end/start of data: **`cmd` + `end/home`**.

### Fields

1. Create the **value field** first.

* if it’s number, excel adds it up.
* If it’s a string, excel count them.

2\. Create row fields

* break up the value field. Can have multiple row fields.

3\. Column fields

* Break down the value field on another dimension
* Con: (vs. row fields) left to right scrolling
* Can be used for time
* Can have multiple column fields.

4\. Filters - Slicer / Timeline in the ribbon

### Misc

Update the pivot table when the original table changes:

* right click, refresh

{% embed url="<https://www.youtube.com/watch?v=X6iQzAU1HGA>" %}
