Creating the Workbook

The workbook for the application will have three worksheets, one for each of the data views that the client requires. Let's start with the “monthly sales by category” worksheet. For the data, we will need a block of cells two wide (for the two categories) and 12 high (for the 12 months). We will also want labels to identify the data (although some of these labels will be replaced later). Finally, some attractive formatting will make the worksheet easier to view. My final result is shown in Figure 25.2, but you can design the table any way you want. The only thing you should do that is not obvious in the figure is to format the data cells as currency with no decimal places.

Figure 25.2. The preliminary worksheet for the first ...

Get Office® XP Development with VBA now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.