SELECT
Syntax
SELECT(<any>;<any>;<any>)
Description
Create columns with selected values using a key constant from a specified column in the workbook.Â
Select a column from a worksheet and write in a constant from that column. Next, select the value column for which to compare the constant from the original column. If the constant or original column is set as null, the cells all return empty. If the value column is set as null, the column doesn't calculate.
This is an excellent tool to create columns for use in a pivot table.Â
Example
Original data:
Department | Year | Dollar |
---|---|---|
Department 1 | 2010 | 10 |
Department 1 | 2010 | 20 |
Department 1 | 2011 | 10 |
Department 2 | 2011 | 10 |
Department 2 | 2012 | 10 |
Create a new worksheet:
- Copy the Department column.
- Use the SELECT function:
- For column to select, use the Year column.
- Write in the specific year as the constant.Â
- Select the Dollar column as the value if equal.
- Use the SELECT function again, selecting a different constant.
COPY(#RawData!Department) SELECT(#RawData!Year;2010;#RawData!Dollar) SELECT(#RawData!Year;2011;#RawData!Dollar)
Department | Dollar_in_2010 | Dollar_in_2011 |
---|---|---|
Department 1 | 10 | <empty> |
Department 1 | 20 | <empty> |
Department 1 | <empty> | 10 |
Department 2 | <empty> | 10 |
Department 2 | <empty> | <empty> |