You are on page 1of 4

# EXCEL PRO

## ( ;&( / 6 2/ 87, 216 \$1' 7, 3 6 ) 25 ) , 1\$1&( 3 52) ( 6 6 , 21\$/ 6

EXCEL PRO
a Snap
Page 1
Shared Workbooks: How
to Avoid Printing Blanks
Page 2
Embedding a PDF in an
Excel Workbook
page 4
Excel Macros for
Finance Teams
Designing and Building
a CFO Dashboard
Using Excel
Excel Fundamentals
______________
B J
As a regular
contributor
to CFO and
a Microsoft
MVP a dis-
tinction held
by only 3,000 professionals
worldwide Bill MrExcel
Jelen is CFO Excel Pros
resident expert and chief
writer. He has authored
33 books on Excel is an
internationally renowned
consultant and trainer, and
host of MrExcel.com
IN THIS ISSUE
CFO WEBCASTS:
On Demand
Voiurv 1 Issuv 1 No. 1 Juvv z, zo1z
Rows in a Snap
Use the SUMIF formula to set criteria and quickly calculate
totals of out-of-sequence rows.
SOLUTION: Yes, building the formula by
referring to each individual cell would take
too long. For example, take a look at the data
set in Figure 1. It would take hours to finish
the formula that Ive started there, unless you
used the formulas that include the SUMIF
function.
Formulas like =C4+C8+C12+C16+C20+
or =SUM(C4,C8,C12,C16,C20, have been
around since the dawn of the spreadsheet in
1981. What you need to solve this problem is
a function introduced in 1997, called SUMIF.
As you can see in Figure 2, the function
usually has three arguments. First, you specify
a range of row labels. The second argument is a
single value that you hope some row labels will
match. The third argument is a range of num-
bers that correspond to the row labels in argu-
ment 1. Whenever the row label in the range
matches the criteria, the corresponding value
from the sum_range is included in the total.
One way to build the formula is to specify
USER PROBLEM: How do
you set up a function to sum
variable rows? For example,
how would you sum every
third cell where the row la-
bel is forecast. Selecting
each individual cell is too
time consuming if you have
thousands of rows.
Fig. 1
continued on page 2
the criteria in quotes: =SUMIF(B2:B4464,"Fo
recast",C2:C4464), as noted in Figure 3.
Or, you can enter the criteria in a cell and
point to a cell. In Figure 4, Ive added dollar
Fig. 2
Fig. 3
1 C F O E XC E L P R O | J A N U A R Y 2 0 1 2 C F O . C O M
s
a
m
p
l
e
EXCEL PRO
Shared Workbooks:
How to Avoid Printing Blanks
Shared spreadsheets are great, unless you dont
have write access and therefore cant get rid
of pages you dont need when you are ready to
print. Heres three ways to solve that problem.
SOLUTION STRATEGY: There are several different ways to at-
tack this problem. While you could try any of these methods, the
best long-term solution is to have the people with write access
to the spreadsheet take three minutes to set up a custom view for
you. Until you can convince them to do the custom view, try any
of these methods:
Instead of clearing the data in the 50 columns to the right, hide
those columns. Select some cells that span the 50 columns. Use
Alt+O+C+H in any version, or Home, Format, Hide & Unhide,
Hide Columns in Excel 2007/2010 or Format, Column, Hide in
Excel 2003. Hiding the columns should prevent the extra blank
pages from printing.
Re-set the print range that theyve defined. Select just the range
that you want to see. In Excel 2007/2010 use Page Layout, Print
Area, Set Print Area. In Excel 2003, use File, Print Area, Set Print
Area.
Use Print Selection to override the print area. Select the
range that you want to print. In Excel 2010, when you select
File, Print, there is an area that says Print Active Sheets
Only Print Active Sheets. This area is a dropdown shown in
Figure 1. Click the dropdown to see more choices (Figure 2),
such as Print Selection. In all prior versions of Excel, Print Se-
lection was located in the Print dialog, clearly visible beneath
the From ___ to ___ pages.
As mentioned above, the easiest long-term solution is to
to set up a custom view for you. It will not affect their workflow
but it will make your life a tiny bit easier each time you need to
print the file.
USER PROBLEM: I share a workbook with coworkers, but for my
purposes, I only need certain columns in the middle of the spread-
sheet. Also, I am using the read version of the document because
I am not the person responsible for updating the spreadsheet. To
gather just the data I need, I rst delete about 50 columns to the
right of what I use, but pages remain. So to avoid printing all those
blank pages, I go to the end of the page and drag them up and over to
the left to where I can work with them. Is there a way to avoid having
to drag the dotted line to where I need it, other than to specify print
from page 4 to page 14 (which really doesnt work anyway because
there are blank pages in that range).
First, they should set up a view to preserve all of their set-
tings. This is really simple and takes a few seconds. Open the
file on their machine with write access. Use View, Custom
Views. In the empty Custom Views dialog (Figure 3) click the
Type a name for the original view, perhaps AllData and
click OK (Figure 4).
Fig. 1
Fig. 2
Continued on page 3
2 C F O E XC E L P R O | J A N U A R Y 2 0 1 2 C F O . C O M
s
a
m
p
l
e
EXCEL PRO
COMING IN
FUTURE ISSUES:
Q Move Small Pie Slices to Second Chart
Q Automatically Number a List of Employees
Q Add Subtotals to a Data Set
Q Calculations Outside of Pivot Tables
Q Create Random Numbers
Q Create an Ad-Hoc Reporting Tool
signs to make the first and third arguments absolute referenc-
es, and copied the formula to build a small summary table to
add up each of the three types of values in the data set.
Additional Note: There is a variation on the SUMIF for-
mula worth noting. Taking another look at Figure 2, youll see
that Microsoft shows the [sum_range] argument in square
brackets, meaning that it is an optional argument. How could
this be optional? If the range and sum_range are the same set
of cells, you can leave off the sum_range. This would only hap-
pen if you were looking for numeric criteria, such as summing
all cells above 20000:
=SUMIF(C2:C4464,>20000)
CAUTION: Invariably, once you master SUMIF, you will
run into a problem where you need to sum based on two con-
ditions. SUMIF cannot handle this. If you are using Excel 2007
or a newer version of the software, consult Excel help for the
new SUMIFS (plural) function. In versions older than Excel
2007, you had to use the extremely complicated SUMPROD-
UCT function to solve the problem.
Adding Up Varying Rows continued from page 1
By setting up the original view, they can easily go back to
the print settings that they need after doing the next steps.
Select the data that you want to print. Use Page Setup, Print
Area, Set Print Area. Go back to the View, Custom Views,
Add. Create a view called JustXData or Jordan or Subset or
anything. This will create a view that you can use. The per-
son with Write Access should now switch back to the origi-
nal view. Go to the custom views dialog (Figure 5), choose All
Data, and click Show.
At this point, save the file. The people with write access will
always open the file to the AllData view, so they never have to
visit the Custom Views dialog again. They can forget all about
custom views. Each time that you want to print the file, open
the file as read-only. Choose View, Custom Views, double-
click the Jordan view and print. Only your needed columns
will print.
Shared Workbooks ontinued from page 2
Fig. 3
Fig. 4
Fig. 5
Fig. 4
3 C F O E XC E L P R O | J A N U A R Y 2 0 1 2 C F O . C O M
s
a
m
p
l
e
EXCEL PRO
SOLUTION : Amazingly, Excel supports embedding PDF
files in a worksheet, although it is not obvious to the work-
sheet recipient that they can open the PDF file.
To embed a PDF into a worksheet, first select a cell where
you want the corner of the PDF to appear. On the Insert tab of
the ribbon, look on the right side for a picture of a cactus and
the word Object. Select Insert Object. From the dialog box,
choose Adobe Acrobat Document as shown in Figure 1.
Browse to the PDF file and click Open. Then, a very strange
thing happens: The document opens in Acrobat Reader. This
makes no sense. What you will need to do is simply close the
document. You will now be back in Excel and the first page of
It is not obvious to anyone that they can open the PDF
to see additional pages. I recommend adding a note in a cell
above the top of the PDF to tell people that they can double-
click to open the PDF file (Figure 2). You can now send the Ex-
cel workbook to your recipient list. They will have full access
to both the Excel data and the PDF file.
Embedding a
PDF in an
Excel Workbook
Its not obvious to recipients of your
worksheet that they can easily open a
PDF le that you have embedded.
USER PROBLEM: I need to embed a PDF le in an Excel spread-
sheet and send it to several coworkers. I want them to be able
to open the PDF by clicking on it.
Subscribe now to CFO Excel Pro:
Q 52 weeks of Excel solutions
and tips
Q&A Community
Q10% discount on any other CFO
paid product purchases
new articles, blogs and Q&A
are posted.
CFO Excel Pro
6 West 48th Street
New York, NY 10036
For customer service inquiries please email
ExcelPro@cfo.com or call 888-250-5719.
PUBLISHER Rob Stuart
SVP, PRODUCT DEVELOPMENT Richard Rivera
EDITOR Marie Leone
CHIEF WRITER Bill Jelen
EXECUTIVE ART DIRECTOR Robert Lesser
ART DIRECTOR Louisa McCabe

CFO Excel Pro is brought
to you by CFO magazine.
EXCEL PRO
To watch
Bill's
companion
video,