Summing Formulas Excel SUM Formula Probably, the most widely used Excel formula, the SUM function in Excel is specifically designed to add values from different ranges, or one range. The SUM formula can be typed into a cell in Excel, or inserted via the Insert Function tool to the left of your ormula bar.
Excel SUM Function/Formula. Add Numbers, or a Range of Cells Wit SUM Formula Excel's SUM Function. See Also: AutoSum Tips Using the SUM Function
The SUM function in Excel is specifically designed to add values from different ranges. The SUM unction can be typed into a cell in Excel, or inserted via the Insert Function tool to the left of your ormula bar. The syntax of the SUM unction is SUM!number",number#, ...$. SUM is the function name, and contained co ntained within the brac%ets are &arguments&, or the pieces of information that Excel re'uires to to complete the unction. unction. The SUM function allows from " to () arguments !number ", number ....$ for which you re'uire the total value or SUM. Using Ctrl to Mark Cells
*f you wish to add cells that are non+contiguous !not oined together$, type in your function first cell you wish to to add. -old down your Ctrl %ey and clic% in all other =SUM clic% in the first cells you wish to add up, then type in a !. Ty Typing ping in a comma instead of selecting selecting with your Ctrl %ey also wor%s ust as efficiently as well. Using SUM to A"" a #ange $rom a %i$$erent &orksheet
ou can easily use SUM to add up the same range range in different wor%sheets. wor%sheets. /lic% in the cell you you want the result of your addition in, then holding down the Shi$t %ey, clic% on the next wor%sheet that you wish to include in your calculation and highlight the range to be used, then clic% Enter. 0ne thing to note here however, h owever, is that if you insert a wor%sheet in the middle of the range that you have told the SUM function to add, then the same range on that wor%sheet will be included in your sum. TI( *f you wish to force any new inserted wor%sheets to be included in the SUM range, try this. insert a blan% wor%sheet at the beginning of your sheets in in your wor%boo%, and a blan% sheet at the end. 1ow in the cell that you wish the result of your addition to appear in type in 2SUM! and then clic% on the new first blank worksheet and and highlight the range you re'uire to be
added in all wor%sheets. -old down your Shi$t %ey and clic% on the new last blank worksheet , then close your brac%et $ and hit enter. 1ow hide the first sheet and the last sheet by going to ormat3Sheet3-ide. This will force force any new wor%sheets to be included included in the SUM range as all new wor%sheets will be between the # blan% ones.
Excel Autosum Function 4ecause adding numbers is probably the most common function that Excel is used for, Excel has a built+in eature called AutoSum located on the Standard toolbar.
Excel Autosum. Sum u! "alues in Excel Automaticall# Excel's AutoSum Function. See Also: SUM Formula)Function ** Formula)Function ** Excel AutoSum ** AutoSum Tips + an" + an" AutoSum Tips ,
4ecause adding numbers is probably the most common function that Excel is used for, Excel has a built+in eature called AutoSum located on the Standard toolbar. AutoSum is represented as the 5ree% /apital letter Sigma 6. ou can use AutoSum to sum a range of cells. 7 8ange can be one single cell, or many cells. ou can sum cells in a contiguous !no gaps$ range of cells, or a non+contiguous !cells not oined together$ range. To use AutoSum you must clic% in the cell that you wish your your result, or addition to appear in. 7s a default, AutoSum loo%s up a column for figures immediately above it to to add together. This wor%s great, unless it encounters a blan% row or text. *f it does, then it stops at the last cell with with a number in it. *f there are are no numbers above it, AutoSum will automatically go to the left loo%ing for numbers to add up, but will again stop at a blan% column column or text. This is Excel9s default, but you can easily change it.
The SUM unction is written written as 2SUM!number ", number #$. 2 is the trigger to Excel that a function or formula is following. SUM is the name of the function and !number ", number #$ are the arguments that the SUM function needs to wor%, or in our case the numbers n umbers it is to add up. :hen you clic% the AutoSum icon, you will see the SUM function written in your cell, with a mar'uee !floating dotted line$ around what the AutoSum intends to add up. *f the highlighted range is what you wanted to add up, clic% 0;, if not then change the range you wish to add. ollowing are three screen shots showing the AutoSum . AutoSum automatically pic%s up the numbers above it
nu mbers immediately above it, AutoSum automatically loo%s left for numbers if it encounters no numbers but numbers to the left.
AutoSum automatically stops when it encounters a blan% line, or text in the middle of the range it is trying to add up.
Arra- Formulas in Excel * strongly suggest you read this very important information on using array formulas in your spreadsheets. 7rray formulas can let you specify more then one criteria to Sum, 7verage, /ount etc by. Many examples of how to use them.
Arra# Formulas $ Excel Arra# Formulas ShareThis | | Information Helpful? Why Not Donate. TRY OUT: Smart!"# | $o%e!"# | #naly&er'( | Do)nloa%er'( | Tra%er'(|
More Free Downloads..
"est
!alue: *inan+e Templates "un%le
What are Array Formulas? See Also Alternative to Array Formulas Excel 7rray formulas are very powerful and useful formulas that allow more complex calculations than standard formulas. The &-elp& in Excel defines them as below<
"An array formula can perform multiple calculations and then return either a single result or multiple results. Array formulas act on two or more sets of values known as array arguments."
IMPORTANT - Before we Start :hen * first discovered array formulas may years ago, * thought * had found the answer to 7== my spreadsheet problems. * Started using them willy nilly an" pai" the the price. Perhaps the number one rule with arrays is, onl- use them hen nee"e" an" kno hen to use them. * have seen many users using array formulas in instances when a standard Excel formula will do the ob !eg> one of the database functions$. Too man- arra- $ormulas &I// slo "on recalculation0 sa1ing0 opening an" closing. * have even seen &so called& experienced users recommending them to other Excel users loo%ing for help on a simple formula. This is usually due to inexperience and?or la@iness. This is very irresponsible, as the person loo%ing for help will also find themselves using them as their first port of call. So it is important to %now when to use them and when not to. See E$$icient Excel Sprea"sheet %esign *t is fair to say that even my examples below are really an incorrect use of array formulas, but in the interest of %eeping things simple * have used them.
Array Formula Rules 4efore we show some examples of array formulas it is important to %now A fundamental rules. •
•
•
•
,a+h ar-ument )ithin an array must hae the same amount of ro%s an% columns. You must enter an array /y pushin- Ctrl&Sift&Enter. You cannot a%% the 01 2/ra+es3 that surroun% an array yourself4 pushinCtrl&Sift&Enter )ill %o this for you. You cannot use an array formula on an entire column.
Pet Sho! "#am!le Suppose -ou ha1e 2 Columns o$ "ata each ith +33 ros. /olumn 7 is used to %eep trac% of the sex of each dog sold i.e. Male or emale /olumn 4 is used to %eep trac% of the breed of the dogs sold. /olumn / is used to %eep trac% of the age of the dogs sold. /olumn B is used to %eep trac% whether the dog is sterili@ed or not i.e. es or 1o /olumn E is used to %eep trac% of the cost of the dog sold.
•
•
•
•
•
•
To +ount the num/er of male 5oo%les sol%: 'SUM(()A)*+)A)*'-Male-()0)*+)0)*'-1oodle- To +ount the num/er of male 5oo%les sol% oer 6 years ol%: 'SUM(()A)*+)A)*'-Male-()0)*+)0)*'-1oodle-()C)*+)C)*2* To -et the total +ost of male Spaniels sol%: 'SUM(3F()A)*+)A)*'-Male-,3F()0)*+)0)*'-S!aniel-, )E)*+)E)*,, To 7n% out the aera-e a-e of male %o-s sol%: 'A"ERA4E(3F()A)*+)A)*'-Male-,)C)*+)C)* To 7n% out the aera-e +ost of male %o-s sol% oer 8 years ol%: 'A"ERA4E(3F()A)*+)A)*'-Male-,3F()C)*+)C)*2*,)E)*+)E)* To 7n% out the 9inimum a-e of %o-s sol% that are sterili&e%: 'M3N(3F()5)*+)5)*'-6es-,)C)*+)C)*
7ll the above formulas must be entered with Ctrl4Shi$t4Enter
TIP: *f you are having problems writing an array formula to sum your totals then use the /onditional sum wi@ard, Tool5&i6ar"5Con"itional sum . *f you don9t see it then you will need to add it via Tools5A""7ins5Con"itional sum i6ar" . :hile using array formulas can be very handy they have one draw bac% and that is, too man- o$ them ithin -our ork8ook &I// slo "on Excels recalculations . *f you have read and understood the very real pit+falls to using them * highly recommend ta%ing the next step and going here < 4ut please %eep in mind what * have said here.
Excel Con"itional Sum &i6ar" The /onditional Sum :i@ard is an 7dd+*n to Excel that is used to summari@e values in a list based on set criteria.
Summing b# More 7an 8 Criteria Current Special( /omplete
Excel Excel Training /ourse for Excel CD + Excel #))(, only "AF.)). FC.CF *nstant 4uy?Bownload, ,3 %a- Mone- 9ack uarantee G ree Excel -elp for =*EH 5ot any Excel IuestionsJ Free Excel ;elp . See Also: Sum &ith Multiple Criteria an" Count &ith Multiple Criteria Excel Sum &i6ar"
The Con"itional Sum &i6ar" is an 7dd+*n to Excel that is used to summarise values in a list based on set criteria. 7n example of how the /onditional Sum :i@ard can be used is on a list of data that contains bas%etball teams and number of points scored over a period of time. 4y using the /onditional Sum :i@ard you can create a formula to add the total points for a team over a specified period. 4ecause the /onditional Sum :i@ard is an 7dd+*n to Excel, you will need to install it !you may need your 0ffice dis% to do this$. To install the /onditional Sum :i@ard go to Tools5A""Ins, then select Con"itional Sum &i6ar" until it has a tic% in the box to the left, then clic% < . 0nce done the /onditional Sum :i@ard will be available to you under the Tools Menu. USI> <>E C<>%ITI<>
=etKs say we have a list of dates from 7#<7(# !with a heading of Bates in 7", bolded and centered$. rom 4#<4(# is a list of bas%etball teams !with a heading of Teams in 4" that has been bolded and centered$ and the points recorded in /#(# !heading of Points in /" also bolded and centered$. :e want to find out the total points scored for the 4lac% /rows bas%etball team.
1ow clic% inside your list range and to go Tools5Con"itional Sum &i6ar" . 7 :i@ard is a mini program that steps you through a process and you should be loo%ing at Step " of the :i@ard, which as%s the 'uestion> Where is the list that contains the values to sum, including the column labels?
4ecause you were already clic%ed inside your list when you activated the /onditional Sum :i@ard, and because your headings are defined as different to your list, Excel, will automatically pic% up your list range of 7"</(#, so all you need to do here is clic% the >ext button. This brings you to Step # of the :i@ard which as%s you< Which column contains the value to sum? Select the column label.
:e need to select Points from the drop down list as this is the column in which we are loo%ing for our values to sum. 1ext we are as%ed to select a column that we wish to evaluate, and then type or select a value to
compare with data in that column. Ma%e the following selections> Under column L Select Team Under *s< + Select = Under This alue + Select 9lack Cros 1ow select A"" Con"ition . This will add the condition to the /onditional Sum dialog /lic% the >ext button to ta%e you to Step ( of the :i@ard. *n Step ( we are as%ed in which form we would li%e the formula copied to our wor%sheet. There are two choices> Copy just the formula to a single cell Copy the formula and conditional values
:e will accept the default, copying the formula to a single cell. /lic% the >ext button to ta%e you to the final step !Step A$ of the :i@ard where we are as%ed to type or select a cell. Select cell 5# and clic% Finish . ou will notice when you clic% finish and can view the formula in cell 5# of your wor%sheet that it has been pasted as an A##A? $ormula . USI> T&< C<>%ITI<>S
ou can easily use more than one condition with the /onditional Sum :i@ard. =etKs see how many points were scored overall between #F March and #N 7pril #))N. /lic% inside your list and go to Tools5Con"itional Sum &i6ar" . our list range will be automatically pic%ed up. /lic% >ext to go to Step #. Under Step #, select Points as the column to sum at the top of the dialog. Ma%e the following changes for the columns you with to evaluate< Under column L Select %ate
Under *s< + Select 5= Under This alue L t-pe +2 March +33@ 1ow select 7dd /ondition. This will add the first condition to the /onditional Sum dialog 1ow to add the second condition< Under column L Select %ate Under *s< + Select = Under This alue L t-pe +@ April +33@ 7gain select A"" Con"ition . This will add the second condition to the /onditional Sum dialog. /lic% the >ext button This will ta%e you to Step ( of the :i@ard where we are as%ed in which form we would li%e the formula copied to our wor%sheet. This time we will select the second option> copy the formula and conditional values . Select the >ext button. *n Step A of the :i@ard you are as%ed to nominate a cell in which to paste your formula. 1ominate cell 5A and clic% Finish. This will paste the first date !#F?)(?)N$ to cell 5#. 1ow select cell -# and again clic% Finish . This will paste the second date !#N?)A?)N$ to sell -#. 1ow select *# and clic% Finish . This will paste the number of points scored between #F?)(?)N and #N?)A?)N to *#
Sum &ith Multiple Criteria Examples of Excel formulas to sum a range of cells that meet multiple criteria. ,BSUM, SUMP80BU/T and SUM with an * function?formula.
I* YOU #R, USIN 8;;< or a/oe4 US, SU9I*S
There are many times that it become necessary to SUM cells based on multiple criteria. The examples below will show you ( ways wa ys that this can be done. -owever, -owe ver, often the most e$$icient metho" is to use a i1ot Ta8le *f you are not familiar with Pivot Tables, I cannot stress enough how much easier spreadsheet life becomes once you areH *f you are not already aware, the Excel SUM* formula?function can only chec% to see if specified cells meet one condition, e.g. SUMIF S-ntax =SUMIFrange0criteria0 sumOrange!
=SUMI!A#A$%"&'$"%(#($)
:hich would SUM all numeric cells in the range 9B:9+3 where the corresponding row in AB:AB3 was greater than #). *f we ommit the last optional argument !sumOrange$ the SUM* would sum all cells in the range AB:AB3 which are greater than #), i.e. =SUMI!A#A$%"&'$")
1ote the criteria argument is in the form of a number, expression, or text that defines which which cells will be summed. or example, example, criteria can be expressed as #), )&, &2#)&, &3#)&, &1orth&, &1&. 0%, so if we need to sum a range of cells where corresponding cells !on the same row$ meet #, or more conditions we can no longer use the SUM*. The The formulas we can use, in order of their efficiency, are "$ BSUM Bownload advanced examples of BSUM #$ SUMP80BU/T ($ SUM with and * function nested and entered as an array formula. See 7rray ormulas for details or all examples * will use the data as shown below. :here A+:E+2 has been named< %ataTa8le
%SUM
7dds the numbers in a column of a list, or database, that match criteria you specify. or example> =%SUM%ataTa8le09+0Criteria!
:ould Sum all cells in 9+:9+2 that meet the criteria is the named range< Criteria !shown below$
The top row of the range< /riteria has exact copies of the headings in the range BataTable . The reference to cell 9+ is telling the BSUM to sum the numbers nu mbers in 9+:9+2 that meet the criteria. :e could could replace the reference to 9+ with the text &Iuantity&, or the number n umber # as the &Iuantity& column is the second column in the table. The criteria text &4ourbon& and &od%a&, &od%a&, under the criteria table heading &Bescription&, tells BSUM that either &4ourbon& 08 &od%a& &od%a& is a match. ma tch. The same principle is used for the &7lcohol /ontent&, i.e. &-igh& 08 &=ow&. This is then seen by BSUM as an 08 condition. 1ote the repeat of the date under &Use 4y Bate&. This is needed when using more than # rows as
the criteria as a blan% cell is seen as a wildcard character. *f we wanted to sum only data that lies between # dates, we would need have # &Use 4y Bate& headings in our /riteria range and use< 3D+7pr+#))F below one of these headings and QD+Run+#))F under another. This is then seen by BSUM as an 71B condition. Bownload advanced examples of BSUM SUM#<%UCT
Multiplies corresponding values in the given arrays, and returns the sum of those products=SUM*+,-U/!!A0#A'1="2odka")3!0#'1&2A4U5!"67Apr7 '$$1"))3!50#5'1="8igh")3!(0#('1)) 9SUM*+,-U/!!A0#A'1="(ourbon")3!0#'1&2A4U5!"67Apr7 '$$1"))3!50#5'1="4ow")3!(0#('1)) 7s with the first BSUM example, the above SUMP80BU/T S UMP80BU/T example would sum all &Iuantity& values where the corresponding &Use 4y Bate& is greater than D+7pr+#))F, the &Bescription& is either &od%a& &od%a& 08 &4ourbon& and the &7lcohol /ontent& is &-igh& 08 0 8 &=ow&. 1ote how range for each column of the table Start s at row ( and not row #. This is because the SUMP80BU/T has the result of each criteria chec% returned as T8UE !has a value of "$ or 7=SE 7=SE !has a value of )$. So, in the first row chec% !if we used row #$ it would loo% li%e>=SUM*+,-U/!$)3!$))3!$)3!":uantity"))9SUM*+,-U/!!$)3!$)3!$)3!":uantity")) To read about this in detail, see our 7pril edition of our free Excel 1ewsletter The result of multiplying a text string is always 7=UEH 7=UEH This would cause the result of the SUMP80BU/T to return the 7=UEH error. SUM an" IF=SUM!I!A'#A'1="(ourbon"%I!'#'1&2A4U5!"67Apr7 '$$1")%I!5'#5'1="4ow"%('#('1)))9SUM!I!A'#A'1="2odka"%I!'#'1&2A4U5!"67Apr7 '$$1")%I!5'#5'1="8igh"%('#('1)))))
The above, does the same as the SUMP80BU/T example. -owever, this is an array formula and must be entered by pushing CtrlShi$tEnter *t is important to %now that using the SUM and an d * or the SUMP80BU/T over a large number of cells will cause a noticeable slow down in Excel9s recalculation time. The BSUM is far more efficient in this this regard. -owever, as stated at the very Start , a i1ot Ta8le is better still when done correctly. Sum E1er- nth Cell
Surprising at it may seem, it is not as uncommon as you may thin% for an Excel user to want to sum every #nd, (rd, Ath etc cell in a spreadsheet. Excel has no standard unction that will do this. -owever, it can be done it a number of different ways. 7ll these ways ma%e use of the #<& unction and the M<% unction. #<& Function
8eturns the row number of a single cell reference. Syntax: RW! reference " M<%Function
8eturns the remainder after number is divided by divisor. The result has the same sign as the divisor. Syntax: #$! number %divisor )
:e nest the #<& function within the M<% function !to supply the number argument$, divide it by # !to sum every second cell$ and chec% to see if the result is ) !@ero$. *f it is, then the cell is summed. =et9s loo% at ust how we can use these. Some ways are better than others. 4y this * mean, we can use an array formula , but arrays are best suited to referencing either, single cells or small ranges. -aving too many arrays that reference a large range ill slow down Excel9s recalculation time. * have seen many :or%boo%s that have 8ecome unusa8le "ue to arra- $ormulae . 7n array formula to SUM every #nd cell could loo% li%e> %S!'(!#$!RW!)*)+:)*)--","%-,)*)+:)*)--,-""
7s this is an array formula it must 8e entered by pushing CtrlShi$t Enter and then Excel will add the curly brac%ets so it loo%s li%e> /%S!'(!#$!RW!)*)+:)*)--","%-,)*)+:)*)--,-""0
ou must let Excel add these. 7dding them yourself will cause the array formula not to wor%. :hile this will do the ob, it is not goo" spreadsheet design to do so. The reason is, it is an unnecessary use of an array formula and to ma%e matters worse, it has the olatile #<& unction nested within it, ma%ing the hole arra- $ormula olatile . This would mean the formula would be constantl- recalculating hene1er -ou are orking in the &ork8ook. *n a nutshell it is bad way to goH 7nother formula we can use, which is a slightly better choice, than the above array formula, is> %SR$&C2!!#$!RW!)*)+:)*)--","%-"3!)*)+:)*)--""
ou should however be aware that it will return DA/UE( if an- cells in the range contain text. This formula, while not a true array formula, will also slow down Excel if too many are used and?or they reference a large range. 0%, enough of how we shouldn9t do this, lets loo% at a much better way that is not onl- more e$$icient 8ut also $ar more $lexi8le . or this we will use the %SUM function. or the example * will use the range 7"<7F)) as the range we need to sum every nth cell. ". Enter the word Criteria in cell EB #. *n cell E+ enter the formula< %#$!RW!*",)C)"%(. Select cell C+ and go to %ata3ali"ation and select 4ist from the *llo5: box and in the Source: box type< +,,6,7,,8,9,,;,+A. Ensure the 'n
. N. *n any cell after row " enter this formula< %$S!)*:)*,+,))+:))" D. <TI<>A/: *n the cell directly above, where you have entered the BSUM enter> %@Summing very @A)C)ACBS!)C),@st@,@nd@,@rd@,@th@,@th@,@th@,@th@,@th@,@th@,@th@" A @ Cell@
1ow all you need to do is choose the desired number from cell C+ and the %SUM will do the rest.
•
Bownload a :or%boo% Example
•
7lso See This :or%boo%
Sum nth /argest)Smallest
;o To Sum The Top um8ers :hen you have a list of number in an Excel spreadsheet there are times when you may have to Sum only the top x numbers in the list. *f the numbers are sorted then the tas% is a fairly straightforward Sum function including on the top, or bottom x cells. 0ften however this is not the case. =ets say we have a list of number in the range 7"<7")) and we have to sum only the ") largest?smallest figures. :e can do this by nesting the =785E function into the SUM function as shown below. CAUTI<>: Arra- $ormulas an" SUM#<%UCT use" $or this purpose! are E#? ine$$icient an" ha1e serious limitations. I a"1ise to use %SUM shon 8elo! or a i1otTa8le %S!4*R!)*):)*)+--,/+,,6,7,,8,9,,;,+-0""
This is an array formula and must be entered via CtrlShi$t Enter an" -our list cannot contain text *f we only needed the F largest, we would simply omit the numbers N to "). *f we needed to sum the "F largest number we simply add number "" to "F. Should we need to sum the ") smallest values in the list we could use %S!S#*44!)*):)*)+--,/+,,6,7,,8,9,,;,+-0""
This is an array formula and must be entered via CtrlShi$t Enter an" -our list cannot contain text
SUM#<%UCT =SUM#<%UCTA+:AB335/A#EA+:AB330G!!HA+:AB33!! ?our list cannot contain text
%SUM T;E 9EST &A? Use of the BSUM unction reuires 7" to be a -eading. ". *n any spare column add the text Criteria
#. Birectly below this Enter either %*+D4*R!)*)+:)*)+--,;" <# %*+ES#*ll!)*)+:)*)+--,;"
(. :here you want the result, Enter %$S!)*)+:)*)+--,+,)C)+:)C)"
:here CB=Criteria and C+%*+D4*R!)*)+:)*)+--,;" <# %*+ES#*ll!)*)+:)*)+--,;" :here B is the relative /olumn position of the /olumn you are summing. our MUST have a heading but your list /71 contain text.
Sum Cells 8- Color &ant to Sum or Count cells that ha1e a speci$ie" Fill ColorJ This can be done with the aid of a /ustom unction. A custom function% also called a User -efined unction% is a function that we write ourselves using 2(A !2isual (asic for Applications). -ere is how See Also: # Separate unctions -ere an" Excel Sort by /olor
irst open the :or%boo% in which you wish to count or sum cells by a fill color. 1ow go into the isual 4asic Editor via Tools5Macro5isual 9asic E"itor Alt4FBB! and then, from within the isual 4asic Editor go to Insert 3Mo"ule to insert a standard module. 1ow, in this module, enter in the code as shown below> Function ColorFunction(rColor As Range, rRange As Range, Optional SUM As Boolean) Dim rCell As Range Dim lCol As Long Dim vResult
'''''''''''''''''''''''''''''''''''''' 'Written by Ozgrid Business Applications 'www.ozgrid.com
'ums or counts cells based on a speci!ied !ill color. '''''''''''''''''''''''''''''''''''''''
lCol " rColor.#nterior.Color#nde$
#! %& " rue (en )or *ac( rCell #n rRange #! rCell.#nterior.Color#nde$ " lCol (en vResult " Wor+s(eet)unction.%&,rCell-vResult *nd #! /e$t rCell *lse )or *ac( rCell #n rRange #! rCell.#nterior.Color#nde$ " lCol (en vResult " 0 1 vResult *nd #! /e$t rCell *nd #!
Color)unction " vResult
End Function
ou can now use the custom function !/olorunction$ li%e> =ColorFunctionCB0AB:AB+0T#UE! to SUM the values in range of cells 7"<7"# that have the same fill color as cell /". The reason it will SUM in this example is because we have used T#UE as the last argument for the custom function.
To /0U1T these cells that have the same fill color as cell /" you could use< =ColorFunctionCB0AB:AB+0FA/SE! or =ColorFunctionCB0AB:AB+! by omitting the last argument our function will automatically default to using 7=SE.
4e aware that the changing of a cells fill color ill not cause the /ustom unction to recalculate, even if you press C !8ecalculates the whole :or%boo%$. ou will need to either, select the cell and re+enter the formula, or go to E"it3#eplace and replace = with =0 or use Ctrl4Alt4FG
Try also to avoid the use of *pplication.Folatile as it will not help in this case and only slow down Excel9s calculation time.
Increase)%ecrease alues *f you have values on an Excel :or%sheet that you need to permanently increase, or decrease you can use aste Special . 1o Excel formulas neededH
Excel+ 3ncrease Excel "alues b# 1ercentage (9, Multi!l#, Add, Subtract or 5i:ide Current Special( /omplete
Excel Excel Training /ourse for Excel CD + Excel #))(, only "AF.)). FC.CF *nstant 4uy?Bownload, ,3 %a- Mone- 9ack uarantee G ree Excel -elp for =*EH 5ot any Excel IuestionsJ Free Excel ;elp Increase)%ecrease Excel alues
*f you have values on an Excel :or%sheet that you need to permanently increase, or decrease you can use aste Special . Increase)%ecrease Excel alues 8- ercentage
=et9s say you have a list of values in 7"<7")) and you need to increase these values all by "F. -ere is how> =. ,nter the num/er =.=> into any /lan +ell an% then $opy it 8. No) sele+t the ran-e #=:#=;; an% -o to Edit@1aste S!ecial 6. $hoose "alues from un%er Paste an% then Multi!l# un%er Operation an% +li+ ;< .
7ll value will now have increased by "F To "ecrease the values by "F you would simply Enter =B 7 3.B2 in any blan% cell as apposed to B.B2. This would result in 3.K2 which when used in steps # and ( above, would result in values being "ecrease" 8- B2L
Excel Su8totals In Excel we can use the Subtotals feature found under Bata on the :or%sheet Menu 4ar to Subtotal a table of data.
*n Excel we can use the Su8totals feature found under %ata on the &orksheet Menu 9ar to Subtotal a table of data. :hen doing so it is imperati1e that the ta8le o$ "ata is sorte" 8- the column -ou ish to Su8total !&at each change in&$. The Subtotal can be in the form of /0U1T, /0U1T 1UMS SUM, 7E875E, M*1, M7V, P80BU/T, STBBE, STBBEP, 78 or 78P. =et9s use the table below to apply subtotals so we can get a count by &Bescription&.
7s you can see, the table has been sorted by the &Bescription& column. This is re'uired if we wish to use the &Bescription& column to get a Subtotal count. *t is important to note that /ount in this case is not a count of only numbers li%e the CT &orksheet Function . or that, we would use /ount 1ums. The picture below now shows us what it loo%s li%e after applying Subtotals and also the settings we have used.
=et9s now say we wanted to do a Su8total 8- Month using the &Use 4y Bate& dates . To achieve this we would need to add?use an extra column, which can hide if preferred, and have a formula that changes num8er an" each change in month . The other thing we would need to do is sort
the table by the &Use 4y Bate& column. The formula we would use in an extra column, say && would be as shown below> 2M01T-!/($ :e would copy this down to the last row that has a date in &Use 4y Bate&. *f F+ we could use the heading &Month&. This would then give us a column of numbers that only change hen the month in the re$erence" Use 9- %ate column changes . :e would then simply apply Subtotals as shown above using the &Months& column. 1ote that in this case, as the table has been sorted by &Use 4y Bate& we do not need to re+sort the table by &Month&. :e could, but the result would be exactly the same.
9ol" Excel Su8totals -ere is how we can use /onditional ormatting in Excel to automatically bold the results of Subtotals.
0ne issue that is often encountered when wor%ing in Excel is that the Subtotal results, via %ata3Su8totals are not bolded or made easily distinguishable. This can ma%e the resulting data very hard to read, especially if the table that we have applied Subtotals to contains many columns. This often means the resulting subtotals are over to the right, while their associated heading are often in the first column. /onsider the small example below where Subtotals have been added to a very small table of data. 9e$ore Su8totals
7 "
4 Nuarter
Cost
# Iuart"
").))
( Iuart"
#).))
A Iuart"
").))
F Iuart#
").))
N Iuart#
").))
D Iuart(
"F.))
C Iuart(
").))
" Iuart( )
#F.))
A$ter Su8totals
7 "
4 Nuarter
Cost
# Iuart"
").))
( Iuart"
#).))
A Iuart"
").))
F Iuart" Total
A).))
N Iuart#
").))
D Iuart#
").))
W Iuart# Total
#).))
C Iuart(
"F.))
" Iuart( )
").))
" Iuart( "
#F.))
" Iuart# Total #
F).))
" 5rand Total (
"").))
*n the above table our Subtotal headings ha1e 8een 8ol"e" by Excel, yet their associated results ha1e not . 7s this table only has two columns, it is not that hard to read and pic%+out the Subtotal amounts. The more columns that a table has, the harder it becomes to visually pic%+out the Subtotals. The Solution
The solution to this problem is to ma%e use of Excels Con"itional Formatting . Using the above table as an example try this before adding your Subtotals. ". Select 7"<4"), ensuring the 7" is the active cell. #. 5o to Format 3Con"itional Formatting (. Select Formula is: and then add this formula< 28*5-T!7",F$2&Total& A. 1ow clic% the Format button and then the Font tab and then select 9ol" from Font St-le: F. 1ow clic% 0;, then 0; again The all important part to the formula is the 7bsolute of the /olumn !7$ and the 8elative reference of the 8ow !"$. 7s we Start ed our selection from 7", Excel will automatically change
the formula for each cell. or example, cell A+ will have a /onditional ormat formula of< 28*5-T!7#,F$2&Total&, cell 9+ will also have 28*5-T!7#,F$2&Total& and cell 7( and 4( will have< 28*5-T!7(,F$2&Total&. 1ow add your Subtotals and your Subtotals will loo% li%e< 7 "
4 Nuarter
Cost
# Iuart"
").))
( Iuart"
#).))
A Iuart"
").))
F Iuart" Total
O3.33
N Iuart#
").))
D Iuart#
").))
W Iuart# Total
+3.33
C Iuart(
"F.))
" Iuart( )
").))
" Iuart( "
#F.))
" Iuart# Total #
23.33
" 5rand Total (
BB3.33
:hen you remove the Subtotals, the bolded font will no longer apply. Taking It
The only problem with the above table now is the 5rand Total is 8ol"e" the same as the Subtotals. or 5rand Totals * prefer to see these formatted different again. -ere is how we can do this. 7gain the steps are based on the above examples ". Select 7"<4"), ensuring the 7" is the active cell. #. 5o to Format 3Con"itional Formatting (. Select Formula is: and then add this formula< 27"2&5rand Total& A. 1ow clic% the Format button and then the Font tab and then select 9ol" from Font St-le:
F. /lic% 0%, then clic% A"" to add a second ormat /ondition N. Select Formula is: and then add this formula< 28*5-T!7",F$2&Total& D. 1ow clic% the Format button and then the Font tab and then select 9ol" Italic from Font St-le: and then Single from Un"erline: W. 1ow clic% 0;, then 0; again our Subtotals will now loo% li%e below 7 "
4 Nuarter
Cost
# Iuart"
").))
( Iuart"
#).))
A Iuart"
").))
F Iuart" Total
O3.33
N Iuart#
").))
D Iuart#
").))
W Iuart# Total
+3.33
C Iuart(
"F.))
" Iuart( )
").))
" Iuart( "
#F.))
" Iuart# Total #
23.33
" 5rand Total (
)++-.--
ou can of course use any format you li%e to ma%e your Subtotals easier to read.
Making the SU9T
The SU9T
2SU4T0T7=!",7"<7"))$ will 7verage all visible cell in the range 7"<7")) after an 7uto ilter has been applied. *f all rows in 7"<7")) are visible it will simply 7verage them all and give the same result as 27E875E!7"<7"))$ The number for the first SU9T
FunctionP>um
" # ( A F N D W C ") ""
Function
7E875E /0U1T /0U1T7 M7V M*1 P80BU/T STBE STBEP SUM 78 78P
7s we only need to use a number between " and "" we can have the one SU4T0T7= function perform a function of our choice. :e can even ma%e the choice from a drop+down list which resides in any cell. -ere is how> ". 7dd all the function names, in the same order as above, to a range of cells. * will use %B:%BB #. :ith this range selected, clic% in the >ame 9ox !white box left of the Formula 9ar$ and type the name< Su8s and then clic% Enter. (. Select all of Column % and go to Format3Column3;i"e A. 5o to ie3Tool8ars 3Forms and then clic% on the Com8o 8ox /ontrol and clic% cell /# F. Use the Si6e ;an"les to si@e the combo box so it can display the longest function name, i.e AE#AE
N. 8ight clic% on the /ombo box and choose Format control then the Control tab. D. *n the Input range: type< Subs *n the Cell link: box type<)C) /hange the %rop "on lines: to ++ W. *n cell /( Enter this formula< 2*!/#2&&,&&,&8esult of &G*1BEV!Subs,/#$$ C. *n cell /A Enter this formula< 2*!/#2&&,&&,SU4T0T7=!/#,7A<7"))$$ :here AO:AB33 is the range the SU9T
Excel %ata Ta8les Bata Tables are a range of cells that are used for testing and analy@ing outcomes on a large scale. Excel %ata Ta8les
Bownload %ata Ta8le example wor%boo% %ata Ta8les are a range of cells that are used for testing and analy@ing outcomes on a large scale.
7 %ata Ta8le will show you how by changing certain values in your formulas you can affect the result of your formula. %ata Ta8les can store the results of many different scenarios for you in one table, so that you can analy@e them to select which scenario is your best option. The results are then written into a table form in your :or%boo% in a location specified by you. %ata Ta8les are written as arra- $ormulas , which therefore allows them to perform multiple calculations in a single location. There are two types of %ata Ta8les, 0ne+variable data tables and two+variable data tables.
The first thing you must do is to create a base or test model and tell your %ata Ta8le which formulas from your base model you want to test. This is easily done from inside the %ata Ta8le by placing a formula to reference the formula in the base model. ;ere is an example:
=ets say that we wish to purchase a new tractor for wor% on our family farm. :e need to %now that if interest rates fluctuate we can still afford to pay for the tractor. So we need to %now what our loan repayments will be, what our total repayments will be and how much interest we are paying.
". 0pen the attached wor%boo% on the 9ase Mo"el wor%sheet. The highlighted cells contain formulas. #. 1ow clic% on the :or%sheet tab named
ou can use a to71aria8le %ata Ta8le to gauge the effect on one formula by changing the value of two input cells within the one table. :ith this type of table, you can nominate two series of data that can be placed bac% into the original model into two different input cells. Using the example above, this means that you could nominate a series of interest rates to place in the original interest rate cell !4F$ and a series of loan terms to place in the Term of =oan cell !4D$. :hen creating a two+variable table, one series is entered into the first column of the table and the other into the first row of the table. 7s when creating a one+variable table, the formula reference that we want to test needs to be placed into the blan% cell at the top of the first column of the table. The attached wor%boo% shows an example of a Two+variable %ata Ta8le. #ules
7 couple of rules for %ata Ta8les < ". Set up a &base model& #. Bo not change the values in the &base model&
(. *t is a good idea to document the area around your data table, so you and other users can tell what it is you are analysing. A. ou can use %ata Ta8les to change up to two variables only F. ou can create as many one+variable or two+variable %ata Ta8les as you li%e in a :or%boo%. Bownload %ata Ta8le example wor%boo%
Sum 9eteen %ate #anges
SUMM3N4 NUM0ERS 0E7WEEN 5A7E RAN4ES. See also+ Count bet%een date ranges =et9s ta%e this a step further and sum up numbers in /olumn &4& that correspond to our date range. =SUM#<%UCTAB:A+35%ATE+3B30Q0+G!!HAB:A+3%ATE+3B30K0B!!H9B :9+3!!
:e can even add another condition to numbers in /olumn 4. Say we only want to sum numbers, in range 4"<#), that are greater than (. :e would use> =SUM#<%UCTAB:A+35%ATE+3B30Q0+G!!HAB:A+3%ATE+3B30K0B!!H9B :9+35,!H9B:9+3!!
Count &ith Multiple Criteria Examples of Excel formulas to count a range of cells that meet multiple criteria. ,B/0U1T, B/0U1T7, and SUM with an * function?formula.
There are many times that it become necessary to /0U1T cells based on multiple criteria. The examples below will show you ( ways that this can be done. -owever, often the most e$$icient metho" is to use a i1ot Ta8le *f you are not familiar with Pivot Tables, I cannot stress enough how much easier spreadsheet life becomes once you areH *f you are not already aware, the Excel /0U1T* formula?function can only chec% to see if specified cells meet one condition, e.g. CTIF S-ntax
=counti$range0criteria! =CTIFAB:A+305+3!
:hich would /0U1T all numeric cells in the range AB:A+3 where values were greater than #). 1ote the criteria argument is in the form of a number, expression, or text that defines which cells will be counted. or example, criteria can be expressed as #), )&, &2#)&, &3#)&, &1orth&, &1&. =CTIFAB:A+30+3!0 =CTIFAB:A+305+3!0 =CTIFAB:A+30>orth!0 =CTIFAB:A+30>H!
0%, so if we need to count a range of cells where corresponding cells !on the same row but different column$ meet ", or more conditions we can no longer use the /0U1T*. The other formulas we can use, in order of their efficiency, are "$ B/0U1T G B/0U1T7Bownload advanced examples of B/0U1T #$ SUM as an array formula ($ /0U1T with and * function nested and entered as anarray formula . -,U;/ will count only numeric cells where the cells% or corresponding cells meet a specified criteria. -,U;/A will count all cells !/e
or all examples * will use the data as shown below. :here A+:E+2 has been named< %ataTa8le
%CT
/ount the numbers in a column of a list, or database, that match criteria you specify. or example>=%CT%ataTa8le09+0Criteria! :ould /ount all cells in 9+:9+2 that meet the criteria is the named range< Criteria !shown below$
The top row of the range< /riteria has exact copies of the headings in the range BataTable . The reference to cell 9+ is telling the B/0U1T to count the numbers in 9+:9+2 that meet the criteria. :e could replace the reference to 9+ with the text &Iuantity&, or the number # as the &Iuantity& column is the second column in the table. The criteria text &4ourbon& and &od%a&, under the criteria table heading &Bescription&, tells B/0U1T that either &4ourbon& 08 &od%a& is a match. The same principle is used for the &7lcohol /ontent&, i.e. &-igh& 08 &=ow&. This is then seen by B/0U1T as an 08 condition. 1ote the repeat of the date under &Use 4y Bate&. This is needed when using more than # rows as the criteria as a blan% cell is seen as a wildcard character. *f we wanted to count only data that lies between # dates, we would need have # &Use 4y Bate& headings in our /riteria range and
use< 3D+7pr+#))F below one of these headings and QD+Run+#))F under another. This is then seen by B/0U1T as an 71B condition. Bownload advanced examples of B/0U1T %CTA
*f we changed the above B/0U1T example to< =%CT%ataTa8le0A+0Criteria!
:e would always get a result of ) !@ero$ regardless of the criteria being met, or not. This is because B/0U1T will only ever count all numeric cells and there are none in column A under the &Bescription& field. To get a count of these cells, we would need to use the B/0U1T7 function which would count all cells, text or numeric, where the criteria is being met. That is> =%CTA%ataTa8le0A+0Criteria! SUM as an arra- $ormula
1ormally, the SUM function will add all numeric cells in a specified range. -owever, when used as an array formula with criteria used, it will give us a count instead of a sum. See below example=SUM!!A'#A'1="2odka")3!'#'1&2A4U5!"67Apr7'$$1"))3!5'#5'1="8igh")) 9SUM!!A'#A'1="(ourbon")3!'#'1&2A4U5!"67Apr7'$$1"))3!5'#5'1="4ow")) 7s with the B/0U1T7 example, the above array entered !CtrlShi$t Enter $ SUM example would count all rows where the &Use 4y Bate& is greater than D+7pr+#))F, the &Bescription& is either &od%a& 08 &4ourbon& and the &7lcohol /ontent& is &-igh& 08 &=ow&. The reason it gives a count is because each chec% is returned as T8UE !has a value of "$ or 7=SE !has a value of )$. So, in the above example, the third row chec% would actually loo% li%e>=SUM!!$)3!$)3!))9SUM!!)3!)3!)) 7s you can see, unless all , criteria are met in at least one o$ the Sum $unctions , the result will always be ) !7=SE$. To read about this in detail, see our 7pril edition of our free Excel 1ewsletter CT an" IF
2/0U1T!*!7#<7#F2&4ourbon&,*!/##F37=UE!&D+7pr+ #))F&$,*!E#
The above, does the same as the array SUM example and must be entered by pushing Ctrl Shi$t Enter. 1ote we have told the /0U1T to count all cells in 4#<4#F where the criteria is met. *n other words, count all &Iuantity& cells where the rest of the specified rows of the &Bescription&, &Use 4y Bate& and &7lcohol /ontent& meet the specified criteria It is important to %now that using the array entered /0U1T and *, or the SUM as an array formula over a large number of cells will cause a noticeable slow down in Excel9s recalculation time. The B/0U1T G B/0U1T7 are far more efficient in this regard. -owever, as stated at the very Start , a i1ot Ta8le is better still when done correctly.
Count Each Item
:hen you have a large list of items you may wish to perform a count on them without counting entries that appear more than once, multiple times. *n other words you want to count each entronce onl- . /onsider the list show below, which has been sorted to easily see multiple entries. 7 normal count on this list ! CTA$ would result in the names> 4ill :, Bave -, ran T , ran% : and Mary 0 8eing counte" more that once. The function we can use is the %CTA. This is a good choice as it is by $ar the more e$$icient and easy to modify. %CTA From the Excel ;elp S-ntax: %CTA!"ata8ase ,field,criteria $ %ata8ase: is the range of cells that ma%es up the list or database. 7 database is a list of related data in which rows of related information are records, and columns of data are fields. The first row of the list contains labels for each column. Fiel" < indicates which column is used in the function. ield can be given as text with the column label enclosed between double 'uotation mar%s, such as &7ge& or &ield,& or as a number that represents the position of the colu mn within the list< " for the first column, # for the second column, and so on. Criteria < is the range of cells that contains the conditions you specify. ou can use any range for the criteria argument, as long as it includes at least one column label and at least one cell below the column label for specifying a condition for the column
E>%
0%, based on the list shown above, in cell %B enter the word Criteria !or any heading that is >TIFA+:A+0A+!=B
1ote the relati1e A+! references and a8solute A+! referencesH These are 1ital to the criteria orking. 1ow, in the cell you want your result shown enter this function =%CTAAB:AB330B0%B:%+!
This will give the the result you needH CTIF R SUM#<%UCT Metho"
The other method we can use, slower than the B/0U1T7 shown above, is a combination of SUMP80BU/T G the /0U1T* function. =SUM#<%UCTAB:AB335!)CTIFAB:AB330AB:AB33R!! Arra- Formula Metho"
The 7rray ormula method is by far the least efficient and falls over if?when blan%s occur in the list. =SUMB)CTIFAB:AB330AB:AB33!!
Count &or"s in a Cell Unli%e Microsoft :ord, Excel does not give us a ready made way to find out the number of words in a cell, or a range of cells containing text, or words. These Excel formulas show you how.
Unli%e Microsoft :ord, Excel does not give us a ready made way to find out the number of words in a cell, or a range of cells containing text, or words. -owever, with the help of the SU9STITUTE function?formula and the /E> function?formula we can. *f you are not familiar with these functions?formulas * have written an explanation below. SU9STITUTE
S-ntax 2substitute!text,ol"Ptext ,nePtext ,instanceOnum$ &hat it "oes Substitutes newOtext for oldOtext in a text string. Use SU4ST*TUTE when you want to replace specific text in a text string> use 8EP=7/E when you want to replace any text that occurs in a specific location in a text string. Example 2SU4ST*TUTE!7", &Sales&, &/ost&$ *f AB had the text &Sales Bata& the formula result would be &/ost Bata&. /E> S-ntax 2len!text$ &hat it "oes =E1 returns the number of characters in a text string. Example 2=E1!7"$ *f 7" had the text &Sales Bata& the formula result would be ") as AB has G text characters and B space character. Count &or"s in a Cell
The formula below will return the number of words !not characters$ in cell AB 2=E1!7"$+=E1!SU4ST*TUTE!7",& &,&&$$" 9e aare that super$luous spaces are also counte" and may give misleading results. To ensure accuracy we can simply nest the T#IM formula function?formula in the first /E>
2=E1!T8*M!7"$$+=E1!SU4ST*TUTE!7",& &,&&$$" Count &or"s in a #ange o$ Cells
The formula below will return the number of words !not characters$ in cells AB:A2 2=E1!T8*M!7"G7#G7(G7AG7F$$+=E1!SU4ST*TUTE!7"G7#G7(G7AG7F,& &,&&$$F
2=E1!T8*M!7"G7#G7(G7AG7F$$+=E1!SU4ST*TUTE!7"G7#G7(G7AG7F,& &,&&$$ 8ows!7"<7F$ eep in kin" that the $ormula a8o1e &I// return B $or an empt- cell0 "ue to 4B. <1ercome that pro8lem 8- use o$ this $unction
2=E1!T8*M!7"$$+=E1!SU4ST*TUTE!T8*M!7"$,& &,&&$$!=E1!7"$3"$ The !=E1!7"$3"$ will either return T8UE !"$ or 7=SE !)$.
Count o$ Each Item in a /ist :ith the aid of 7dvanced ilter and the /0U1T* we can get a count of each item that appears in a list.
:ith the aid of A"1ance" Filter and the CTIF we can get a count of each item that appears in a list. =et9s say the list currently resides in AB:AB33, with 7" being a heading and many items appearing more than once. :e first need to create ourselves a list which has only one occurrence of each item. Create a Uniue Item /ist
"$ Select 7"<7")) and then go to %ata3Filter3A"1ance" Filter #$ Ensure &7ction& is set to Cop- list to another location ($ &=ist 8ange& is AB:AB33 and &/riteria 8ange& is blan%. A$ &/opy to& is FB !or any single cell in row "$. F$ /hec% the &Uni'ue records only& chec%box and then clic% &0%&.
1ow, Starting from FB !or the cell you chose$, you have a list containing only one occurrence of each item in the list. Enter the CTIF Formula
1ow we have the uni'ue list, we can now count how many times each item appears in our original list in AB:AB33. So in F+ !" is a heading and can read &/ount&$ enter the CTIF ormula as shown below 2/0U1T*!7#<7")),#$ 1ow clic% the Fill ;an"le of F+ while it9s selected, or copy down manually. 1ote the use of the absolute range A+:AB33 and the absolute column and relative row of F+.
Count 9eteen %ate #anges
To +ount %ates that fall /et)een a %ate ran-e )e +an use SU95RODU$T )ith a t)ist. Suppose you hae a list of ali% %ates in #=:#8;. The formula )e +an use to +ount %ates that fall /et)een 8 %ates isA 'SUM1R;5UC7(()A)8+)A)*258()A)8+)A)*=E8
Where D= houses your start %ate an% ,= you en% %ate. Or4 )e +an har% +o%e the %ates into our SU95RODU$T *un+tion /y usin- the D#T, *un+tion. 'SUM1R;5UC7(()A)8+)A)*25A7E(*8,>,*?()A)8+)A)*=5A7E(*8, @,8 Syntax for the date function is: DATE(Year, Month, Day) /<<U Perhaps one of Excels most commonly used Excel ormulas is the =00;UP. *t is also possibly the Excel formula that most people have problems understanding.
Excel /<<U Formula Explaine" <# Sho Me isuallPerhaps one of Excels most commonly needed unctions is the =00;UP. *t is also possibly the function that most people have problems understanding. The Excel =00;UP function is used to loo% for specified data in the first column of a table of data. 0nce found it will return a result, on the same row, a specified number of columns from the first column. The syntax for =00;UP is< 2vloo%up!looGupHvalue,tableHarray,colHindexHnum %rangelookup$
*t is used in the following manner< =/<<U%og0AB:EB3330,0False!
1ote the use of False as the optional rangelookup 7rgument. This tells the =00;UP to find an exact match and is most often needed when loo%ing for a text match. *f this is omitted, or True, you will often get unwanted results when searching for text that is in an unsorte" column of data. This means that when True is used, or the rangelookup 7rgument is omitted, your data should be sorted !by the $irst column$ in ascending order. The use of True, or rangelookup 7rgument is omitted, is most often used when loo%ing at numeric data that resides in the first column of your table of data.
B
A
9
C
Amoun t
>ame
Age
+ #FN.CF 4ill
#F.NN Mary FAW.)) Bave AWC.(# ran% F)).#F Sue (NW.FC -illary C)".FN ;ate
FN ## FC #" AW "C "F #F
CC.CF 7leisha
((
, "#F.N( Roe O 2 @ Q K G B 3
*f we were to use< =/<<U,@K.2G0AB:CB30+!
on the above data, we would get a result of &Mary& and >% our data is not sorted by Amount . This is because =00;UP loo%s in /olumn 7, Starting from 7", and as soon as it encounters the amount 2OK.33 it drops bac% to the cell above because 2OK.33 is greater than the looGupHvalue of ,@K.2G *f we sorted our data by Amount we would get the desired result. :e could also get the desired result by using< =/<<U,@K.2G0AB:CB30+0False!
The use of False as the rangelookup 7rgument forces =00;UP to search all values and only stop when it finds an exact match. *f an exact match does not exist we get the 1?7H error.
The metho" o$ sorting is 8est as a =00;UP that searches in a sorted range is MU/- faster. The effect of this can be significant if the table is large and?or you have many =00;UP functions. ;o to stop the D>)A( error * Excel i"eo Tutorials
Stop D>)A( In lookup
Sto! 7e N/AB Error in ";;
"$ 7dd your loo%up formula to a spare column !e.g /olumn &7&$ and allow the 1?7H to happen. #$ 1ow reference these cells from the re'uired cells li%e this> 2*!*S17!7"$,),7"$ ($ -ide /olumn &7& by selecting it and going to Format5Column5;i"e The se+on% most eB+ient is pro/a/ly lie thisA
*nstead of> 2=00;UP!&Bog&,7" CI*2$OUNTI*2#=:#=;;4Do-34!(OOEU52Do-4#=:D=;;484*#(S,34;3 The least eB+ient metho% is lieA
2*!*S17!=00;UP!&Bog&,7"
Excel ;/<<U 7nother one of Excels most commonly needed Excel ormulas is the -=00;UP.
Excel Dloou! formula$function ex!lained The Excel -loo%up formula is perhaps one of the most used formula used when loo%ing up data set up in a table. Want to learn the ,F+el Hlooup formula an% other ,F+el *ormulas? The ,F+el Hlooup *ormula ,Fplaine%
Perhaps one of Excels most commonly needed unctions is the -loo%up. The Excel -loo%up function is used to loo% for specified data in the first row of a table of data. 0nce found it will return a result, from the same column, a specified number of rows down from the first row. The syntax for -loo%up is< %BlooGup! looGupHvalue %tableHarray %ro5HindexHnum %rangelookup)
*t is used in the following manner< =;lookup%og0AB:EB3330,0False!
1ote the use of False as the optional rangelookup 7rgument. This tells the -loo%up to find an exact match and is most often needed when loo%ing for a text match. *f this is omitted, or True, you will may get unwanted results when searching for text that is in an unsorte" row of data. This means that when True is used, or the rangelookup 7rgument is omitted, your data should be sorted !by the $irst row$ in ascending order. The use of True, or rangelookup 7rgument is omitted, is most often used when loo%ing at numeric data that resides in the first row of your table of data. ;/<<U Example
8
A
0
C
Amou nt
Name
Age
*
G8>. "ill >
>
G=8>. Joe 6
88
G
G8>. 9ary
>
H
G>KL. Dae ;;
8=
I
GKL. *ran 68
KL
>
G>;;. Sue 8>
=
@
G6L. Hillary >
=>
?
G;=. Eate >
8>
8 G. #leisha >
66
*f we were to use< =;/<<U>ame0AB:CB30+0False!
The use of False as the rangelookup 7rgument forces -loo%up to search all values on row " and only stop when it finds an exact match. *f an exact match does not exist we get the 1?7H error. ;o to stop the D>)A( error hen using ;lookup
0ne very common 'uestion as%ed by Excel users is &-ow can * stop -loo%up returning 1?7H when it cannot find my dataJ&. There are a few ways this can be done, unfortunately the most popular way is also the least efficient. This is to use the IS>A function as shown below< 2*!*S17!-loo%up!&7ccounts&,7"<"))),#,alse$$,&&,-loo%up!&7ccounts&, 7"<"))),#,alse$$ The use of the *S17 function li%e this will force Excel to perform the -loo%up twice if the value does exist, which is most often the case. This can become a problem by sloing "on Excel's recalculation time . 7 slightly better options is< 2*!/0U1T*!7"<",&7ccounts&$,-loo%up!&7ccounts&,7"<")))),#,alse$,&&$
/e$t /ookup in Excel Excel is very rich in =oo%up formulas, with perhaps the =00;UP being the most popular. -owever, the draw+bac% with all Excel9s =oo%up formulas is that they
will only loo% in the left most column and return the result from the corresponding cell to the right. There are times when users need to loo%up data in any column of table and return the corresponding cell to the left. Excel is very rich in =oo%up formulas, with perhaps the =00;UP being the most popular. -owever, the draw+bac% with all Excel9s =oo%up formulas is that they will only loo% in the le$t most column and return the result from the corresponding cell to the right . There are times when users need to loo%up data in an- column o$ a ta8le and return the corresponding cell to the le$t. To do so, we can use the I>%E R MATC; ormula?unctions I>%E R MATC;
The I>%E ormula?unction has # versions available. :e will only be using the $irst 1ersion here> "$ I>%E ormula?unction. 8eturns the value of a specified cell or array of cells within array. S-ntax I>%E!arra-0roPnum,columnnum $
#$ I>%E ormula?unction. 8eturns a reference to specified cells within reference. S-ntax I>%E!re$erence0roPnum ,columnnum%areanum $
The M7T/- ormula?unction 8eturns the relative position of an item in an array that matches a specified value in a specified order. Use M7T/- instead of one of the =00;UP functions when you need the position of an item in a range instead of the item itself.
S-ntax MATC;!lookupP1alue ,lookupParra- ,matchOtype$
See Excels help for full details on these # ormula?unctions. /e$t /ookup
To do a left loo%up we can use the I>%E unction?ormula with the MATC; unction?ormula nested in the #oPnum 7rgument of the *1BEV unction?ormula. =et9s say our table of data resides in a table named %ataTa8le and this named range refers to< AB:%G See *mage below>
7s you can see, the first example uses the formula< 2*1BEV!BataTable,M7T/-!&8;PA&,*B,)$,"$ and ma%es use o$ the >ame" ranges . The second does exactly the same, but does not use the >ame" ranges , i.e. 2*1BEV!7"<BC,M7T/-!&8;PA&,/"</C,)$,"$ *n =aymen9s terms, the formula is telling Excel to use the range AB:%G as the arra7rgument, row A for the roPnum 7rgument !returned via the MATC; ormula?unction$ and /olumn B of the arra- AB:%G . :hich returns the data in cell A2 !Mary ;$. #eturning the Column >um8er an" #o >um8er :e can either ta%e this a step further and ensure the columnPnum argument supplied is always correct by nesting another MATC; ormula?unction into the columnPnum argument. The formula for this would be>
2*1BEV!BataTable,M7T/-!&8;PA&,*B,)$,M7T/-!&1ame&,-eadings,)$$ 08, with no 1amed 8anges 2*1BEV!7"<BC,M7T/-!&8;PA&,/"</C,)$,M7T/-!&1ames&,7"<B",)$$:ith both the above examples, we can assure that moving the >ames /olumn will not cause our formula to return an incorrect result.
Excel /ookups &ith Arra- Constants :ould li%e to show you what * call< *n+/ell+=oo%ups. These are the perfect replacement for multiple nested * functions.
oou!s Wit Arra# Constants :ould li%e to show you what * call< *n+/ell+=oo%ups. These are the perfect replacement for multiple nested * functions. Enter " in cell 7" Select 7" and while holding down the /trl %ey and drag down by the ill -andle until you reach /ell 7#). 1ow, in 4" add this formula> =/<<UAB0B0@0BB0B@V0B720@7B30BB7B20B@7+3V!
and double clic% the ill -andle so this formula is copied down to 4#). 7s you can see, this returns a text result of the numeric scope our numbers fall into. -ere9s the details of how this wor%s. Text 'uoted from Excel help S>;/A?#=4,,@U*!lookupvalue%lookupvector%resultvector) looGupHvalue: +euired. A value that 4,,@U* searches for in the first vector. 4ookupvalue can be a number% te
or both loo%upOvector and 8esultOvector we have used what is %nown as Arra- Constants 7fter reading the lin% above you should understand &7rray /onstants&. So, as you can see our &loo%upOvector& is placed in ascending order using the lowest value for each numeric scope. 0ur &resultOvector& 7rray /onstants correspon" to our &loo%upOvector& 7rray constants.
%-namic Formulas 8ather than bog you Spreadsheet down with hundreds, if not thousands of formulas, use a single formula with flexible and changeable 7rguments. *n this example * will use the *1BEV?M7T/- functions nested together. ou can also instruct the end formula to return the corresponding cell, to the match, on the left or right. -owever, the the same principles can apply to most Excel formulas.
Excel 5#namic Formulas 8ather than bog you Spreadsheet down with hundreds, if not thousands of formulas, use a single formula with flexible and changeable 7rguments. *n this example * will use the *1BEV?M7T/functions nested together. ou can also instruct the end formula to return the corresponding cell, to the match, on the left or right. -owever, the the same principles can apply to most Excel formulas.
*n this example * have used the range 7# 2*!*SE8808!*1BEV!BataTable,M7T/-!=oo%Oor,*1B*8E/T!/olumnOToO=oo%$,)$",*! =oo%O=eftO8ight2&8ight&,M7T/-!/olumnOToO=oo%,-eads,)$0ffsetOToO/olumn,M7T/-!/ olumnOToO=oo%,-eads,)$+0ffsetOToO/olumn$$$,&*nvalid /riteria&,*1BEV!BataTable,M7T/-!=oo%Oor,*1B*8E/T!/olumnOToO=oo%$,)$",*!=oo%O =eftO8ight2&8ight&,M7T/-!/olumnOToO=oo%,-eads,)$0ffsetOToO/olumn,M7T/-!/olumn OToO=oo%,-eads,)$+0ffsetOToO/olumn$$$
2*1BEV!BataTable,M7T/-!=oo%Oor,*1B*8E/T!/olumnOToO=oo%$,)$",*!=oo%O=eftO8ig ht2&8ight&,M7T/-!/olumnOToO=oo%,-eads,)$0ffsetOToO/olumn,M7T/-!/olumnOToO=oo %,-eads,)$+0ffsetOToO/olumn$$ Do)nloa% ,Fample
I>%E)MATC; Functions :hile the loo%up unction is very useful, it cannot loo% in an/olumn, onl- the Bst . 7lso, it cannot offset x columns to the left or return the value x rows before or after the found value. 7n *1BEV G M7T/- combo will allow for all of this flexibility.
:hile the loo%up unction is very useful, it cannot loo% in an- /olumn, onl- the Bst . 7lso, it cannot offset x columns to the left or return the value x rows before or after the found value. 7n *1BEV G M7T/- combo will allow for all of this flexibility. SYNT#' I>%E!arra-,rowOnum,columnOnum$ MATC;lookupP1alue0 lookupParra- , YmatchOtypeZ$
/onsider the above table and that we need to find out the &Proect& corresponding to the &0riginal Proect Start Bate& of the A?)W?#))C. :e would use> 2*1BEV!7"<BC,M7T/-!B7TE!#))C,W,A$,4"<4C,)$,"$ would return &Proect A&. :here the dates are in the European format of d?mm?yyyy. The " at the end tells *1BEV to return the cell from the "st /olumn of the arra- 7"<BC. The Match is told to return the relative row number of the B7TE!#))C,W,A$ in the lookupParra- of 4"<4C. The use of @ero !)$ in the M7T/- functions tells it to find and exact matching date. 1ow consider we need to find the the &Proect& x rows 8e$ore or a$ter the &0riginal Proect Start Bate& of the A?)W?#))C. :e would use> 2*1BEV!7"<BC,M7T/-!B7TE!#))C,W,A$,4"<4C,)$7B,"$ to return the &Proect& B ro 8e$ore the &0riginal Proect Start Bate& of the A?)W?#))C 2*1BEV!7"<BC,M7T/-!B7TE!#))C,W,A$,4"<4C,)$4B,"$ to return the &Proect& B ro a$ter the &0riginal Proect Start Bate& of the A?)W?#))C
Fin" >th
7s you may already %now, we can use /<<U , or I>%E)MATC; to locate the first occurrence of a specified value in a list, or table of data. -owever, Excel has no ready made formula that allows us to locate say the second, or third occurrence etc of a specified value. To do this would normally the use of a /ustom Excel 47 unction, or a horribly inefficient A rra- $ormula . 4elow you will find + a-s to locate the nth occurrence of a specified value and return the value on the same row but in another column. 0ne is straight forward and re'uires no 47, while the second does ma%e use of Excel 47. >either nee" arra- $ormulas(
Fin" the >th on 9A Metho".
* will use the table of data as shown below for the example, sorte" onl- $or easier rea"ing . 1ote the formula that resides in the selected cell A+ !see ormula bar$ is< =('E" "E,U;/I!F(F'#F('%(') and is used to obtain a count of each occurrence. *t is vital to note the 7bsolute of 9+ and the relative row reference of 9+. This is vital so when you copy the formula down, it will extend the /0U1T* range accordingly.
1ote also that this extra column can be hidden from view to ma%e for less clutter. *f you have not already guessed, we now simply use a standard =00;UP, or *1BEV?M7T/- to obtain the occurrence we want, for example> 2=00;UP!&4ill (&,7"</##,(,7=SE$ :ould yield a return value of &4ill (& Fin" the >th
The custom function?formula below was written in Excel #))( and may not wor% in earlier Excel versions. Function Nth_Occurrence(range_loo As Range, !ind_it As String, _ occurrence As "ong, o!!set_ro# As "ong, o!!set_col As "ong) Dim lCount As Long Dim r)ound As Range
et r)ound " range2loo+.Cells,0- 0 )or lCount " 0 o occurrence et r)ound " range2loo+.)ind,!ind2it- r)ound- $l3alues- $lW(ole /e$t lCount /t(2Occurrence " r)ound.o!!set,o!!set2row- o!!set2col
End Function
The custom $unction)$ormula can no 8e use" like shon 8elo
=;th,ccurrence!F(F#F(F''%"8arry"%0%$%) The s-ntax is
=;th,ccurrence! rangeHlooG % findHit %occurrence %offsetHro5 %offsetHcol )
:here 9B:9++ !rangeOloo%$ is the range to find the ,r" occurrence !occurrence$ of &;arr-& !findOit$. :hen found, it will return the value by offsetting 3 ros !offsetOrow$ and B column !offsetOcol$ to the right. The offsetOrow and offsetOcol arguments can 8e negati1e 1alues i$ that is hat is nee"e".
Excel /ookup Ta8le /ookup is the perfect Excel formula for numerical values contained in a range. -owever if you tried to use =oo%up with text in a table, it9s use would be limited, or example surnames such as Smith, Smithson, Smithy, Smithson+Racobs would create problems. /ookup is perfect for numerical values contained in a range. -owever if you tried to use =oo%up with text in a table, it9s use would be limited, or example surnames such as Smith, Smithson, Smithy, Smithson+Racobs would create problems. *f you entered a surname incorrectly, =oo%up will step bac% to the closest possible match.
*f you wish to glean information from a table that uses text, you can use =oo%ups optional fourth argument called match+type. This argument forces =oo%up to return 1?7 if an exact match cannot be found in the first column of your table. This type of =oo%up is perfect to glean information from an address list. =et9s say we wanted to find out the phone number of Smithson+Racob. :e would use 2=00;UP!4"F,7#)A in lookup $ormulas . *f we wanted to find the Bate of 4irth from within the Table we could use 2=00;UP!4"F,7#
7nother way that we could write the same =oo%up is by referring to the Surname within the table range li%e this 2=00;UP!7N,7#
%-namic Excel /ookups These are very handy for when you loo%up data but cannot be sure which column your returned data should come from. *n other words, users may have inserted a column within the table. %-namic /ookups in Excel ou can "onloa" a orking sample $rom the here
These are very handy for when you loo%up data but cannot be sure which column your returned data should come from. *n other words, users may have inserted a column within the table. The =00;UP is about the most popular of the =oo%up functions so we will use this function for examples.
0%, let9s go with a sample using a small table of data for ease of understanding. ou can "onloa" a orking sample $rom the here The layout of our data are headings in row " from 7"ames * %epartment * Age * en"er * a- #ate ); Birectly underneath these headings is related data. or simplicity though, only down to row W. C#EATE >AME% %?>AMIC #A>ES 0r here for all types of 1amed 8anges . >AMI> T;E >EE%E% #A>ES ou can, if you wish, use many more rows than 7"<7"C,4"<4"C etc to ensure your dynamic named ranges will %eep expanding
"$ :hile on the &Bata& :or%sheet 5o to Insert5>ame5%e$ine . #$ *n the &1ames in :or%boo%<& box type< BataOTable. ($ *n the &8efers to<& box type, or copy?paste> %((S2!$ataI)*)+,-,-,C&J2*!$ataI)*)+:)*)+;",C&J2*!$ataI)+:)+"" A$ /lic% 7dd but not 0;, ust yet. F$ 8epeat steps #, ( and A using the names !no 'uotes$ and formulas below. &>ames& %((S2!$ataI)*)+,-,-,C&J2*!$ataI)*)+:)*)+;",+" &%epartment & %((S2!$ataI)K)+,-,-,C&J2*!$ataI)K)+:)K)+;",+" &Age& %((S2!$ataI)C)+,-,-,C&J2*!$ataI)C)+:)C)+;",+" &en"er & %((S2!$ataI)$)+,-,-,C&J2*!$ataI)$)+:)$)+;",+" &a-P#ateP; & %((S2!$ataI))+,-,-,C&J2*!$ataI))+:))+;",+" &;ea"ings & %((S2!$ataI)*)+,-,-,+,C&J2*!$ataI)+:)+""
N$ 1ow after clic%ing A"" for the last named range, clic% < . *t is vital that there is no other data on the &Bata& :or%sheet other than your table of data occupying 7"! %F4=&1!@Lune =@,$ataH2able,C4J!$epartment",(*4S"
This formula will locate the name &Rune ;& in the "st column of data !1ames$ and return the corresponding row from the &Bepartment& column. Should a user insert a column anywhere within, or at the end of the table, the formula will still return the correct result. -owever, should a column be added before /olumn 7 !ma%ing &1ames& become column 4$ it will fail. To address this potential problem we could use In"ex ith Match . I>%E &IT; MATC; %'J$M!$ataH2able,#*2CB!@Lune =@,James,-",#*2CB!@$epartment@,Beadings,-""
This formula is the most flexible as not only will it accommodate columns being added anywhere within, before or after the table, we can also use it to loo% left of our 1ames column. This may be needed when?if a column is added to the Start of our table. /<<U &IT; MATC; %F4=&1!@Lune =@,$ataH2able,#*2CB!@$epartment@,Beadings,-""
7gain though, as it uses =00;UP it will always loo% in the first column only of the table !BataOTable$ for the name. I>TE#SECTI<> %LuneH= $epartment
This last one re'uires us to add some more named ranges, but we can do so with the aid of Excel. "$ Select the table of data but do not include any headings. #$ 5o to Insert5>ame5Create and ensure that <>/? &=eft column& is chec%ed and clic% < . 0%, we have now created a named range for all our names. *t should be noted that, as spaces are
not allowed, Excel oul" replace an- spaces ith the un"erscore . That is &Rune ;& would be named &RuneO;&. 1ow we can simply Enter the *ntersection formula as shown below into an y cell and it will return the Bepartment !or any other column$ of the persons name we use. *n this case it9s &Rune ;&. It is 1ital to note that there IS a space 8eteen WuneP an" %epartment %LuneH= $epartment
/ookup R #eturn Correspon"ing #esult :hile we can use any of the lin%s above for loo%up formulas, all re'uire a table of cells in a :or%sheet. *f you only have small number of items to return based on the value of another cell, we can do the loo%up without leaving the cellH /ookup &ith Cell
:hile we can use any of the lin%s above for loo%up formulas, all re'uire a table of cells in a :or%sheet. *f you only have small number of items to return based on the value of another cell, we can do the loo%up without leaving the cellH Choose R Match
The formulas we can use to perform the loo%up within the cell is the /-00SE function, nested with the M7T/- function. See Excel help if unfamiliar we these functions. 0%, let9s assume you have a changing value in 7" and depending on that value we wish to return a result to 4". or example, %eeping it simple, we have a alidation =ist that a user can choose from any one of these /at, Bog, Mouse, -orse or 8abbit. 4ased on their choice we wish to show a different result in 4". *n 4" Enter this formula> =C;<
Enter, or choose any value from /at, Bog, Mouse, -orse or 8abbit and you will see how it wor%s. The use of Cat0%og0Mouse0;orse0#a88itV in the M7T/- ormula is %now as an arra- constant !See Excel help for details$. 1ot be confused with 7rray ormulas eeping it Clean R lo8al
The main problems with the above formula is it9s long, but most importantly to edit the loo%up values or the array constant, we would need to do each cell individually, or use E"it5#eplace , if possible. This is where we can 8ange 1ames , or specifically >ame" Constants . -owever, when done, we can no longer use the /-00SE unction. :e use the *1BEV unction instead. "$ 5o Insert5>ame5%e$ine and type 1et in >ames in ork8ook
#$ *n #e$ers to: type =G"at"%"-og"%"Mouse"%"8orse"%"+abbit"H and clic% A"" ($ Type 1et(ood in >ames in ork8ook A$ *n #e$ers to: type =G"at ood"%"-og ood"%"Mouse ood"%"8orse ood"%"+abbit ood"H and clic% A"" then Cancel . 1ow, in the cell use =I>%EetFoo"0MATC;AB0et03!!
:hen?if we need to edit the named constants 1et(ood or 1et , we can do so in one location and our result will flow through the entire :or%boo%. /ookup Scale
*n the above examples we have used text values. -owever, it is often needed that we need to loo%up numbers that match a scale. That is, all results between ) and CC.CC should return one result, while those between ")) and "CC.CC another and so on... =et9s say we need to match the sales amount by person to %now what percentage their commission is. "$ 5o Insert5>ame5%e$ine and type Commission in >ames in ork8ook #$ *n 8 e$ers to: type =G$%$.%$.'%$.0%$.%$.1%$.J%$.6%$.K%$.L%H and clic% A"" ($ Type Sales in >ames in ork8ook A$ *n #e$ers to: type =G$%$$%'$$%0$$%$$%1$$%J$$%6$$%K$$%L$$%$$$H and clic% A"" then Cancel . 1ow, in the cell use =I>%ECommission0MATC;AB0Sales0B!!
This will return a between ) and ")), based on the value in 7".
Sales
L Commissio n
)+CC.CC
)
"))+ "CC.CC
")
#))+ #CC.CC
#)
())+ (CC.CC
()
A))+ ACC.CC
A)
F))+ FCC.CC
F)
N))+ NCC.CC
N)
D))+ DCC.CC
D)
W))+ WCC.CC
W)
C))CCC.C C) C ")))
"))
*t is important to note that both array constants !in the #e$ers to$ are in 7scending order and we have use B for the optional Matchtype argument for the M7T/- unction. ou can use Bescending order, in which case Matchtype must be 7B
Excel ;-perlinks -ow to get the most from hyperlin%s. -yperlin%s that still wor% when a :or%sheet name changes. /reate a hyperlin% to a /hart Sheet
-yperlin%s provide us with a convenient way to ump to a specific cell, wor%sheet, wor%boo%, another program on your hard drive, a networ%, an intranet or the internet. :e can give our hyperlin%s meaningful names, and provide a screen tip available when the mouse is hovered over them. T< C#EATE A ;?E#/I> T< A> EISTI> FI/E <# &E9 AE
The easiest way to do this is to right clic% on the cell in which you wish to place your hyperlin%, then select -yperlin% from the shortcut menu. Under =in% to< in the dialog select Existing ile or :eb Page. 0nce you do this, there are a few options you can choose. Current Fol"er
*f you want to select a file from the current folder, use this option and clic% the file you want to
lin% to. 9rose" ages
*f you want to select a web page, use this option to select from a list of web pages you have browsed. #ecent Files
*f you want to lin% to a recently used file, use this option. A""ress
ou can paste the address of the file you wish to lin% to in this area. inally, you can type the text you wish to display in the Text to %ispla- option, and if you wish you can add a screen tip that can be seen when the mouse is hovered over the hyperlin%. C#EATE A ;?E#/I> T< A SECIFIC /ACE <> A &E9 AE
To hyperlin% to a specific point in a webpage, you must first boo%mar% the location you wish to hyperlin% to. ou can then ma%e a selection from /urrent older, 4rowsed Pages, 8ecent iles, type in the address in the 7ddress< area or select the web page by opening your browser and searching for the web page you want to lin% to. 0nce found, switch bac% to Excel without closing down your browser. /lic% 9ookmark , then double clic% the boo%mar% you want to use. T< C#EATE A ;?E#/I> T< A /ACE I> A &<#9<<
*f you wish to lin% to another location in your current wor%boo%, or another wor%boo%, you can use a cell reference to do this. ou can also use a named range , but you must ensure that the cells are named in the destination wor%boo%. 7gain right clic% on your text or graphic you wish to represent the hyperlin%, then select -yperlin% from the shortcut menu. There are two options you can select<
lace in this %ocument: Use this option to lin% to a location in the current wor%boo%. Existing File or &e8 age: To lin% to a location in another wor%boo%, choose Existing ile or :eb Page. 0nce you have located the wor%boo% you with to lin% to, select the 4oo%mar% button and in the list under /ell 8eference, select the sheet you wish to lin% to, and in the Type in the cell reference box, enter in the cell reference number. /lic% 0;. *f you have given your cells a defined name, then in the list under Befined 1ames, clic% the name of the range you wish to lin% to and clic% 0;.
'f you use this option, it is better to use a defined name to linG to another WorGsheet. 'f you do this and your 5orGsheet name changes, your hyperlinGs 5ill be unaffected. C#EATE A ;?E#/I> T< A >E& FI/E
To create a hyperlin% to a new file, you must first right clic% on your text or graphic to be used to represent the hyperlin%. Select Create >e %ocument $rom the /ink to: area of the dialog. Under 1ame of new document< enter in the name of your document. The full path should be shown under the heading ull path< *f this is not the path you want, clic% the /hange button and select the location, then clic% 0;. There are two options under the :hen to Edit< box, ma%e the choice to either !a$ Edit the 1ew Bocument =ater or !b$ Edit the 1ew Bocument 1ow. ;?E#/I> T< A> EMAI/ A%%#ESS
inally, if you wish to hyperlin% to a specific email address, again right clic% on your text or graphic to represent your hyperlin%. Then select Email address under the =in% to< area of the dialog. *n the email address and Subect box, type in the recipient and the subect of your email. 3 Jote that some bro5sers and email accounts 5ill not recogniNe a Subject line. ;?E#/I> T< A C;A#T S;EET
Unfortunately there is no standard way to lin% to a /hart Sheets. *n fact, Excel ill not let -ou "o this. The wor%around to this is 'uite simple though. "$ 7dd a ne :or%sheet.
#$ 0n the :or%sheet you would li%e the hyperlin% to the /hart sheet on, add a hyperlin% to the new :or%sheet. -owever, the text to "ispla- should read something li%e< Spen"ing Chart or any applicable text. ($ 7ctivate the newly added :or%sheet and go to Format5Sheet5;i"e A$ 8ight clic% on the hyperlin% :or%sheet name tab and choose ie Co"e. *n here paste the code below and change Spen"ing Chart to suite your specific text. $ri%ate Su& 'orsheet_Follo#perlin(B*al +arget As perlin)
#! arget.e$toDisplay " 4pending C(art4 (en (eets,4pending C(art4.elect
End Su&
;-perlink to /ookup #esult Excel is 'uite rich in =oo%up type formulas, some of the more popular ones are =00;UP , *1BEV?M7T/- and -=00;UP . These all do a great ob in loo%ing up a value we specify and then return a corresponding result. -owever, it9s often the case that we need to go to the row containing the found value, or its offset return.
Excel is 'uite rich in =oo%up type formulas, some of the more popular ones are =00;UP , *1BEV?M7T/- and -=00;UP . These all do a great ob in loo%ing up a value we specify and then return a corresponding result. -owever, it9s often the case that we need to go to the row containing the found value, or its offset return. ;-perlink To Foun" #esult
:hat we can do to actually go to our found result is nest the /E== function with some Text unction nested inside the -yperlin% unction . =ets use an example table as shown below. The upper left cell is 7" and only the "st ") rows and ( columns are shown to %eep it simple. >ames
Age
Cit-
Bave
#"
1ew or%
4ill
((
:ashington
ran%
FA
Ballas
Mary
"C
San rancisco
Rohn
F)
Utah
-arry
FA
;ansas
Rune
()
0hio
;ate
N)
/alifornia
7leisha
FF
Montana
:hat we are doing is loo%ing up a name from /olumn 7 and returning any corresponding column from the found row in /olumn 7. 4efore we get to the loo%up part though we need to return the :or%boo% and :or%sheet name in the format needed for the -yperlin% function. or example X9ookB.xlsYSheetB( 7s mentioned above, we use the /E== unction with some Text unctions to parse out only the bits we need. 7s the /E== unction is a olatile unction it pays to create onl- B instance of the needed ormula and re+use as many times as needed. 7 1amed ormula is ideal for this. ". 7ctivate the :or%sheet the data table resides on. #. 5o to Insert5>ame5%e$ine or Formulas5>ame Manager + >e in #))D. (. Use the name WbSheet and have it refer to< =MI%CE//$ilename0 AB!0FI>%X0CE//$ilename0AB!!0+2@!R( A. < that and bac% to Excel. ou can see what this will do by simply typing =&8Sheet into any cell. 7s we are going to be loo%ing up a name from our data table it would also pay to create a alidation list based off the names in /olumn 7 !optional$. =et9s say the name will be chosen from, or typed in B. *n any spare cell Enter the formula as shown below =;?E#/I>&8Sheet R A%%#ESSMATC;B0AB:A+33303!0B!0B R s' In$o!
1ote the underlined B this what determines the relative /olumn in our table to which we go when clic%ing the -yperlin%. This can of course also be variable by simply entering the number in another cell, that is =;?E#/I>&8Sheet R A%%#ESSMATC;B0AB:A+33303!0+!0B R s' In$o!
0r, if the column order may change, we can again !optional$ use a alidation list to specify the /olumn heading and then use the M7T/- function to return its relative position. *n the case below * have again used + to return the column heading needed. =;?E#/I>&8Sheet R A%%#ESSMATC;B0AB:A+33303!0MATC;+0AB:WB03!!0B R s' In$o!
%-namic #eports -ere you can see how we can the Batabase functions to produce dynamic reporting from a table of data.
PivotTables are an excellent tool to use in Excel when you need a report, or statistics based on a table of data. -owever, for most users there are over+whelming and give too much detail. #lternatie Report
The %ata8ase Functions is Excel combined with Bata alidation and some outside the box thin%ing, is another easy way to get reports on your table data. :e use Bata alidation to refer to a 1amed 8ange list of
where this range represents your table headings. 1ow starting in 7F Enter SUM0 >um8er CT0 All Count0 ro"uct0 Min0 Max0 A1erage across to 5F. 1ow the formulae going across, starting in EN, directly underneath their headings Enter> ". 2BSUM!Table,ield,*1B*8E/T!/riteria/ell$$ #. 2B/0U1T!Table,ield,*1B*8E/T!/riteria/ell$$ (. 2B/0U1T7!Table,ield,*1B*8E/T!/riteria/ell$$ A. 2BP80BU/T!Table,ield,*1B*8E/T!/riteria/ell$$ F. 2BM*1!Table,ield,*1B*8E/T!/riteria/ell$$ N. 2BM7V!Table,ield,*1B*8E/T!/riteria/ell$$ D. 2B7E875E!Table,ield,*1B*8E/T!/riteria/ell$$ Select /( !under the heading +n" %C,50 %,=! and set the format of the 4ac%ground to 8ed. This will let us %now when you have used a second criteria without a second operator, or vice versa. %onloa" &orking Example
Multi7Ta8le /ookup Use the %epen"ent ali"ation /ists method to tell Excel to loo%up any chosen item in any table you tell it. %EE>%E>T /ISTS &IT; /<<U FU>CTI<>S
:e are going to loo% at how to use ust 01E loo%up unction to loo% in any number of named tables?ranges. To ma%e it user friendly we are going to use a Bata alidation tric% with lists and have the # !or more$ lists lin%ed. That is, choosing an item from our "st list will result in a corresponding list showing the second. To see how to do this, see Bependent Bata aliation =ists and even download the basic example. B /<<U F<# MA>? TA9/ES %onloa" Example
The principle we are going to use is the same as we used to lin% the # validation lists in the basic download example. That is, we use the *ndirect unction which will allow Excel to see the content of any cell as either a range address, or, as in our case, a named range. 0ur end loo%up unction, based on the download example above, will be this> %F4=&1!)K),'J$'RC2!S&KS2'2&2!)*)A,@ @,@H@"",)C),(*4S" 4# !/ookupP1alue $ is the value we are going to be loo%ing for. *1B*8E/T!SU4ST*TUTE!7#G#,& &,&O&$$ !Ta8leParra- $ is the named table we are going to loo% for 4# in and in the left most column of that table. 1ote the use of the SU4ST*TUTE unction which substitutes any spaces with the underscore. This is because named ranges can never have spaces in their names. 7lso note the use of 7#G# and not simply 7#H This is because we have already named the lists we use in the Bata alidation list the same as whatever is chosen from 7#. So, when we name our tables, we use the same name as their lists, but add a # on the end. or example, our table for /ities has been named &/ities#&. /# !ColPin"exPnum! contains a Bata alidation list with the numbers # and ( !only ( columns in example$. 0ur loo%up will offset !right$ that many columns from the left most column in the named table it loo%s in. 7=SE ! +angelookup$ tells loo%up we want an exact match !not case sensitive$. DST< T;E >)A(
7s you change items in the Bata alidation lists you will get 1?7H until a existing item or the correct named table is chosen. This can be rectified in a number of way, some less efficient that others though. See Stop 1?7H in =oo%ups
>este" IF Formula /imitation 0ne limitation of Excel is that we can only nest Excel formulas up to D levels. This is particularly limiting when trying to add nested * unctions?ormulas that re'uire greater than D conditions.
0ne limitation of Excel is that we can only nest formulas up to D levels. This is particularly limiting when trying to add nested * unctions?ormulas that re'uire greater than D conditions. See Also: >ame" Formula method here *f you hit the D level limit, odds are that you are not using the correct method for your tas%. or example, one common use of multiple nested * unctions?ormulas is when we wish to have a value returned based on the content of another cell. *f this is your problem, then it9s very li%ely
the use of the lookup $ormula with a loo%up table will solve your problemsH See screen shot below>
*f you are evaluating numbers being entered into a cell you could use the /-00SE unction?ormula. or example, if a user can enter a number between " and ") into 7", you may wish to have the text returned based on the number they enter. See example below =C;<ine0Te n!
*f you Enter the above formula into any cell and then enter a number between " and ") into 7", you will see exactly what it doing. The /-00SE unction?ormula can ta%e up to () arguments.
Q >este" IF Formula /imitation :or%around #
ItMs uite +ommon for users to en+ounter the < neste% *un+tions in ,F+el. *or those not sure4 a neste% fun+tion is )here )e use the result of one fun+tion as the ar-ument for another. If your fun+tions are all I* *un+tions4 then see (ooup 9etho% . This /y far the most eB+ient an% eFi/le )ay to -et aroun% the limit on I* fun+tions. O4 so letMs Pump in )ith an eFample of )here you may use this other metho% )hi+h also -ets aroun% the limit. (etMs say you hae a +olumn of %ata 2$olumn #3. In this +olumn there are a total of <; %iQerent numeri+ +ells. That is4 = to <; in any or%er. "ase% on the +ontent of ea+h +ell4 )e nee% to perform a TaF +al+ulation /y multiplyin- a num/er /y a %e7ne% +onstant name% TaF /ase% on L %iQerent +riteria CR37ER3A
I* #= C = to < then <TaF I* #= C L to =; then =;TaF I* #= C == to 8; then 8;TaF
I* #= C 8= to 6; then 6;TaF I* #= C 6= to K; then K;TaF I* #= C K= to >; then >;TaF I* #= C >= to ; then ;TaF I* #= C = to <; then <;TaF What nee% to %o is mae all the a/oe +riteria into 8 Name% *ormulas Here is ho)4 assumin- )e )ant the results in $olumn " relatie to the ro) in $olumn #. =3 Sele+t "= an% -o to 3nsert2Name25eJne . 83 No) in the Names in Wor/oo /oF enter: Criteria 63 In the Refers to /oF enter: !"#(A$D(A%&,A'),*Tax,"#(A$D(A%,A'),&*Tax,"#(A$D(A%&,A '+),+&*Tax,"#(A$D(A%+&,A'),&*Tax)))) K3 No) +li+ Add. 83 No) in the Names in Wor/oo /oF enter: Criteria+ 63 In the Refers to /oF enter: !i#(A$D(A%&,A'-),-&*Tax,"#(A$D(A%-&,A'.),.&*Tax,"#(A$D(A% .&,A'/),/&*Tax,"#(A$D(A%/&,A'),&*Tax)))) K3 No) +li+ Add No) )e nee% to a%% the %e7ne% +onstant name% TaF =3 No) in the Names in Wor/oo /oF enter: Tax 83 In the Refers to /oF enter: !&0. 63 *inally +li+ Add an% then ;< . No) a%% num/ers = to <; on the Worsheet Startin- from #=. Use the *ill Han%le 2)hile hol%in- %o)n $trl3 of #= after enterin- num/er = into #= an% resele+tin- it. #ll that is left no) is to mae use of our 8 name% formulas that total @ %iQerent +riteria. So4 in "= simply Enter: !"#(Criteria,Criteria,Criteria+) Then +opy %o)n. #oun" Excel >um8ers Methods and Excel ormulas for rounding numbers in Excel Excel #oun"ing
Excel allows us to easily round number for viewing via Format 3Cells + >um8er + and then >um8er under Category . ou can short cut this by using the Increase %ecimals and %ecrease %ecimals on the ormat toolbar, to the right of L 0 symbols. -owever, as with all formatting, the true underlying value of the cell is not changed. This matters when you add some numbers and you get a lower result than you expect. or example, Enter ".N and ".N in # cells, say 7" and 7#. 1ow format these so no decimal places are showing and you get # and #. 1ow add these together li%e =AB4A+ and you get a result of (, not A. ou can change this and have excel wor%
with all numbers as they are displayed via Tools3E%, that this is a one+way method and the changes to 7== your numbers cannot be undone. 2'1. ou can can automatically permanentl- change A// numbers in a :or%boo% to their displayed value by chec%ing recision as "ispla-e" and then clic%ing < . 1ow go bac% Tools3
*f you wish to actually change the true underlying value of number we can use one of the many 80U1B unctions. #oun" >um8ers
The 80U1B unction will round numbers to a specified number of digits. *f the number of digits is negative, it will round to the left of the decimal point. *f @ero it will round to the nearest *nteger !whole number$. =#%B.203! will result in a value of # =#%B.O03! will result in a value of " #oun" >um8ers Up
The 80U1BUP function will round numbers up, away from @ero. =#%UB.O03! will result in a value of # #oun" >um8ers %on
The 80U1BB0:1 function will round numbers down, toward @ero. =#%%<&>B.@03! will result in a value of " I>T !although less flexible$ can also be used. =I>TB.@! will also result in " #oun" to a Chosen Multiple
There is another round function in Excel that will round a number to the multiple we specify. This function is called M#%. *t is not available by default, so you need to go to Tools3A""7ins and chec% Anal-sis Toolpak . =M#%++.20B3! will result in a value of #) =M#%++.202! will result in a value of #F Some
Some of the other function that can used for rounding are> ". /E*=*15 #. =008 (. 0BB A. EE1 F. T8U1/ N. B0==78 D. *1T
ercentages in Excel 7 percent is a ratio of a number to ")) and is usually expressed using the percent !$ symbol. *n Excel, a number can be expressed in a few different ways and used to calculate a percentage in Excel.
7 percent is a ratio of a number to ")) and is usually expressed using the percent !$ symbol. *n Excel, a number can be expressed in a few different ways and used to calculate a percentage in Excel. or example, F) stands for the ratio F)<")), or .F to ". The following table shows the different ways that the decimal number .F can be expressed for use in percentage calculations< 1umeric alue
.F
Percentage
F)
Becimal
).F)
raction
F)?"))
There is one very important rule to remember with percentages. :hen using a percentage, format your cells as a percentage first and the whole number " is e'ual to ")). or example type F) in any cell and hit Enter. /lic% bac% on your cell and go to Format 3Cells 3>um8er and select ercentage then clic% < !or clic% the icon on your ormatting toolbar$. ou will see that the value of your cell has changed to F))).)). To get F) simply enter a value of .F, or format your cells as a percentage first The logic of a percentage is amount ? total 2 percentage. The attached wor%boo% download shows three different ways that a percentage can be calculated. %onloa" &ork8ook %emo
A1erage Exclu"ing eros Excel has a built in formula?function that ma%es averaging a range of cells easy. -owever, the Excel formula 7E875E does not exclude @eros.
Excel has a built in formula?function that ma%es averaging a range of cells easy. *f we assume your numbers are in 7"<7")) you would simply use the 7verage formula li%e shown below> =AE#AEAB:AB33!
There is however, one draw+bac% with this. That is, it includes cells that contain ) !@eros$. This can give you unexpected results. :hile the sum of values is not effected, the count of them is. 7verage is the sum of numbers divided by the count of numbers. So how do we omit @eros from our averageJ SUM#<%UCT R SUM =SUMAB:AB33!)SUM#<%UCTAB:AB3353!HB!!
This method is the most generic in that it ignores blan% cells and will inclu"e negati1e num8ers . CTIF R SUM
4y far the most efficient method is to use the SUM $ormula and CTIF $ormula as shown below> =SUMAB:AB33!)CTIFAB:AB33053!
This method ill not ork shoul" -ou ha1e negati1e num8ers unless you change 53 to 53 The drawbac% is it will then count blan% cells. :here as the one below wont. =SUMAB:AB33! ) CTAB:AB33! 7 CTIFAB:AB3303!! =SUMIFAB:AB33053!)CTIFAB:AB33053! :ill also exclu"e negati1es unless you use 53. -owever, it will then count 8lank cells .
*f you do have negative numbers, and no blan% cells, use> =SUMAB:AB33!)CTIFAB:AB33053! %AE#AE
The other method is via the B7E875E function. This function is part of the %ata8ase $unctions and all are extremely useful when?if you need specify multiple criteria. The
B7E875E , in the case of numbers being in 7#<7")) !7" should be a heading$ we could use the B7E875E li%e below> =%AE#AEAB:AB330B09B:9+!
:here &"& represents the relative column position to average in the range 7"<7")) 4" has an exact copy of your heading in 7" 4# houses the expression 3) Arra- A1erage
This method is the least efficient. 4y creating an arra- $ormula we can use the 7verage formula as shown below to omit @eros> =AE#AEIFAB:AB330AB:AB33!! =AE#AEIFAB:AB33 530AB:AB33!!
7s these are array formulas they MUST be entered via CtrlShi$t Enter.
Minimum Exclu"ing eros Excel has a built in formula?function that ma%es finding the minimum value in a range of cells easy. -owever, the Excel formula M*1 does not exclude @eros.
Excel has a built in formula?function that ma%es finding the minimum value in a range of cells easy. *f we assume your numbers are in 7"<7")) you would simply use the M*1 formula li%e shown below> =MI>AB:AB33!
There is however, one draw+bac% with this. That is, it includes cells that contain ) !@eros$. This can give you unexpected results. So how do we omit @eros from our averageJ SMA// Function)Formula
4y far the most efficient method is to use the SM7== and CTIF $ormula as shown below>
SM7== 8eturns the %+th smallest value in a data set. =SMA//AB:AB330CTIFAB:AB3303!4B!
:here the countif is counting the @eros in the range !"$ and is used to tell SM7== to return the %+th smallest value. %MI>
The other method is via the BM*1 function. This function is part of the %ata8ase $unctions and all are extremely useful when?if you need specify multiple criteria. The BM*1 , in the case of numbers being in 7#<7")) !7" should be a heading$ we could use the BM*1 li%e below> =%MI>AB:AB330B09B:9+!
:here &"& represents the relative column position to average in the range 7"<7")) 4" has an exact copy of your heading in 7" 4# houses the expression 3) or Q3) if have negative numbers you want included. Arra- MI>
This method is the least efficient. 4y creating an arra- $ormula we can use the M*1 formula as shown below to omit @eros> =MI>IFAB:AB33O 530AB:AB33!! =MI>IFAB:AB33O 530AB:AB33!!
7s these are array formulas they MUST be entered via CtrlShi$t Enter. E$$icient Excel Sprea"sheet %esign This page is a must read for anyone with the tas% of designing and setting up an Excel spreadsheet. *t tal%s about formatting, layout and calculation speed.
S!eed u! Slo% Calculations in Excel NuestionsJ Excel ;elp
See #lso: spee% up /a +o%e Slo) 9a+ros ,F+el!"# ol%en Rules ,F+el Seri+es "est 5ra+ti+es | $onsi%er The $o%e!"# #%%in To ,nsure your +o%e is eB+ient $o%e Intro
Excel is without doubt a very powerful spreadsheet application and arguably the best in the world. -owever, many people often design their spreadsheets with no foresight at all. This means most spreadsheets have poor foundations and have limited life spans. Perhaps the number one rule when designing a spreadsheet is, we should start with the end in mind and never assume you will not need to add more data or formulae to your spreadsheet, because, the chances are that you will. 7 good spreadsheet should have about W) planning and #) implementation. :hile this can seem extremely inefficient in the short run, * can assure you that the long term gain will far outweigh the short7term pain . 8emember that spreadsheets are about giving correct information to the user, not possible erroneous information that loo%s good. =et9s loo% at how a spreadsheet should be set up efficiently. ,F+el "est 5ra+ti+e Desi-n On this pa-e
Rows (Shame on Microsoft )
Formatting (The least important Aspect)
Layout (T$" most important Aspect)
Formulae (This is what it is all about)
Speeding up Recalculations (how to! do"s # dont"s)
Array Formulas (what so called $ormulae gurus Wont Tell %ou)
%&Fs or 'ustom Functions (Rarely reuired)
olatile Functions (A*oid these)
Loo+up Functions (,ow to speed up)
-icroso$t"s Tips For .ptimi/ing Speed ($rom the horses mouth)
.utside Lin+s
01 -icroso$t 2nowledge 3ase Article 456766 61 Recalculation in -icroso$t 89cel
1 Impro*ing Per$ormance in 89cel 6;;5 <1 Importance o$ 'alculation Speed Ro)s topV
The very "st thing you S-0U=B %now about Excel is that A// 1ersions contain $ar more ros than the Application can e1er hope to han"le . :hy Microsoft continue to mislead its users by supplying far more rows than it can handle remains a mystery. My best guess is that% like most car speedometers% the upper range e% %<>'T F<#ET A9
Sprea%sheet *ormattin- topV
:hile a spreadsheet should be easy to read and follow, this should rarely be at the expense of efficiency. * myself am a big believer in 9keep it simple stupi" 9 !;.*.S.S$. ar too many people spend about (), or more, of their time formatting their spreadsheets. This time !although they don9t reali@e it$ often comes at the expense of efficiency and accuracy. 0ften the overuse of formatting adds si@e to your :or%boo% and while it may loo% li%e a wor% of art to you, it may loo% terrible to another. Some very good universal colors are blac%, white and grey. 0nly ever use the cell format of Text i$ reall- necessar- . This is because all data entered into the cell becomes text and spreadsheets are all about numbers. :orse still, is any cell housing a formula, that is referencing a Text formatted cell, will also become formatted as Text. 4elieve me, you do not want formula cells to be formatted as TextH This $ormat is E#? rarelnee"e"0 -et $reuentl- use". *f you apply a number format to specific cells try to not apply the format to the entire column. *f you do, Excel will assume you are using these cells. This can give unexpected results when locating the last used cell. :ith @22,@ B Million in +33Q! rows in Excel it wont ta%e too long before you had told Excel that you are using millions of cells, when in reality the number is only in the thousandsH -aving said not to format entire columns G rows, it shoul" 8e note" that intermittent R spora"ic $ormatting to in"i1i"ual cells can increase $ile si6e.
*f you want your formatting to automatically apply to new data, either use the & Format ainter & !paint brush icon on the formatting toolbar$. 0r go to Tools3
See also< Excel 8anges ou can use E"it5o to7Special7/ast cell to try and find the last cell in the active sheet, but it is not 1er- relia8le . The reasons are two+fold< ". The last cell is onl- re7set hen -ou sa1e . This means if you enter any number or text in say, cell 7") and 7#) of a new :or%sheet, then delete the content of 7#), the E"it5o to7Special7 /ast cell will %eep ta%ing you to 7#), until you save. #. It picks up cell $ormatting . =et9s say you enter any text or number in cell 7") and then enter a 1ali" "ate in cell 7#) of a new :or%sheet. 1ow delete the date in cell 7#) and save. The E"it5o to7Special7/ast cell will still ta%e you to 7#). This is because entering a date in 7#) has caused Excel to automaticall- format the cell from &eneral & to a Bate format. To stop from going to 7#) you will have to use E"it5Clear5All and then save. So hen using 9A -ou cannot rel- on: Range,4A04.pecialCells,$lCellypeLastCell.elect
4elow is a method that will find the 8E7= last used row Fin" the last use" #o on a &orksheet:
Su& Find"astRo#()
Dim LastRow As Long
#! Wor+s(eet)unction.CountA,Cells 5 6 (en 'earc( !or any entry- by searc(ing bac+wards by Rows. LastRow " Cells.)ind,W(at7"484- A!ter7"9A0:- 2 earc(Order7"$lByRows- 2 earc(Direction7"$l;revious.Row
&sgBo$ LastRow
*nd #!
End Su&
7nother common mista%e with cell formatting is the changing of alignment of cell data. 4y default, num8ers are right aligned and text is le$t aligne"0 leave it this wayH *f you Start changing this, you will not be able to tell at a glance if the contents of a cell is text or numeric. *t is very common for people to reference cells, that loo% li%e numbers, when in reality they are text. *f you have altered the default alignment, you will be left scratching your head. *erhaps the e
=. #1at #i1e data2ase0 ,F+el 3S a at *ile #ppli+ation an% shoul% /e use% as su+h. 8. 3ess 4or5sheets64or52oo5s is 7ore and 7a5es ana1y8in96reportin9 a 3OT easier0 Try an% ensure all relate% ra) %ata is on = Worsheet an% in = )or/oo. The num/er = issue )ith eF+el sprea%sheets is users sprea%inra) %ata oer many )orsheets an%or )or/oos. 6. #ll (ayouts SHOU(D +ontain = sin-le Worsheet in a ta/le format of RAW 5A7A. *rom this ra% data +omes your F3NA data. K. 4hen puttin9 in headin9s 2o1d the font . This )ill help ,F+el re+o-ni&e them as hea%in-s )hen you use one of its fun+tions e-A Sort. >. 4hen puttin9 data into the data area of your spreadsheet try to aoid 21an5 ro;s and co1u7ns0 This is /e+ause a lot of ,F+els /uiltin features )ill assume a /lan ro) or +olumn is the en% of your %ata. It +an also helps )ith a lot of ,F+els formulas. Hain- sai% this thou-h4 it is a -oo% i%ea to leae at least K /lan ro)s a/oe your hea%in-s 2hi%e them if you )ish34 these +an then /e use% for eepin- Totals 2mu+h /etter than /ein- at the /ottom3 an% +riteria for some of ,F+els /uilt in features4 e- #%an+e% *ilters. .
%ata /ein- sorte% in a lo-i+al or%er. It )ill also -reatly spee% the +al+ulation pro+ess of many fun+tions. <. =se rea1 dates for headin9s and for7at the7 appropriate1y . "y this I mean if you )ant the names of the months as hea%in-s type them in as ==8;;= 4 =88;;= 4 =68;;= et+ then format them as mmmm. This is a ery simple pro+e%ure that is all too often oerlooe% /y many. If you hae real %ates as hea%in-s life )ill /e mu+h easier further %o)n the roa% if you nee% to use them in formulas4 if you %onMt nothin- is lost. L. Don>t put in one ce11 ;hat cou1d 9o in 7ore than one ce11 . Say you hae the names of =;; people to put into your sprea%sheet4 %ont put their full name in one +ell. Instea%4 put the *irst name in one +ell an% their surname in the neFt +ell to the ri-ht. If you nee% to pla+e them into one sin-le +ell at a later sta-e4 this +an /e %one ery easily the same +annot al)ays /e sai% for the reerse. . P1ace your headin9s across co1u7ns and your data in ro;s direct1y underneath . Remem/er that ,F+el has far more ro)s than +olumns. ,F+el eFpe+ts your %ata to /e lai% out this )ay.
*f you can stic% to these guidelines you will than% yourself later as you will then easily be able to use many of Excels powerful built in features, which often need the data laid out this way. Sprea%sheet *ormulae =top>
See also< Excel ormula Errors. This is the biggest part of any spreadsheetH :ithout them you really only have a document. Excel has over ()) built in unctions !with all add+ins installed$, but chances are you will only use a handful of these. The num8er one mistake made in regards to formulae in Excel is the referencing of entire columns , this is a big mista%eH This forces Excel to loo% through potentially thousands, if not millions, of cells which it need not be concerned with at all. Although later versions of 5
Possibly one of the very best ways to overcome this is to familiari@e yourself with the use of dynamic named ranges. *f you are not familiar with these, chec% them out here< %-namic #anges *lease note that for the purpose of being totally generic% the e
/alculate Message 8emains in Status 4ar *f NF,F(N ormula 8eferences Microsoft Excel calculates during different events li%e column auto+resi@ing, when entering anything in any cell, and so forth. -owever, Excel can only trac% NF,F(N dependencies to uni'ue references for automatic calculation. 7fter the wor%boo% has passed this limit, Excel no longer attempts to recalculate only changed cells. *nstead, it recalculates all cells a$ter each change . This behaviour is by design of Microsoft Excel. Microsoft Excel will correctly calculate all formulas. -owever, the &Calculate & message in the status bar indicates that Microsoft Excel can no longer trac% the formula dependencies and is calculating every formula in the wor%boo% after each change. *f you are unsure when the last calculation event too% place and you want to be sure your formulas are up to date, simply Start a calculation manually. To do this, press CT#/A/TFG and wait until &Calculating Cells: nL& disappears and &Calculate & returns to the status bar. Sprea%sheet Spee%in- up Re+al+ulations topV
7 common problem with poorly designed spreadsheets is that they become painfully slow in recalculating. Many people will suggest that a solution to this problem is putting a calculation into Manual via Tools 3
4elow is a list of what is often the worst offenders for slowing down recalculations of spreadsheets. =. #rray formulas 8. Sumpro%u+t use% for multiple +on%ition summin- or +ountin6. UD*s 2User%e7ne% fun+tions3 K. !olatile fun+tions >. (ooup *un+tions
=et9s loo% at each of these now in turn, and see what alternatives we can have for them. Sprea%sheet #rray *ormulas topV
7 possible alternative for array formulas, are Excel9s "ata8ase $unctions . The Excel help has some very good examples on how these formulas can be used on large tables of data and are able to return results based on multiple criteria. 7nother alternative which is too often overloo%ed is the use of Excel9s i1ot ta8le feature. :hile these may seem very daunting when first encountered, * highly recommend that you familiari@e yourself with this powerful Excel feature as once you master them, you will wonder how you survived without themH Perhaps the biggest problem with array formulae is that they loo% efficient, but when compared to an alternative, nothing could be further from the truthH 7n array formulae must follow rules that Excels built in unctions do not have to, that is they must loop through each and every cell they reference !one at a time$ and chec% them off against a criteria. or this reason arrays are best suited to being used on single cells or referencing only small ranges. Sprea%sheet UD*s or $ustom *un+tions topV
UBs for those of you that are not aware, are User+defined unctions that are written with Excel 47 which can then be used in a :or%sheet in the same way as any one of Excel9s b uilt+in wor%sheet functions. Unfortunately, no matter how good the person is at 47 who has written the UB, it is very unli%ely that it will perform at the same speed as one of Excel9s built+in functions, even if it would be necessary to use several nested functions to get the same result. 0ften a well written and e$$icient U%F $unction will incorporate the use of Excel9s wor%sheet functions. 4y this, * mean you may decide to write a UB to replace a function which otherwise would re'uire you to use several wor%sheet functions nested within each other. The most efficient way to replace the use of several nested wor%sheet functions !if you must$ would be to write a UB that would incorporate the use of all of the wor%sheet functions necessary. This way instead of having to repeatedly nest the functions on the :or%sheet to get the desired result,
you could nest the functions once within 47 !by accessing the :or%sheetunction 0bect$ which would then allow you to use this function in the interface, without the need to repeat the nesting. Most of Excels :or%sheet unctions can be used in 47 simply by using< &orksheetFunction.Function >ame5 or Application.Function >ame5 if the one you need is not available, there will be 4 e'uivalent. Sprea%sheet !olatile *un+tions topV
olatile functions are simple functions that will recalculate each time a change of data occurs in any cell on any wor%sheet. Most functions !non olatile$ will only recalculate if a cell that they are referencing has changed. Some of the most common volatile functions used are undoubtedly the ><&! and T<%A?! functions, there are also %I#ECT! , #<&S!, CS! to name a few more. *f you are going to be using the result of these functions fre'uently throughout your spreadsheet, avoid the temptation of nesting these functions within other functions to get your desired result !especially array formulae and UB9s$. *nstead, simply type the volatile function into a single cell on your spreadsheet and reference that cell from within other functions. This alone can potentially cut down on the amount of volatile functions by hundreds, if not thousands. Sprea%sheet (ooup *un+tions topV
Excel is very rich in =oo%up G 8eference ormulae, with the most popular probably being =00;UP. These functions are all very generic and can be used to extract data from ust about any table of data. The biggest mista%e made by most, is the forcing of Excel to loo% in thousands, if not millions of cells superfluously, see< ormulae . 7s shown by the ormulae lin%, one of the best ways to overcome this is via the use of Bynamic 8anges . The other mista%e is that the loo%up functions !in the case of =00;UP, -=00;UP and M7T/-$ are told to find an exact match. That is, the optional fourth argument RangeHlooGup is set to alse in both =00;UP and -=00;UP. *n the case of M7T/- the last optional argument !MatchOtype$ is set to ) !@ero$. This means that Excel will need to chec% all cells until it finds an exact match. *f possible, always use True !or omitted$ for =00;UP and -=00;UP, or B !sort ascending$ or 7B !sort descending$ in the case of Match. So, whenever possible, sort your data appropriately. Sorting the lookup columns is the single 8est a- to spee" up lookup $unctions. 7nother very bad mista%e is the double use of the =oo%up unction nested within one of Excels *nformation functions. see example below 2*!*S17!=00;UP!")),My8ange,#,alse$$,&&,=00;UP!")),My8ange,#,alse$$
This is used to prevent the D>)A when no match can be found. The big problem with this is, it forces Excel to use the =00;UP twiceH 7s you can imagine, this doubles the number of =oo%up functions used. The best approach !if possible$ is to live with the 1?7, or hide it via /onditional ormatting . 0r, if this is not an option, place the =oo%up in a 9out+the+way9 spot on the same :or%sheet !eg *"$ and then use
*n Microsoft Excel, recalculation performance is affected by the way data and formulas are arranged on the wor%sheet. The following list contains tips for optimi@ing your wor%sheet to improve recalculation speed< •
•
•
•
•
Or-ani&e your )orsheets erti+ally. Use only one or t)o s+reens of +olumns4 /ut as many ro)s as possi/le. # stri+t erti+al s+heme promotes a +learer o) of +al+ulation. When possi/le4 a formula shoul% refer only to the +ells a/oe it. #s a result4 your +al+ulations shoul% pro+ee% stri+tly %o)n)ar%4 from ra) %ata at the top to 7nal +al+ulations at the /ottom. If your formulas reuire a lar-e amount of ra) %ata4 you mi-ht )ant to moe the %ata to a separate )orsheet an% lin the %ata to the sheet +ontaininthe formulas. *ormulas shoul% /e as simple as possi/le to preent any unne+essary +al+ulations. If you use +onstants in a formula4 +al+ulate the +onstants /efore enterin- them into the formula4 rather than hain- 9i+rosoft ,F+el +al+ulate them %urin- ea+h re+al+ulation +y+le. Re%u+e4 or eliminate4 the use of %ata ta/les in your sprea%sheet or set %ata ta/le +al+ulation to manual.
•
•
If you only nee% a fe) +ells to /e re+al+ulate%4 repla+e the eual si-ns 2C3 of the +ells you )ant to /e re+al+ulate%. This is only an improement if you are +al+ulatin- a ery small per+enta-e of the formulas on your )orsheet. When a +ertain -roup of formulas must /e re+al+ulate% a -reat num/er of times4 then it may /e helpful to repla+e the eual si-n 2C3 in the formulas that you %o not nee% to re+al+ulate )ith a uniue strin- that %oes not appear else)here. The formulas )ithout the eual si-ns )ill not /e re+al+ulate% 2they are no lon-er +onsi%ere% formulas3. When 9i+rosoft ,F+el has re+al+ulate% the formulas that still +ontain eual si-ns4 sear+h for the uniue strin- an% restore the C.
". Microsoft ;nowledge 4ase 7rticle + ID#N## #. 8ecalculation in Microsoft Excel (. *mproving Performance in Excel #))D
Excel Tips an" Tr Tricks icks This page consists of many tips and tric%s you can use in Excel, from shortcut %eys to wor%ing with formulas and functions. *f you %now % now of a good one, on e, please let us %nowH ;an"- ;ints For Sprea"sheets -ere you will find out how to use Excels /onditional ormatting and Bata alidation. *t explains in detail how you can use these great Excel features to wor% with duplications in your spreadsheets. 4est of all it shows how they can be used to prevent themH %ata ali"ation $or ali"ation $or %uplicates in Excel an" Con"itional Formatting $or Formatting $or %uplicates in Excel Since Excel CD Excel has h as some very handy built in features fea tures that are ideal for spreadsheets. 7ll that is needed is a bit of imagination and %now how and these can be adopted to ma%e life ust that bit easier. The examples below ma%e use of %ata ali"ation and Con"itional Formatting to both find duplicates in Excel and prevent them. *f you do a lot of duplication hunting?managing in Excel see our Excel %uplicates Manager Excel A""7in. ali"ation For %uplicates
5o here if you are not familiar with %ata a ali"ation li"ation alidation alidation can be found by going to %ata5ali"ation on the Toolbar. The main purpose of this function is to set up restrictions so users can only enter data d ata that meet the criteria that you set, but as you will also see it can be used in other ways. For the purpose o$ all examples e ill assume the range o$ cells that users ill 8e entering "ata in is AB:;B3. HIM<#TA>TH ali"ation "oes not pre1ent users $rom "eleting or pasting.
re1enting %uplicates in Excel
*n this example we will use alidation alidation to stop users from entering numbers or text that are already within the range. *n other words, pre1ent "uplicates .
•
•
•
•
/lic% in cell 7" and holding down the left mouse button highlight down and across to cell -"). 1otice that cell 7" is the only active cell, this is for reasons * will explain in step (. 5o to Bata3alidation Bata3alidation and you will see the &Bata alidation& alidation& dialog box. rom the &7llow<& box select &/ustom& and the &ormula<& box should appear. *n the &ormula& box type this formula< =CTIFAB:;B30AB!=B *t is important to note the 7bsolute of 7"<-") with the dollar signs. The reason why we haven9t absoluted 7" is because it is the active cell and leaving it as a relative reference will let Excel %now we want 4" to have the same formula as 7" but replace 7" with 4", /" to have /" etc. /lic% the &*nput Message& tab and type in a message that the user will see when they select the cell. 0r leave it blan%. /lic% the &Error 7lert& tab and type a message the user will see if they t ype in a duplicate entry. 1ow set the error level in the &Style& box to the left. To get detailed information about this clic% on the &J& at the top the dialog box and then clic% on the &Style& box. :hen you are happy happ y with all your settings, clic% &0;&.
1ow try and type the same word or number in any # cells within the range AB:;B3 . re1enting Acci"ental <1ert-ping
7s you are no doubt aware it is possible to stop users from typing in cells by going to Tools3rotection 3rotect Sheet , but this can sometimes be li%e using a sledge hammer to push in a thumb tac as it also loc%s you out of lot a other Excel features. -ere is a way to stop users from typing in cells that may contain entries li%e formulas etc ye t still allow access to Excels other features. *n this example we will use alidation alidation to stop users from accidentally typing over the top of the range 7"<-") •
•
/lic% in cell 7" and holding down the left mouse button highlight down and across to cell -"). 5o to Bata3alidation Bata3alidation and you will see the &Bata alidation& alidation& dialog box. rom the &7llow<& box select &/ustom& and the &ormula<& box should appear.
•
•
•
*n the &ormula& box type this formula< 2&& /lic% the &*nput Message& tab and type in a message that the user will see if they happen to select the cell. ce ll. Something li%e &08MU=7 /E==H& /lic% the &Error 7lert& tab and type a message the user will see if they t ype in the cell. 1ow set the error level from the &Style& box to the left. To To get detailed information about this clic% on the &J& at the top the dialog box and then clic% on the &Style& box. :hen you are happy with all your settings, clic% &0;&.
1ow try and type in any cell within the range 7"<-") 7"<-") and you will receive the error message that you set.. Creating a /ist o$ Alloe" Entries
:hen developing Spreadsheets it is good practice to ma%e them as user friendly as possible. 0ne great way to achieve this is to give the user a selection of pre+typed entries when they select the cell!s$. This is possible with alidation. •
•
•
•
•
•
*n a safe area of the :or%sheet !lets say /olumn *$ type the word &8ed& in cell *", 4lue in cell *# and 5reen in cell *(. 1ow while cell *( is still selected go to ormat3/olumn3-ide, this will hide our list from users /lic% in cell 7" and holding down the left mouse button highlight down and across to cell -"). 5o to Bata3alidation Bata3alidation and you will see the &Bata alidation& alidation& dialog box. rom the &7llow<& box select &=ist& and the &Source<& box should appear. Ma%e sure the &*n cell drop down& box is chec%ed. *n this Source box type 2*"<*"). The reason we use the range *"<*") is so that we can add to our list if needed. The good thing is Excel Exce l wont show us all the blan% cells within our list. /lic% the &*nput Message& tab and type in a message that the user will see if they happen to select the cell. 0r leave it blan%. b lan%. /lic% the &Error 7lert& tab and type a message the user will see if they t ype an entry in the cell that is not part of our ou r list. 1ow set the error level from the &Style& box to the left. To get detailed information about this clic% on the &J& at the top the dialog box and then clic% on the &Style& box. :hen you are happy with all your settings, clic% &0;&.
1ow select any cell within our range and you will see a drop arrow, clic% this and you will see the list we set. *f they try and type an entry that is not part of the list they will receive the error message you set.
1ow push /trlg to display the &5o to& dialog box, type *" in the &8eference& box then go to ormat3/olumn3Unhide. Type the word &ellow& in cell *A. 1ow clic% in any cell within range 7"<-") and clic% the drop arrow and you will see that the new entry has been added to your list.
Con"itional Formatting or Buplicates in Excel
5o here if you are not familiar with Con"itional Formatting /onditional ormatting can be found by going to Format5Con"itional Formatting . The purpose of this function is very similar to &alidation& except instead of stopping or warning the user when they enter a entry that does not meet the set criteria it formats the cell to how it9s format condition has been set. or the purpose of all examples we will assume the range of cells that users will be entering data in is 7"<-"). ;ighlighting %uplicates in Excel
:hen you have large list or table of data you may need to go through the list to identify some or all+duplicate entries. This can be a very time consuming and tedious tas%, but with /onditional ormatting they can be identified in seconds or better still already identified. ollow the steps below to see what * mean. •
•
•
•
•
/lic% in cell 7" and holding down the left mouse button highlight down and across to cell -"). 1otice that cell 7" is the only active cell, this is for reasons * will explain in step ( 5o to ormat3/onditional ormatting and you will see the &/onditional ormatting& dialog box. rom the box directly below &/ondition "& select &ormula is& *n this ormula box type this formula< =CTIFAB:;B30AB!5B *t is important to note the 7bsolute of 7"<-") with the dollar signs. The reason why we haven9t absoluted 7" is because it is the active cell and leaving it as a relative reference will let Excel %now we want 4" to have the same formula as 7" but replace 7" with 4", /" to have /" etc. /lic% the &ormat& button and then select the format you want to use on all duplicate entries. Probably changing the 4ac%ground colour on the &Patterns& tab to a nice bright colour will do the tric%. :hen you are happy with the format conditions you have set clic% &0;&. ou will no doubt notice the &7dd33& button, this will allow you to set up to ( /onditional ormats and * will show you an example of this next..
1ow if you already have duplicates within your table or list they will all appear formatted as you set, or if the range has no entries, try typing in # entries the same within your range. *f you only need one color, see ;ighlight %uplicates in Excel Colour Co"e ;ighlighting %uplicates in Excel
Supposing you want separate the duplicates from the triplicates and the entries that occur more than ( times . This can easily be done by using /onditional ormatting. •
•
•
•
•
•
/lic% in cell 7" and holding down the left mouse button highlight down and across to cell -"). 1otice that cell 7" is the only active cell, this is for reasons * will explain in step (. 5o to ormat3/onditional ormatting and you will see the &/onditional ormatting& dialog box rom the box directly below &/ondition "& select &ormula is& *n this ormula box type this formula< =CTIFAB:;B30AB!5, *t is important to note the 7bsolute of 7"<-") with the dollar signs. The reason why we haven9t absoluted 7" is because it is the active cell and leaving it as a relative reference will let Excel %now we want 4" to have the same formula as 7" but replace 7" with 4", /" to have /" etc. /lic% the &ormat& button and then select the format you want to use on all entries that occur more than ( times. Probably changing the bac%ground colour on the &Patterns& tab to red will do the tric%. :hen you are happy with the format conditions you have set clic% &0;&. 1ow clic% the &7dd33& button and again select &ormula is& in the ormula box type this formula< =CTIFAB:;B30AB! =, /lic% the &ormat& button again and set the format you want, e.g. changing the bac%ground colour on the &Patterns& tab to yellow. 1ow clic% &0;&. /lic% the &7dd33& button again and repeat step F above, but type this formula< =CTIFAB:;B30AB! =+ and set the bac%ground colour on the &Patterns& tab to blue. 1ow clic% &0;& for the last time.
1ow all your entries that occur twice will appear in one format eg> 8lue 8ackgroun" , all entries that occur three times will have another format eg> -ello 8ackgroun" and all entries that occur more than three times will have yet another, eg> re" 8ackgroun" . Fin"7%elete %uplicates in Excel with the the %uplication Manager
Excel Formulas This page will ta%e you to lots of examples of Excels ormulas. *t includes formulas for dates, times, text and numbers. Each page also includes some formula tips and tric%s.
Excel Text Formulas
-ere are a few examples of how you can use Excels Text unctions to extract parts of peoples names from a list. The same formulas could also be used on any text, they don9t have to be names
Full >ame
Formula Use"
#esult
7#2Bavid -awley 2=ET!7#,*1B!& &,7#$$
Bavid
7(28ay 5oodwin 2M*B!7(,*1B!& &,7(,"$",=E1!7($$
5oodwin
7A25raeme Bee
2=ET!7A$GM*B!7A,*1B!& &,7A$","$
5B
7F2Su@anne 5reenhouse
2=ET!7F$GM*B!7F,*1B!& &,7F$,=E1!7F$$
S 5reenhouse
7N2red 4a%er
2=ET!7N,*1B!& &,7N$$GM*B!7N,*1B!& &,7N$","$
red4
7D2Mary -ardwic%
2M*B!7D,*1B!& &,7D,"$",=E1!7D$$ G & & G =ET!7D,*1B!& &,7D$$
-ardwic% Mary
7W24anana
2=E1!7W$+=E1!SU4ST*TUTE!7W,&a&,&&$$
( i.e occurence of &a&
Tips: ;o to cop- Excel $ormulas ithout the re$erence changing.
This can be achieved by either pressing # and then highlighting the formula, /opy, Enter then paste to destination. 0r doing the same in the ormula bar. -owever, this is not much good for large amounts of data, so try this< Select the range of cells with ormulae, use the /trl %ey for non+contiguous ranges. 1ow go to E"it5#eplace and 8eplace 2 with . /opy and paste to your location and then simply use E"it5#eplace with 2 To cop- an" transpose $ormulas ithout the re$erence changing
*n cell 7" of sheet # put< =SheetB(AB now copy this down a max of #FF rows. 1ow with the formulas selected go to E"it5#eplace and 8eplace 2 with . 1ow copy, select cell 4", go to Edit3Paste special and choose Transpose . Belete /olumn &7& and with 8ow " selected go to E"it5#eplace and 8eplace with 2 *f you paste any formulas copied from a :epage into an Excel cell, push F+ first. This will prevent any problems. To ma%e any of the Excel formula results upper case, nest the entire formula within the UPPE8 unction, eg> 2UPPE8!=ET!7#,*1B!& &,7#$$$ *f the text you are wor%ing with is not properly capitali@ed !eg> david hawley$ then nest the entire Excel formula within the P80PE8 unction, eg> 2P80PE8!=ET!7#,*1B!& &,7#$$$ *f the text has not been spaced properly, use the Excel formula, T8*M eg> 2T8*M!=ET!7N,*1B!& &,7N$$GM*B!7N,*1B!& &,7N$","$$ *f you only need to separate the first and last names you can use the Text to Columns feature. 4efore using this feature ma%e sure the column immediately to the right of your data is empty< •
Select the data you want to seperate.
•
5o to %ata5Text to Columns...
•
/hec% the %elimite" option button. /lic% >ext .
•
Select Ta8 or Space . /lic% Finish
[[ Excel Text Formulas [ Excel %ate Formulas [ Excel >um8er Formulas [[
%ate Excel Formulas
:or%ing with dates in Excel is a common tas% and Excel has made the process relatively easy by supplying a good selection of Bate unctions. 4elow is ust a very small example of what you can do.
>um8er
Formula Use"
#esult
7")2##"##)) 2B7TE7=UE!=ET!7C,#$G&?&GM*B!7C,(,#$G&?&G8*5-T! 2##?"#?#) " 7C,A$$ )"
7""2Septemb 2/-00SE!M7T/-!7"", er \&Ranuary&>&ebruary&>&March&>&7pril&> &May&>&Rune&>&Ruly&>&7ugust&>&September&>&0ctober&> &1ovember&>&Becember&],)$,",#,(,A,F,N,D,W,C,"),"","#$ ie> what month is September
C
7"#2##?)F?)" 2B7TEB*!7"(,7"#,&M&$ ie> how many months between 7"# "N 7"(2#F?"#?CC G 7"(
7"A2"F?"#?)" 2E0M01T-!7"A,($ ie> the last day of the month ( months from 7"A
2("?)(?#) )#
7"F2"W?)#?)" 2EB7TE!7"F,+"$ ie> the date " month before 7"F
2"W?)"?#) )"
Importe" %ates
S7P !and other Software$ can import dates into Excel as #)))"", which means the eleventh wee% of the year #))). ;o to $in" out hich month that isJ 4elow is one way to achieve a result. -owever, since Excel #))# it is possible to use Text to Columns found under %ata on the &orksheet Menu 9ar. 7t step ( of ( clic% the A"1ance" button. See Also: /onvert Excel Bates and Excel %ate an" Times :hat we need to do is first understand how Excel sees dates and that is as what9s %nown as &Serial 1alues &. This is ust a fancy name for whole numbers !times would add a decimal or fraction$. Excels date system !by default$ Start s from "?Ran?"C)) and this is stored b y Excel as the Serial value ", #?Ran?"C)) is # etc. ou can see any dates &Serial value& by typing a valid date in any cell, then formatting the cell as &5eneral&. :e first need to convert the year #))) into a serial number and to do that we type "?an?#))) into a cell and format it as &5eneral&. :e get the serial value< (NF#N. 1ow we need to convert the wee% number !"" in this case$ to days, this can easily be done by multiplying ""D to get DD. then we can add this to the year #))) serial value !(NF#N$ and get (NN)(. *f we now format this to a date format we get< "W?Mar?#)))
To bring this all together we will need to always extract the wee% number from the S7P date !#)))"" in this case$. and to do this we simply use< =#I;TAB0+! assuming the date is in cell 7". this will return the :ee% number "", but as text( So this &Text value& must be converted to a true number, so we use the 7=UE function< =A/UE#I;TAB0+!!. 0bviously this will be fine when the wee% number is two digits, but if it9s only one it wont wor%, to handle this we use a simple * function and nest the =E1 function into it9s /ogicalPtest argument and next the whole formula within the 7=UE function. =A/UEIF/E>AB!=@0#I;TAB0+!0#I;TAB0B!!! . The =E1 function simply returns the number of characters in text. So on the S7P date #)))"" we could use< =A/UEIF/E>AB!=@0#I;TAB0+!0#I;TAB0B!!!HQ4,@2+@ and format the cell as a date. 1ext problem will be the year changing from #))) to #))" etc. to handle this we would use< =%ATEA/UEB)Wan)R/EFTAB0O!! this would convert the S7P date< #)))"" to the Serial value< (NF#N. *n other words it extracts the first A characters from the value #)))"" !ie #)))$ and this is used in a text date of &"?Ran?#)))& the B7TE7=UE function simply converts this text date to a serial value for us. To bring the whole formula to a conclusion we would use< =A/UEIF/E>AB!=@0#I;TAB0+!0#I;TAB0B!!!HQ4%ATEA/UEB)Wan)R/EFT AB0O!! :hich gives us< (NN)( !"W?Mar?#))"$ in the case of #)))"", (NCNC !"C?Mar?#))"$ in the case of< #))""" 7ll you need to do is format the cell as &mmm& or use< =M<>T;CB! assuming your result is in cell /" Tips:
*f you paste any formulas copied from a :ebpage into an Excel cell, push # first. This will prevent any problems. The %ATE%IF unction can also accept &&, &B&, &MB&, &M&, &B&.The earliest date must be first. *t is provided in Excel CD onwards for compatibility with =otus "+#+(. 4oth the ET; and E%ATE are Excel 7dd+ins. 5o to Tools5A""7ins7Anal-sis Toolpak . *f you use them without installing this 7dd+in you will get the D>AMEJ error. ou can use positive and negative numbers in the ET; and E%ATE functions. See Also: /onvert Excel Bates and Excel Bate and Times
[[ Text Formulas [ %ate Formulas [ >um8er Formulas [[
Excel >um8er Formulas
:hen numbers are imported into Excel they may be converted to text, or not in a recognised Excel format. 4elow are some examples of how you can convert the numbers to suit.
>um8er
Formula Use"
#esult
7"W2 ##+
27=UE!8*5-T!7"W,"$G=ET!7"W,*1B!&+&,7"W$+"$$
+##
7"C2 +##
274S!7"C$
##
7#)2 "CCF
280M71!7#)$
M/MV/
7#"2 #F.ACC 280U1B!7#",)$
#F
7##2 "F.CCC 2T8U1/!7##$
"F
Tips:
7 'uic% way to convert text numbers to real numbers is to place the number " in any cell, copy it and then select your range containing the text numbers. 5o to E"it3aste special +Multipl- and clic% < . 7nother way to convert text numbers to real numbers is to use< 27=UE!7"$ where 7" contains the text number. /opy this down?across as far as needed, then highlight all the formulas and copy, then go to Edit3Paste special+alues and clic% 0;. -ave a lot of cells containing formulas that are showing the formula instead of the resultJ *t is most li%ely because the cells are formatted as Text !possibly due to importing$. Select the cells and format them as &5eneral& !or any number format$ then go to Edit38eplace and type 2 !e'ual sign$ in the &ind what& box. 1ow type another 2 !e'ual sign$ in the &8eplace with& and clic% &8eplace 7ll&. This will force all formula cells on the :or%sheet to recalculateH
>i$t- Excel Formulas Bownload a :or%boo% full of nifty Excel formulas< or =ast alue, /lose Match, 7utoilter =oo%up G Much More Excel resources
SE/F ;E/ F#EE Excel ;elp orum !The place to get your 'uestions answered$. 5et your 'uestions answered for free, often within minutesH The most popular area of our site. 5ive yourself and?or your company totally free #A?D support. ?ou can e1en uploa")"onloa" example $iles Excel Formula Errors 7s soon as you have discovered how to use formulas in Excel, you will li%ely need to lean how to correct or hide formula errors. Excel >esletter Archi1e -ave a browse through our free Excel newsletter archives. -ere you will find a bit of everything from basic shortcuts to 47 for Excel. *f you li%e what you see then sign up, it's completel- $ree( %E9U ) EA/UATE F<#MU/A E##<#S 1U==H, B*?)H, 7=UEH,8EH,17MEJ, 1UMH and 1?7 F#EE Excel Training Free /e1el B 9asic! Excel Training /ompliments of 0@gridH F#EE Excel %onloa"s 7ll Excel downloads below here are $ree. Excel Forum FAN =ist of the most popular as%ed 'uestions in the Excel help $orum . Excel ormulas through to Excel 47 macro code. Excel Freuentl- Aske" Nuestions an" Ansers . 7n ever growing list of popular 'uestions and answers. See also: Excel resources
Charts Excel Charts -ere are many examples that can be used to create Excel charts with a difference. The Excel charting pages listed here show many different charting techni'ues, examples and solutions.
Carting in Excel 4elow are many examples that can be used to create Excel charts with a difference. The Excel charting pages listed here show many different charting techni'ues, examples and solutions. All Excel charts are the 8rain7chil" o$ An"- ope ho is a regular poster on our F#EE Excel ;elp $orum. ;e is also a ell "eser1e" Microso$t Most alua8le erson M!
hu-e ran-e of $hartin- Soft)are | See #lso: ,F+el $hartin- (essons ,F+el Dash/oar%s #!#I(#"(, #T >;X OQ Con"itional ;ighlighting Axis /a8els < The Excel chart on this page highlights the V axis category labels when the monthly data drops below #F.
olar lot Charts < The polar plot is created using the 8adar chart. This particular example re'uires # data series in order to generate the spiral effect.
ie Chart &ith In"i1i"ual Slice #a"ius < /hart is a filled radar chart with multiple series.
/a8el ;igh7lo /ine &ith alues < Uses an additional data series plotted on the secondary axis to add values to the high+low lines.
? Scatter Colouration lot < The chart in both cases is a standard xy scatter plot where the plot order of each data point determines the colour of the mar%er.
Custom /ea"er /ines < This chart has # textboxes for displaying information regarding the "st and Ath slice.
ositi1e)>egati1e Axis /a8els on a 9ar Chart < 7xis label alignment when charting positive and negative bars.
9oun"ing Chart Areas < /reating bounding area within xy scatter.
ie Chart %ata Markers < Use a pie chart as a data mar%er
Axis ointer < Bisplay pointer at end of axis
%ispla- Total on Stacke" Column < Bisplay a cumulative total on a stac%ed column chart.
In1ert i$ >egati1e < 7n step by step explanation on how to control the *nvert if 1egative property.
/a8eling /ast %ata oint : =abel the =ast data point in a chart using dummy data series.
Scrolling Excel %ata Chart < Bynamic scrolling through data.
Excel Spotlight Chart < 7lternate conditional dual category plot.
Excel Tile Chart < /onditional dual category plot.
Staggere" Axis /a8els < arious methods to create staggered axis.
Also see our huge range o$ Charting So$tare Step /ine Charts < arious ways and chart types that can be used to create a stepped line.
Another Column Chart &ith ar-ing &i"th 9ars < /olumn chart that has variable width bars, including a stac%ed style.
%i1i"ing a raphic Into Sections < Split a graphic into variable width sections.
9roken /ines $or Formula /inke" %ata < 7n alternative to @ero or oined points.
Automatic #emo1al o$ ero alues in Excel ie Chart . 7 pie chart that does not display @ero values.
Excel Chart Tips an" Tricks There are many little %nown tric%s that can be used with Excel charts and these are ust some of them. *f you want your chart to update automatically, not plot @eros, or have scrolling charts etc, then you will find it hereH
Custom Charts ou have ust spent hours creating your chart and its a loo%ing exactly how you want it, the only problem is you cannot stand the thought of having to do the same thing all over again for your next chart!s$. 4elow are three ways that will save you many hours.
:atch the latest videos Short an" Seet Simply clic% on your chart to select it and then right click and select on ouTube.com Cop-. 1ow all you have to do is paste your new chart where you want it and change its %ata range and Series . More Excel i"eo *f your chart is on a Chart sheet then clic% the sheet name ta8 and hold Tutorials down your Ctrl %ey and drag the sheet to another location. User %e$ine" 8ight clic% on your chart and select Chart t-pe then clic% the Custom T-pes tab. 7t the bottom of this page you will see the Select $rom box. rom in here select User "e$ine" , now clic% A"". Type in a name for your chart and a description if needed, then clic% < . %e$ault to User %e$ine" Bo exactly as above in User %e$ine" but after clic%ing A"" and typing in a name and description clic% the Set as "e$ault chart button. 1ow each time you create a chart it will "e$ault to your custom t-pe .
>ot lotting Empt- Cells 7 very common problem with charts is that if your data range contains empty cells Excel will try to plot them. This ma%es your chart drop off suddenly and leaves you loo%ing at a chart with a lot of missing data. 4elow are two ways this can be overcome. The second method would probably suit most needs. ;i"ing #os or Columns =et9s assume you have a chart that is plotting sales figures by month. The month names are in cells AB:AB+ with their associated sales figures in 9B:9B+. This would mean if the current month was April then your chart would be plotting W months of empty cells, as Ma-:%ec figures are not yet available. To avoid this, you could simply hide rows 2:B+ !May)A Using the same example as above in ;i"ing #os or Columns follow these steps< •
Place the month names Wan:%ec in cells CB:CB+
•
*n cell 9B type =>A! and copy it down to 9B+
•
*n cell AB type =IFISE##<#9B!09B0%B! and cop- it down to AB+
7s you enter the sales figure for the month you will type over the =>A!. This will mean that if the sales figure has not been entered for any month both the month column !Column A$ and the sales figure column ! Column 9$ will return 1?7. Excel will not plot D>)A.
Changing the chart "ata range 7 uickl-( =et9s assume you have a chart that is plotting "ollar values in the range AB:A+3. 1ow let9s say sometimes you need to add a new series eg> some comparison oun" values in range 9B:9+3 %rag an" %rop -ighlight the range 9B:9+3 , place your mouse pointer over any border of the highlighted range until it changes to an arro. 1ow click and "rag the range onto the chart and drop it. ou should now see the chart aste Special dialog box. ou can also do this by cop-ing your data then choosing aste Special from the E"it menu.
Scrolling Charts 5ive your charts a professional loo% by using a Scrollbar to increase and decrease the data range it is plotting. Rust follow these easy steps< •
•
•
•
•
•
•
•
•
0n sheetB *n cell AB type the heading Amounts and in cell 9B type the heading Months and in cell CB type the number B. ill cells A+:AB, with some numeric values and in cells 9+:9B, put the months of the year i.e. Wan:Fe8 . 5o to Insert5>ame5%e$ine and type the name M-alues in the >ames in ork8ook box. *n the #e$ers to box type the formula =ext and then the Series tab. /lic% A"", select cell AB using the collapse dialog to the left of the >ame box or type Amounts . *n the alues box Type =SheetB(M-alues and in the Categor- x! axis la8els type =SheetB(M-Months . Step through the rest of the &i6ar" setting up the chart how you want and finally clic% Finish . 5o to ie5Tool8ars5Forms and from this toolbar clic% the Scroll8ar then clic% on your Chart. Position and si@e the Scoll8ar on the Chart.
•
•
8ight clic% on the Scroll8ar and select Format Control then clic% the Control tab. /hange the Current 1alue to B, change the Minimum 1alue to B, change the Maximum 1alue to B+, change the Incremental change to B. inally put CB in the /ell lin% box and then clic% < .
1ow use the scroll8ar to change the data range in your chart .
Changing #ange Chart -ere is a great little tric% that will allow you to cha nge your chart range by selecting it from a list. This one should impress the bossH •
•
•
•
•
•
•
•
•
•
•
0n sheetB *n cell AB type the heading Amounts , in 9B type rices , in CB type Ages, in %B type Months . Under these headings type put some values. Under Months put the "# months of the year. /lic% in cell FB and go to %ata5ali"ation. Select /ist from the Allo: box. *n the Source box type =AB:CB . /lic% < . *n cell B put this formula< =IFFB=AB030IFFB=9B0B0IFFB=CB0+03!!! This will ma%e the default !if FB is blan%$ Amounts . 5o to Insert5>ame5%e$ine and type the name An-Columns in the >ames in ork8ook box. *n the #e$ers to box type the formula =TA%+:%B,!0B! and now clic% A"". /lic% the Chart i6ar" from the Stan"ar" tool8ar , select /ine from the Chart t-pes, choose any type from the Chart su87t-pe . /lic% >ext and then the Series tab. /lic% A"", select cell FB using the collapse dialog to the left of the >ame box or type =SheetB(FB . *n the alues box Type =SheetB(An-Columns and in the Categor- x! axis la8els type =SheetB(%+:%B, Step through the rest of the &i6ar" setting up the chart how you want but for the Chart location choose As o8Zect in, finally clic% Finish . Position and si@e your chart so you can select from your list in cell FB.
1ow select a name from your list in FB and your chart series range will change accordingly.
To ;an"- %-namic #anges For Charts See %-namic ranges for full instructions and more Expan" %on T;T<%A?!!0B! Expan" %on UMT<%A?!!0B!
ou can also change the Columns the dynamic range will span by simply changing the last Argument of the T or CTA formula as the last argument, instead of ". See below< *n the #e$ers to box type< =TAA:A!0CTAB:B!! This dynamic range will now also expand across /olumns in 8ow ". So if you add another /olumn to your Table the dynamic range will automatically incorporate it. To try and give you a better understanding of the 0SET formula, read the text below ta%en from the Excel help $ile . otherwise, 0SET returns the 7=UEH error value. #os < is the number of rows, up or down, that you want the upper+left cell to refer to. Using F as the rows argument specifies that the upper+left cell in the reference is five rows below reference. 8ows can be positive !which means below the Starting reference$ or negative !which means above the Starting reference$. Cols < is the number of columns, to the left or right, that you want the upper+left cell of the result to refer to. Using F as the cols argument specifies that the upper+left cell in the reference is five columns to the right of reference. /ols can be positive !which means to the right of the Starting reference$ or negative !which means to the left of the Starting reference$. *f rows and cols offset reference over the edge of the wor%sheet, 0SET returns the 8EH error value. ;eight < is the height, in number of rows, that you want the returned reference to be. -eight must be a positive number.
&i"th < is the width, in number of columns, that you want the returned reference to be. :idth must be a positive number. *f height or width is omitted, it is assumed to be the same height or width as reference.
See also: Excel resources
commission)tax $ormulas. $o this often? (ree Custom xcel (unctions *dd
/alculating tax, or commission that is based on a sliding scale, or by brac%et, can be complicated. The formula below is one that can be used using Excel9s built in function?formulas. That is, the * function?formula and the SUM function?formula. The formula that can be used is> 2*!7F3=evelATax,SUM!!7F+=evelATax =evelATax8ate,=evel(Tax7mount=evel(Tax8ate,=evel#Tax7mount=evel#Tax8ate,=evel"T ax7mount=evel"Tax8ate$,*!7F3=evel(Tax,SUM!!7F+ =evel(Tax$=evel(Tax8ate,=evel#Tax7mount=evel#Tax8ate,=evel"Tax7mount=evel"Tax8 ate$,*!7F3=evel#Tax,SUM!!7F+ =evel#Tax$=evel#Tax8ate,=evel"Tax7mount=evel"Tax8ate$,SUM!!7F+ =evel"Tax$=evel"Tax8ate$$,)$$$ * have color coded the formula for easier reading. 7s you can see, this formula uses >ame" #anges for easier reading and modification. A named range can be created by selecting the cell% then typing the name wanted in the Jame Kox !left of formula bar) and pushing nter . To ma%e this easier to read, * have placed the cell names next to their named cell. *n the formula above, only the grey cells are being used. The last column !Amount o$ Tax a-a8le on $ is the result of subtracting the =evelTax !one row down$ from the =evelTax on the same row. or example, "(,))).)) !/e1elBTaxAmount$ is derived by subtracting /e1el+Tax !#F)))$ from /e1elBTax !"#)))$. That is< =/e1el+Tax7/e1elBTax
*f you prefer, these %ey numbers, can become >ame" Constants as opposed to 1amed 8anges . or example, to create the 1amed /onstant< /e1elBTax you would go to Insert 3>ame3%e$ine and type< /e1elBTax in the James in 5orGbooG: box, then< =B+333 in the Refers to: box, then clic% A"". Using Excel lookup Formula
There is another way, which some may prefer where the /<<U function?formula is used. This method relies on some &:uick deductions & being pre calculated and placed at the end of the white G grey table shown above. =A,H/<<UA,09BO:BK0,!7/<<UA,09BO:BK0@!
This is best seen by %onloa"ing &orking Example Thanks to Al8ert Tsang $or this excellent metho". :e can go one step further toward simplifying the calculation by using >ame" Formulas for each tax level calculation. 7fter doing this, we can then use> 2*!7"3=evelATax,=evelATax/alc,*!7"3=evel(Tax,=evel(Tax/alc,*!7"3=evel#Tax,=evel# Tax/alc,*!7"3=evel"Tax,=evel"Tax/alc,)$$$$
-ere are the steps to achieve this. 4T:, this method can also be used to overcome the Q neste" IF Function limitation . "$ /reate 1amed 8anges, or 1amed /onstants that will hold the figures needed. See screen shot above. #$ Place you 5ross pays in cell AB down. ($ Select cell 9B and go to Insert 3>ame3%e$ine. A$ *n the >ames in ork8ook: box type< /e1elBTaxCalc Then, in the #e$ers to: box type< =SUMAB7/e1elBTax!H/e1elBTax#ate! Then clic% A"". ;ote how we have referred to cell *+. /his now makes the ;amed ormula !4evel/a<alc) always look on the same row in the immediate column to the left for the gross pay . F$ 8epeat step O using the names and formulas shown below> /e1el+TaxCalc 2SUM!!7"+=evel#Tax$=evel#Tax8ate,=evel"Tax7mount=evel"Tax8ate$ /e1el,TaxCalc 2SUM!!7"+ =evel(Tax$=evel(Tax8ate,=evel#Tax7mount=evel#Tax8ate,=evel"Tax7mount=evel"Tax8 ate$ /e1elOTaxCalc 2SUM!!7"+ =evelATax$=evelATax8ate,=evel(Tax7mount=evel(Tax8ate,=evel#Tax7mount=evel#Tax8 ate,=evel"Tax7mount=evel"Tax8ate$ It is important to %now that /e1elHTaxCalc will 7=:7S loo% on the same row, but left column for the gross pay figure.
Calculate Fixe" #ate Tax The Excel formula /ookup can be used to loo% for numeric values in lists and tables and to use those values in a calculation. 7 perfect example of how =oo%up can be used to glean information is to wor% out how much tax you are re'uired to pay.
The /ookup Function can be used to loo% for numeric values in lists and tables and to use those values in a calculation. 7 perfect example of how =oo%up can be used to glean information is to wor% out how much tax you are re'uired to pay. To do this, we must find an appropriate tax rate based on an annual salary and ta%e into consideration the number of dependents.
*deally, one should use %-namic >ame" #anges for =oo%up tables. -owever, for easier reading we have used range addresses here. /onsider the following table<
=oo%up generally re'uires three arguments !lookupP1alue0ta8leParra-0colPin"exPnum $. The loo%up value is the annual income, the table array is the address or location of the Tax Table above !7(<"C$ and the column index number is the relevant column applying> 1o Bependents, " Bependent, # Bependents etc. =et9s say that we earn N),))) per year, and we have no Bependents. The =oo%up function to wor% out the tax payable is written as 2=00;UP!-(,7(<"C,#$ and will return a value of "W,))). This is because =oo%up scans down the first column loo%ing for the loo%up value !N),)))$ in the table, then returns the value in column # of the table on the same row !"W,)))$. This is because the exact amount of N),))) exists under Annual Income . &hen There is no Exact Match
=et9s loo% at another example. This time, let9s say we earn A(,))) per year and we have ( Bependents. The unction is written in the same way 2=00;UP!-(,7(<"C,F$. -owever as A(,))) cannot be found in the first column of the Tax Table, =oo%up will step bac% to the closest value, so it scans down the first column loo%ing for the loo%up value !A(,)))$ in the table, it can9t find it, so it steps bac% to the closest value. *n this case A),))). *t then returns the value in column F of the table in the same row !D,N))$. To see details on this see< /ookup here. Using /ookup to ork out Commission %ue
ou can also easily use this type of =oo%up in a formula. =et9s say you wanted to wor% out how much money was due to you, when your earnings were wor%ed out as a percentage of sales<
ou would write the formula as 2B(=00;UP!B(,7#<4"),#$. *f your sales are F))), then the commission due will be ","#F.)). This is because F))) is multiplied by the result of the =oo%up. =oo%up scans down the first column until it locates F))), then returns the value in column # on the same row. *f your sales are DF), then the commission due will be ""#.F). This is because DF) is multiplied by the result of the =oo%up. *n this case the =oo%up cannot find DF) when it scans down the first column of the table. *t steps bac% to the closest value, F)) and returns the value in the second column on the same row, "F. So in effect our formula is ta%ing the amount of sales, DF) and multiplying it by "F, the amount of commission due. Tip
7 great way to display values to ma%e your table easier to read and understand when you wish to use =oo%up would be to format your cells with a custom $ormat of &")) to ACC& in cell 7#, &F)) to CCC& in 7( etc, so your values "ispla- li%e in the following table. *t is important to note that these are only "ispla-e" 1alues and the true underlying value is still the same as shown in 7#<7") in the table a8o1e.
I
PivotTables are used to display and extract a variety of information from a table of data that resides within either Microsoft Excel or another compatible database type. PivotTables are fre'uently used to extract statistical information from raw data. ou can drag around the different fields within a PivotTable to view its data from different perspectives. * thought we would loo% at a really nifty feature of Pivot Tables L the ability to insert a calculated field. or example, if you had a pivot table set up, with an amount displayed in the Bata *tems area, you may wish to display the 5ST !tax$ component of the 7mount 0wing so you can see it at a glance. irst you need to create the pivot table. *n our list, we have >ames in column 7 and Amount <ing in /olumn 4. :e created a pivot table and moved the >ames field to the +ow area and the Amount <ing to the -ata area. %onloa" re Example
:ith our PivotTable created, it would be nice if we could see at a glance the 5ST component of each of the amounts owing. :e can do this by inserting what is %nown as a calculated field. To
|