Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This sub-report makes use of a data sheet. This is where the data markers will go. It should look something like this:

The alternating rows (highlighting added for demonstration) contain sum formulas, visible in the function bar below:

The sum formula is the standard Excel function. When the data is populated, the A1:A1 reference gets updated to include all the data. The result should be something like this (highlighting added for demonstration):

Referencing the Data Sheet

The next step is adding references to the data sheet. This example references the "SUM" formulas on the data sheet. These sums are added to a percent change equation. This will result in a template resembling the following: Image Added
Note the formula in the formula bar, "Sheet2" is the data sheet.

Info
titleUsing Data Sheets

In this example, the sum rows alternate on the data sheet. If you stretch a formula, you'll have to update the references to skip every other row.

1. Select C4 on Sheet1.

2. Start to type the formula by entering =(

3. Click over to Sheet2, Row 2 and select the second SUM cell. (B2 in this example)

4. Go back to Sheet1 and add a minus sign for =(Sheet2!B2-

5. Click over to Sheet2, Row 2 again and select the first SUM cell.

6. Continue selecting cells into formulas to end up with this:   =(Sheet2!B2-Sheet2!A2)/(Sheet2!A2)

7. Drag this formula Horizontally only because of the alternating rows.

8. Repeat with rows 4 and 6

Number Formats

The value returned by the percent change equation should be displayed as a percentage. The table cells all have to be formatted.

1. Select all cells

2. Right click and select "Format Cells..."

3. Select "Percentage" on the Number tab. Image Added

Setting Styles

The next step is setting up the table. Add a header and label the rows and columns to end up with a complete table: Image Added
Once the table is complete, add styles.

1.Select "Percent Change by Quarter" and set it to "Heading 1." Heading 1 is found in the named styles list, on the "Home" tab of the ribbon.

2. Select the header row (B3:E3) and set it to "Total" in the named styles menu.

3. Select the row labels (B4:B6) and set that to "Total."

You should now have this:  Image Added

4. Select the entire area of B3:E6, and apply a consistent border:
Image Added

5. Now select B2:E2 and apply a bottom border in bold blue.

The final template should look like this:
Image Added

Adding an ExcelWriter Reference in Visual Studio

...