Reporting on Information from Multiple Exports
Why would I need to run multiple exports in order to produce my report?
Sometimes, you may need to produce a report that contains information from multiple exports (spreadsheets). Using Microsoft Excel’s LOOKUP functions (LOOKUP, VLOOKUP, HLOOKUP), you can perform the exports needed and “look up” information in a source (master) worksheet and display it in your destination worksheet.
Information can be linked via the appropriate “Data Link Fields” which uniquely identify the information in your exports (i.e. the unique ID for a volunteer profile, the unique ID for a specific hours log entry, etc.).
For example, you might want a report on all those assigned to a specific activity (i.e. the “Schedule Detail Export”) but also include the volunteer’s T-shirt size (i.e. a custom field value in the “Personal Profile Export”).
Part 1: Export the desired information
- Perform a Volunteer Profile Export of all volunteers, ensuring that you include all volunteers, the desired profile information (e.g. the custom field for the volunteer’s T-shirt size) and the “DatabaseUserId” column.
- Save the Volunteer Profile Export to a file. This will be your “source” worksheet.
- Perform a Schedule Detail Export for your desired activities, ensuring that you include the “DatabaseUserId” column.
- Save the Schedule Detail Export to a file. This will be your “main” worksheet where you will construct your report.
Part 2: Combine your exports into one file
- Open the Volunteer Profile Export.
- Open the Schedule Detail Export.
- In the Volunteer Detail Export, right click on the tab at the bottom containing the name of the worksheet and select “Move or Copy…” (shortcut: press the [ALT] key, then E, then M)
- In the “Move or Copy” dialog:
- In “To book”, select the name of the Schedule Detail Export file
- In “Before sheet”, click on “(move to end)”
- OPTIONAL: Check the “Create a copy” box
- Click the [OK] button
- Open the Schedule Detail Export. Your profile information should now be the second worksheet in that file.
Part 3: Prepare your source data
NOTE:It is important to sort the source information (i.e. the values you want to look up) by a unique value. In this case, that is the “DatabaseUserId” column.
- Go to the profile information worksheet
- Highlight the data
- Sort the data by the DatabaseUserId column
Part 4: Look up the desired information
In the schedule detail worksheet, you can now add a column to look up the T-shirt information for your volunteers.
- Click in the blank cell in the first row where the information is to be copied
- Enter the appropriate formula. The basic syntax for the LOOKUP function is: @LOOKUP(value_to_look_up,range_to_scan,range_to_return)
- “Value to look up”: the single cell in your current worksheet containing the ID you want to find in your source worksheet
- “Range to scan”: the range of cells in the source worksheet to check for the unique ID (this can only be one row or column)
- “Range to return”: the range of cells in the source worksheet containing the data you want to return to your main worksheet (this can only be one row or column)
- NOTE: Instead of entering the formula manually, you can follow the steps listed in the tip below
- If you click in the cell where you created the formula, it might look something like this (where “Source” is the name of the worksheet that contains the data you are looking up):
- Edit the formula to ensure that you are using an “absolute” cell reference instead of a “relative” one by adding a dollar sign (“$”) before each column letter and row number referenced in the source worksheet). This will ensure that the exact range is checked each time, rather than dropping the range down by one row in your source worksheet for each row of data in your master worksheet:
- Copy the formula down to the last row of data in your main worksheet
TIP:TIP: Instead of entering the formula manually, you can follow these steps:
- Click in the blank cell (in the destination worksheet) in the first row where the information is to be copied and type @LOOKUP(
- In the destination worksheet, select the cell value (typically in the same row) you want to use for your search. That cell address will be copied into your formula.
- Add a comma (“,”) to the end of your formula (after the cell address you just copied)
- Open the source (lookup) worksheet
- Highlight all the data in the column you want to search (i.e. the data that matches what you highlighted in your destination worksheet), but don’t include the column header
- Add a comma (“,”) to the end of your formula (after the range you just copied)
- Highlight all the data in the column you want to return to your destination worksheet (don’t include the column header)
- Type a right parentheses (“)”) at the end of your formula
- Press the [Enter] key on your keyboard to copy the formula to the cell in the destination worksheet
- In the destination worksheet, click in the cell where the formula was created
Data Link Fields
Here is a list of the “Data Link Fields” in the “Columns to Include” section of the exports. Selecting a data link field (or multiple fields) enables you to “look up” matching information in another worksheet.
Relationships Between the Exports
The following image illustrates the relationships between the Data Link Fields in the various export reports available.