- Click
**Get Data**to access the Quandl Formula Builder dialog box. **Database**: Select the database you would like to download from or search with a database code. (For instance, the database code for Wiki EOD Stock Prices is "WIKI".)**Data**: Choose the time-series you would like to download. (You may choose more than one time-series dataset.)**Columns**: Select the columns you wish to include. (By default, all columns will be downloaded.)**Filter**: You can filter your data by period range and frequency; the data can also be transformed, sorted or limited by the number of observations.**Placement**: Select the cell where you would like to place the data.- Click
**Insert**.

# Download time-series data with the Quandl QSERIES formula

In addition to the Quandl Formula Builder, the Quandl Excel add-in allows users to download time-series data using the QSERIES formula. Users can directly type a formula into a cell to download data.

The structure of the formula is given below:

`=QSERIES(quandlCode, dateRange, frequency, sortOrder, transformation, limit, headers, dates, transpose)`

**NOTE** : The Quandl code is the only required input for the formula. The other parts of the formula are optional inputs. Also, a single query can contain multiple filters.

Quandl code (required)

`“QUANDL CODE”`

or `“QUANDL CODE/COLUMN”`

The time-series codes can be found on our website. You can specify the column by the name or number. If a column is not specified, all columns from the time-series will be retrieved.

`{“TIME-SERIES CODE/COLUMN”, “TIME-SERIES CODE/COLUMN”}`

To specify multiple columns in a time-series, use curly brackets “{}” and indicate the columns you wish to query in quotation marks.

Users are encouraged to directly reference cells that contain Quandl codes and columns. See the Reference cells in the Quandl formula section below for details.

Examples:

`"WIKI/AAPL"`

retrieves all columns from this time-series`"WIKI/AAPL/CLOSE"`

and `"WIKI/APPL/4"`

retrieves only closing prices (column 4) of this time-series`{“WIKI/AAPL/CLOSE”, “WIKI/FB/CLOSE”}`

retrieves closing prices for both AAPL and FB tickers`A1:D1`

retrieves time-series specified in these referenced cells

Date range (optional)

`({“Start Date”, “End Date”})`

Period Range: `({“yyyy-mm-dd”, “yyyy-mm-dd”})`

Single date:`(“yyyy-mm-dd”)`

This portion of the formula allows you to pick a single date or a period range. Users can also directly reference cells that contain the dates.

If you use the TODAY Excel formula to indicate the dates and reference it directly, the dates will update automatically. To learn more about referencing cells, see the Reference cells in the Quandl formula section below for details.

Examples:

`“2014-09-01”`

retrieves data for September 1, 2014`{“2014-09-01”,”2014-09-30”}`

retrieves data for the month of September in 2014`A2:A3`

retrieves the time-series in the period range specified by these referenced cells (`A2`

as start date, `A3`

as end date)

Frequency (optional)

`“daily”`

, `“weekly”`

, `“monthly”`

, `“quarterly”`

, or `“annual”`

By specifying the frequency, you will retrieve data in those frequencies. Otherwise, the data will be left at its default frequency.

Sort order (optional)

`“asc”`

or `“desc”`

You can sort the data in ascending or descending order by specifying this part of the formula. Otherwise, the data will be left at its default, which is in descending order.

Transformation (optional)

`“diff”`

, `“rdiff”`

, `“rdiff_from”`

, `“cumul”`

, or `“normalize”`

`“diff”`

: row-on-row change`“rdiff”`

: row-on-row percentage change`“rdiff_from”`

: latest value as percentage increment`“cumul”`

: cumulative sum`“normalize”`

: scale series to start at 100

Limit (optional)

`#`

You can limit the number of observations you want to retrieve by entering an integer.

Headers (optional)

`TRUE`

or `FALSE`

If you do not wish to include headers in the data, specify `FALSE`

. Otherwise, the headers will show up by default.

Dates (optional)

`TRUE`

or `FALSE`

If you do not wish to include the date column in the data, specify `FALSE`

. Otherwise, the date column will show up by default.

Transpose (optional)

`TRUE`

or `FALSE`

By default, the data is downloaded with dates going down rows. If you would like to transpose the data to have dates across columns, specify `TRUE`

.

# Reference Cells in the Quandl Formula

Users are encouraged to directly reference cells that contain the desired specification when using the Quandl formula. The following two examples are meant to get you familiar with referencing cells in the Quandl Formula.

## Example 1: Query multiple time-series

This example queries and downloads the closing prices for the three tickers (`AAPL`

, `FB`

, `TCB`

). To do this, enter the Quandl codes for the three tickers in the worksheet cells (e.g., `B1`

, `C1`

, `D1`

). Then enter the QSERIES formula in cell `A2`

and reference the tickers by clicking and dragging your mouse over them.

## Example 2: Query multiple time-series within a period range

This example queries and downloads the closing prices for the three tickers (`AAPL`

, `FB`

, `TCB`

) in the month of September. To do this, enter the Quandl codes for the three tickers in the worksheet (e.g., `D1`

, `E1`

, `F1`

cells). Enter the start and end dates in the worksheet (e.g., `B1`

, `B2`

cells). Then use the QSERIES formula in cell `C2`

and reference the tickers and start/end dates.

# Useful Links

For other useful tips on Quandl's Excel add-in, please visit our YouTube channel and Help Center.

Updated 3 years ago