tag:blogger.com,1999:blog-54793642379344426532024-02-21T07:21:21.916+07:00JAGOAN EXCELJadi jagoan Excel.... mantab men....Bang Adihttp://www.blogger.com/profile/07414156117073688979noreply@blogger.comBlogger9125tag:blogger.com,1999:blog-5479364237934442653.post-21170739010532281052007-04-03T10:04:00.000+07:002007-04-03T10:06:48.372+07:00Prevent Duplicate Entry<p style="text-align: justify;"><b>How can I make sure that duplicate invoice numbers are not entered?</b>.</p><p style="text-align: justify;">In Excel 97, you can use the new Data Validation feature to do this. In our example, the invoice numbers are being entered in column A. Here is how to set it up for a single cell:</p><p style="text-align: justify;"><img src="http://www.mrexcel.com/mec990110.gif" height="367" width="521" /></p><ul style="text-align: justify;"><li>The next cell to be entered is A9. Click in cell A9, and select Data>Validation from the menu.</li><li>In the "Allow:" drop down box, choose "Custom"</li><li>Enter this formula exactly how it appears: =ISNA(VLOOKUP(A9,A$1:A8,1,FALSE))</li><li>Click the Error Alert tab in the Data Validation dialog box.</li><li>Make sure that the "Show alert" box is checked.</li><li>For Style:, pick Stop</li><li>Enter a Title of "Non Unique Value"</li><li>Enter a message of "You must enter a unique invoice number."</li><li>Click "OK"</li></ul><div style="text-align: justify;">You can test it out. Enter a new value, say 10001 in cell A9. No problem. But, try to repeat a value, say 10088 and the following will appear:</div><p style="text-align: justify;"><img src="http://www.mrexcel.com/mec990110a.gif" height="130" width="385" /></p><p style="text-align: justify;">The final thing to do is to copy this validation from cell A9 to the other cells in column A.</p><ul style="text-align: justify;"><li>Click in column A and select Edit>copy to copy the cell.</li><li>Select a large range of cells in column A. Perhaps A10:A500.</li><li>Select Edit, Paste Special. From the Paste Special dialog, select "Validation" and click OK. The validation rule that you entered from cell A9 will be copied into all of the cells down to A500.</li></ul><div style="text-align: justify;">If you click in cell A12 and pick Data Validation, you will see that Excel changed the validation formula to be =ISNA(VLOOKUP(A12,A$1:A11,1,FALSE)).<br />That is all that you need to know to make it work. For those of you who want to know more, I will explain in English how the formula is working.<br /></div><h2 style="text-align: justify;">=ISNA(VLOOKUP(A9,A$1:A8,1,FALSE))</h2><div style="text-align: justify;">We are sitting in cell A9. We are telling the Vlookup function to take the value of the cell we just entered (A9) and to try to find a match in the cells that range from A$1 to A8. The next argument, the 1, tells Vlookup that when a match is found to tell us the data from the first column. Finally, the False in the vlookup says that we are only looking for exact matches. Here is trick #1: If the VLOOKUP finds a match, it will return a value. But, if it does not find a match, it will return the special value of "#N/A". Normally, these #N/A values are bad things, but in this case, we WANT an #N/A. If we get an #N/A, then you know that this new entry is unique and does not match anything above it. An easy way to test if a value is #N/A is to use the ISNA() function. If something inside the ISNA() evaluates to an #N/A, you get a TRUE. So, when they enter a new invoice number and it is not found in the list above the cell, the vlookup will return an #N/A, which will cause the ISNA() to be true.</div><p style="text-align: justify;">The second bit of trickery is in the second argument for the Vlookup function. I was careful to specify A<b>$</b>1:A8. The dollar sign before the 1 tells Excel that when we copy this validation to other cells, it should always start looking in cell of the current column. This is called an absolute address. I was equally careful not to put a dollar sign before the 8 in A8. This is called a relative address and tells Excel that when we copy this address, it should stop looking in the cell just above the current cell. Then, when we copy the validation and look at the validation for cell A12, the second argument in the vlookup correctly shows A$1:A11.</p><p style="text-align: justify;">There are two problems with this solution. First, it will not work in Excel 95. Second, the validations are only performed on cells that change. If you enter a unique value in cell A9, and then go back up and edit cell A6 to be the same value you entered in A9, the validation logic in A9 will not be invoked and you will end up with duplicate values in your worksheet.</p><div style="text-align: justify;">The old-fashioned method used in Excel 95 will address both of these issues. In the old method, you would have the validation logic sitting in a temporary column B. To set this up, enter the following formula in cell B9: =ISNA(VLOOKUP(A9,A$1:A8,1,FALSE))<br />Copy this formula from B9. Paste it in cells B2:B500. Now, as you enter invoice numbers in column A, column B will show TRUE if the invoice is unique, and FALSE if it is not unique.</div><div class="blogger-post-footer">http://xlmaster.blogspot.com</div>Bang Adihttp://www.blogger.com/profile/07414156117073688979noreply@blogger.com0tag:blogger.com,1999:blog-5479364237934442653.post-70977451909650176782007-03-21T09:47:00.000+07:002007-03-21T10:01:27.723+07:00PIVOT TABLE<div style="text-align: justify;">Let's suppose you've compiled a large list of data - for example, sales figures for every product your company makes. But now you're ready to distill some meaningful information from the data. For example, you might want to answer the following questions:<o:p></o:p><br /><span style="font-family:Symbol;">·<span style=";font-family:";font-size:7;" > </span></span>What is the total sales for each product by region?<o:p> </o:p> </div><p style="text-align: justify;" class="ListBulletedItem1"><span style="font-family:Symbol;">·<span style=";font-family:";font-size:7;" > </span></span>Which products are selling best over time?<o:p> </o:p> </p><div style="text-align: justify;"> </div><p style="text-align: justify;" class="ListBulletedItem1"><span style="font-family:Symbol;">·<span style=";font-family:";font-size:7;" > </span></span>Who is your highest-performing salesperson?<o:p> </o:p> </p><div style="text-align: justify;"> </div><p style="text-align: justify;" class="Text">For these and other questions, you can create a PivotTable<sup>®</sup> report - an interactive table that automatically extracts, organizes, and summarizes your data. You can then use the report to analyze the data - for example, make comparisons, detect patterns and relationships, and analyze trends.</p><p style="text-align: justify;" class="Text"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_y4lR3OFrFoM/RgCePDOdtJI/AAAAAAAAAAs/os5j5wzO2YM/s1600-h/Create1.gif"><img style="cursor: pointer; width: 360px; height: 206px;" src="http://bp3.blogger.com/_y4lR3OFrFoM/RgCePDOdtJI/AAAAAAAAAAs/os5j5wzO2YM/s320/Create1.gif" alt="" id="BLOGGER_PHOTO_ID_5044205564056155282" border="0" /></a><o:p> </o:p> </p><div style="text-align: justify;"> </div><p class="Text" style="line-height: normal; text-align: justify;"><b style=""><a style=""><span style="color:white;"><!--[if gte vml 1]><v:shapetype id="_x0000_t75" coordsize="21600,21600" spt="75" preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"> <v:stroke joinstyle="miter"> <v:formulas> <v:f eqn="if lineDrawn pixelLineWidth 0"> <v:f eqn="sum @0 1 0"> <v:f eqn="sum 0 0 @1"> <v:f eqn="prod @2 1 2"> <v:f eqn="prod @3 21600 pixelWidth"> <v:f eqn="prod @3 21600 pixelHeight"> <v:f eqn="sum @0 0 1"> <v:f eqn="prod @6 1 2"> <v:f eqn="prod @7 21600 pixelWidth"> <v:f eqn="sum @8 21600 0"> <v:f eqn="prod @7 21600 pixelHeight"> <v:f eqn="sum @10 21600 0"> </v:formulas> <v:path extrusionok="f" gradientshapeok="t" connecttype="rect"> <o:lock ext="edit" aspectratio="t"> </v:shapetype><v:shape id="_x0000_i1027" type="#_x0000_t75" style="'width:348pt;" fillcolor="window"> <v:imagedata src="../../../../DOCUME~1/henryd/LOCALS~1/Temp/FrontPageTempDir/wpe1.gif" href="../../../oartsh9/OfficeUpdate/Create0102.gif"> </v:shape><![endif]--> </span></a></b><img src="file:///C:/WINDOWS/TEMP/moz-screenshot-3.jpg" alt="" /> </p><div style="text-align: justify;"> </div><p class="Text" style="line-height: normal; text-align: justify;">Read on to discover what you can do with a PivotTable report.<o:p> </o:p> </p><div style="text-align: justify;"> </div><h5 style="text-align: justify;">Summarize and Analyze Your Data<o:p> </o:p> </h5><div style="text-align: justify;"> </div><p style="text-align: justify;" class="Text">To see the "big picture" of your data, you can use a PivotTable report to summarize and analyze the data. You can control how Microsoft<sup>®</sup> Excel 2000 summarizes the data - for example, by sum, average, or count - without entering a single formula.<o:p> </o:p> </p><div style="text-align: justify;"> </div><h5 style="text-align: justify;">Add or Remove Data<o:p> </o:p> </h5><div style="text-align: justify;"> </div><p style="text-align: justify;" class="Text">Not quite enough information in your PivotTable report? For example, maybe you want to include sales figures broken down by salesperson. You can easily add or remove categories of data</p><h1 style="text-align: justify;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_y4lR3OFrFoM/RgCewjOdtKI/AAAAAAAAAA0/BJKIYhJ7BTk/s1600-h/What3.gif"><img style="cursor: pointer;" src="http://bp1.blogger.com/_y4lR3OFrFoM/RgCewjOdtKI/AAAAAAAAAA0/BJKIYhJ7BTk/s400/What3.gif" alt="" id="BLOGGER_PHOTO_ID_5044206139581772962" border="0" /></a></h1><div style="text-align: justify;"> </div><p class="Text" style="line-height: normal; text-align: justify;"><b style=""><a style=""><span style="color:white;"><!--[if gte vml 1]><v:shape id="_x0000_i1028" type="#_x0000_t75" style="'width:348pt;height:120.75pt'" fillcolor="window"> <v:imagedata src="../../../../DOCUME~1/henryd/LOCALS~1/Temp/msoclip1/01/clip_image002.png" href="../../../oartsh9/OfficeUpdate/What3.gif"> </v:shape><![endif]--> </span></a></b> </p><div style="text-align: justify;"> </div><h5 style="text-align: justify;">Quickly Rearrange the Layout<o:p> </o:p> </h5><div style="text-align: justify;"> </div><p style="text-align: justify;" class="Text">Not satisfied with the layout of your PivotTable report? For example, maybe you'd prefer to display the salesperson information in rows instead of in columns. The interactive nature of your PivotTable report lets you literally turn the table: you can easily move (or "pivot") the rows and columns to view different summaries of the data.<o:p> </o:p> </p><div style="text-align: justify;"> </div><p class="Text" style="line-height: normal; text-align: justify;"> </p><div style="text-align: justify;"> </div><h5 style="text-align: justify;">View a Subset of the Data</h5><div style="text-align: justify;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_y4lR3OFrFoM/RgCfTjOdtLI/AAAAAAAAAA8/cu5kT51hsYw/s1600-h/What4.gif"><img style="cursor: pointer;" src="http://bp1.blogger.com/_y4lR3OFrFoM/RgCfTjOdtLI/AAAAAAAAAA8/cu5kT51hsYw/s400/What4.gif" alt="" id="BLOGGER_PHOTO_ID_5044206740877194418" border="0" /></a><br /><br /> </div><p style="text-align: justify;" class="Text">Want to filter the data so you can view a manageable chunk at a time? To do this, you can use a page field to break the PivotTable report into separate "pages." Each page contains a subset of the data that's summarized in the PivotTable report.<o:p> </o:p> </p><div style="text-align: justify;"> </div><p class="Text" style="line-height: normal; text-align: justify;"><b style=""><span style="color:white;"><a style=""><!--[if gte vml 1]><v:shape id="_x0000_i1025" type="#_x0000_t75" style="'width:348pt;height:177.75pt'" fillcolor="window"> <v:imagedata src="../../../../DOCUME~1/henryd/LOCALS~1/Temp/FrontPageTempDir/wpe4.gif" href="../../../oartsh9/OfficeUpdate/Create04.gif"> </v:shape><![endif]--> </a></span></b><o:p> </o:p> </p><div style="text-align: justify;"> </div><p style="text-align: justify;" class="Text"><b style="">Are there other reasons to use page fields?</b><span style=""> </span>If your PivotTable report contains many fields, you can use page fields to keep your report compact and readable. Or, if you're retrieving data from a large, external non-OLAP database, use page fields to limit the amount of data retrieved at a time. That way, you can avoid long waits and memory problems.<o:p> </o:p> </p><div style="text-align: justify;"> </div><h5 style="text-align: justify;">Show Just the Details You Want<o:p> </o:p> </h5><div style="text-align: justify;"> </div><p style="text-align: justify;" class="Text">Want to zero in on specific details in a PivotTable report? You can display or hide items in a row or column - for example, specific products or salespersons. You can also display or hide details about items in row or column.</p><p style="text-align: justify;" class="Text"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_y4lR3OFrFoM/RgCftzOdtMI/AAAAAAAAABE/lNMsIi2lZqI/s1600-h/Hide1b.gif"><img style="cursor: pointer;" src="http://bp2.blogger.com/_y4lR3OFrFoM/RgCftzOdtMI/AAAAAAAAABE/lNMsIi2lZqI/s400/Hide1b.gif" alt="" id="BLOGGER_PHOTO_ID_5044207191848760514" border="0" /></a><o:p> </o:p> </p><div style="text-align: justify;"> </div><p class="Text" style="line-height: normal; text-align: justify;"><b style=""><a style=""><span style="color:white;"><!--[if gte vml 1]><v:shape id="_x0000_i1026" type="#_x0000_t75" style="'width:276.75pt;height:126pt'" fillcolor="window"> <v:imagedata src="../../../../DOCUME~1/henryd/LOCALS~1/Temp/FrontPageTempDir/wpe5.gif" href="../../../oartsh9/OfficeUpdate/Hide1b.gif"> </v:shape><![endif]--> </span></a></b> </p><div style="text-align: justify;"> </div><p style="text-align: justify;" class="Artcaption"> <o:p> </o:p></p><div class="blogger-post-footer">http://xlmaster.blogspot.com</div>Bang Adihttp://www.blogger.com/profile/07414156117073688979noreply@blogger.com0tag:blogger.com,1999:blog-5479364237934442653.post-73336479869702684692007-03-02T13:58:00.000+07:002007-03-02T14:29:24.660+07:00CONDITION FORMATINGConditional formatting is one of my favourite Excel facilities, and I use it prolifically to help identify the key information in my worksheets (to be honest, I probably over-use, but that's my style!). <p style="text-align: justify;">This page explains the basic principles of conditional formatting, and then shows a few specific examples that I have regularly used. The page is structured as follows</p><div style="text-align: justify;"> </div><p class="MsoNormal" style="margin-right: 36pt; margin-left: 36pt; text-align: justify;"><a href="http://www.xldynamic.com/source/xld.CF.html#basic">Basic Principles</a><br /><a href="http://www.xldynamic.com/source/xld.CF.html#rows">Row Striping</a><br /><a href="http://www.xldynamic.com/source/xld.CF.html#columns">Column Striping</a><br /><a href="http://www.xldynamic.com/source/xld.CF.html#top3">Identifying Top 3 In a Range Of Values</a><br /><a href="http://www.xldynamic.com/source/xld.CF.html#errors"><span style="text-decoration: none;"><!--[if gte vml 1]><v:shapetype id="_x0000_t75" coordsize="21600,21600" spt="75" preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"> <v:stroke joinstyle="miter"> <v:formulas> <v:f eqn="if lineDrawn pixelLineWidth 0"> <v:f eqn="sum @0 1 0"> <v:f eqn="sum 0 0 @1"> <v:f eqn="prod @2 1 2"> <v:f eqn="prod @3 21600 pixelWidth"> <v:f eqn="prod @3 21600 pixelHeight"> <v:f eqn="sum @0 0 1"> <v:f eqn="prod @6 1 2"> <v:f eqn="prod @7 21600 pixelWidth"> <v:f eqn="sum @8 21600 0"> <v:f eqn="prod @7 21600 pixelHeight"> <v:f eqn="sum @10 21600 0"> </v:formulas> <v:path extrusionok="f" gradientshapeok="t" connecttype="rect"> <o:lock ext="edit" aspectratio="t"> </v:shapetype><v:shape id="_x0000_i1025" type="#_x0000_t75" alt="" href="http://www.xldynamic.com/source/xld.CF.html#errors" style="'width:24pt;" button="t"> <v:imagedata src="file:///C:/WINDOWS/TEMP/msoclip1/02/clip_image001.gif" href="http://www.xldynamic.com/images/misc/new.gif"> </v:shape><![endif]--><!--[if !vml]--><!--[endif]--></span>Hiding Errors</a><br /><a href="http://www.xldynamic.com/source/xld.CF.html#due"><span style="text-decoration: none;"><!--[if gte vml 1]><v:shape id="_x0000_i1026" type="#_x0000_t75" alt="" href="http://www.xldynamic.com/source/xld.CF.html#due" style="'width:24pt;" button="t"> <v:imagedata src="file:///C:/WINDOWS/TEMP/msoclip1/02/clip_image001.gif" href="http://www.xldynamic.com/images/misc/new.gif"> </v:shape><![endif]--><!--[if !vml]--><!--[endif]--></span>Due Dates</a><br /><a href="http://www.xldynamic.com/source/xld.CF.html#lights">Traffic Lights</a><br /><a href="http://www.xldynamic.com/source/xld.CF.html#calendar">A Simple Calendar</a><br /><a href="http://www.xldynamic.com/source/xld.CF.html#restrict">Restrictions</a><br /><a href="http://www.xldynamic.com/source/xld.CF.html#summary">In Summary</a><br /><a href="http://www.xldynamic.com/source/xld.CF.html#download">Download</a> </p><div style="text-align: justify;"> </div><h2 style="text-align: justify;">Basic Principles</h2><div style="text-align: justify;"> </div><p style="text-align: justify;">Conditional formatting is a facility accessed from the Format menu on the main Worksheet menu bar. When this option is selected, you are presented with the folowing dialog box:</p><div style="text-align: justify;"> </div><p style="text-align: justify;"><!--[if gte vml 1]><v:shape id="_x0000_i1027" type="#_x0000_t75" alt="" style="'width:406.5pt;height:126.75pt'"> <v:imagedata src="file:///C:/WINDOWS/TEMP/msoclip1/02/clip_image004.gif" href="http://www.xldynamic.com/images/pictures/CFdialog.gif"> </v:shape><![endif]--><!--[if !vml]--><!--[endif]--><img src="file:///C:/WINDOWS/TEMP/moz-screenshot-1.jpg" alt="" /><img src="file:///C:/WINDOWS/TEMP/moz-screenshot-2.jpg" alt="" /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.xldynamic.com/images/pictures/CFdialog.gif"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 570px; height: 177px;" src="http://www.xldynamic.com/images/pictures/CFdialog.gif" alt="" border="0" /></a><br /><b>Figure 1.</b></p><div style="text-align: justify;"> </div><p style="text-align: justify;">This allows the selection of a condition criteria, the default shown is the 'between' criteria but there is also 'not between', 'equal to', 'not equal to', 'greater than', 'less than', 'greater than or equal to', or 'less than or equal to'. After the criteria has been selected, appropriate value box(es) are shown to enable the input of the value to be tested. For instance, the 'between' option allows 2 values to be input, for obvious reasons, whereas the 'Equal to' option simply has one.</p><div style="text-align: justify;"> </div><p style="text-align: justify;">After setting the condition and the value, it is then necessary to set the format. Whilst it is possible to set font characteristics, borders, and cell patterns, in this discussion, I am only setting cell colours. I will leave it to you to experiment with the others, they are all accessed from the 'Format' button, as separate tabs.</p><div style="text-align: justify;"> </div><p style="text-align: justify;">As an example, consider highlighting any values greater than 100. The basic data is shown here in Figure 2.</p><div style="text-align: justify;"> </div><p style="text-align: justify;"><!--[if gte vml 1]><v:shape id="_x0000_i1028" type="#_x0000_t75" alt="" style="'width:414.75pt;height:246pt'"> <v:imagedata src="file:///C:/WINDOWS/TEMP/msoclip1/02/clip_image005.gif" href="http://www.xldynamic.com/images/pictures/CFdata.gif"> </v:shape><![endif]--><!--[if !vml]--><!--[endif]--><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.xldynamic.com/images/pictures/CFdata.gif"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 535px; height: 316px;" src="http://www.xldynamic.com/images/pictures/CFdata.gif" alt="" border="0" /></a><br /><b>Figure 2.</b></p><div style="text-align: justify;"> </div><p style="text-align: justify;">To implement the solution, select the data to be tested, enter conditional formatting as described above, select the 'greater than' condition from the list, and put 100 in the value box. Click the 'Format' button, select the 'Patterns' tab, and choose a colour to format the cell with. Exit conditional formatting and the result should be similar to Figure 3. below.</p><div style="text-align: justify;"> </div><p style="text-align: justify;"><!--[if gte vml 1]><v:shape id="_x0000_i1029" type="#_x0000_t75" alt="" style="'width:414.75pt;height:246pt'"> <v:imagedata src="file:///C:/WINDOWS/TEMP/msoclip1/02/clip_image006.gif" href="http://www.xldynamic.com/images/pictures/CFgreaterthan.gif"> </v:shape><![endif]--><!--[if !vml]--><!--[endif]--><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.xldynamic.com/images/pictures/CFgreaterthan.gif"><img style="cursor: pointer; width: 592px; height: 351px;" src="http://www.xldynamic.com/images/pictures/CFgreaterthan.gif" alt="" border="0" /></a><br /><b>Figure 3.</b></p><div style="text-align: justify;"> </div><p style="text-align: justify;">Note that cells D6 and E10 are not highlighted, as we tested for greater than 100.</p><div style="text-align: justify;"> </div><h2 style="text-align: justify;">Row Striping</h2><div style="text-align: justify;"> </div><p style="text-align: justify;" class="MsoNormal">The previous example shows a simple use of conditional formatting, but it can be much more powerful than this. This power comes when using formulae within the condition criteria. An example is a worksheet with colour striping (just like the old computer printout paper that was common many years ago). This is useful to be able to read a very busy spreadsheet, separating rows for legibility. </p><div style="text-align: justify;"> </div><p style="text-align: justify;">Using the data from the previous example, we will add green stripes to every other row.</p><div style="text-align: justify;"> </div><p style="text-align: justify;">As before, select the rows to be tested, and enter conditional formatting. In the condition dropdown box to the left, the one that says 'Cell Value Is', select the other value, 'Formula Is'. This then presents a single text box for entering the criteria, as shown in Figure 4. below.</p><div style="text-align: justify;"> </div><p style="text-align: justify;"><!--[if gte vml 1]><v:shape id="_x0000_i1030" type="#_x0000_t75" alt="" style="'width:406.5pt;height:126.75pt'"> <v:imagedata src="file:///C:/WINDOWS/TEMP/msoclip1/02/clip_image007.gif" href="http://www.xldynamic.com/images/pictures/CFformula.gif"> </v:shape><![endif]--><!--[if !vml]--><!--[endif]--><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.xldynamic.com/images/pictures/CFformula.gif"><img style="cursor: pointer; width: 545px; height: 170px;" src="http://www.xldynamic.com/images/pictures/CFformula.gif" alt="" border="0" /></a><br /><b>Figure 4.</b></p><div style="text-align: justify;"> </div><p style="text-align: justify;">To get row striping, add a formula of <span class="function">=MOD(ROW(),2)=0</span>, click the 'Format' button, select the 'Patterns' tab, and choose a cell colour, such as 'Light Green'. Exit conditional formatting, and if all is well, your spreadsheet should look like Figure 5. below.</p><div style="text-align: justify;"> </div><p style="text-align: justify;"><!--[if gte vml 1]><v:shape id="_x0000_i1031" type="#_x0000_t75" alt="" style="'width:414.75pt;height:246pt'"> <v:imagedata src="file:///C:/WINDOWS/TEMP/msoclip1/02/clip_image008.gif" href="http://www.xldynamic.com/images/pictures/CFrows.gif"> </v:shape><![endif]--><!--[if !vml]--><!--[endif]--><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.xldynamic.com/images/pictures/CFrows.gif"><img style="cursor: pointer; width: 543px; height: 321px;" src="http://www.xldynamic.com/images/pictures/CFrows.gif" alt="" border="0" /></a><br /><b>Figure 5.</b></p><div style="text-align: justify;"> </div><p style="text-align: justify;">This formula works by comparing the modulus of the row number and 2 against zero. If this test succeeds, the format is applied, if not, nothing happens.</p><div style="text-align: justify;"> </div><p style="text-align: justify;">Note that a formula of <span class="function">=MOD(ROW(),2)=1</span> would colour all of the odd numbered rows.</p><div style="text-align: justify;"> </div><p style="text-align: justify;">It is also possible to stripe every 3rd row, or every 4th row, etc. This is achieved by changing the value of the divisor argument to the 'MOD' function. So<br /><span class="function">=MOD(ROW(),3)=0</span> will stripe every 3rd row<br /><span class="function">=MOD(ROW(),4)=0</span> will stripe every 4th row<br />etc.</p><div style="text-align: justify;"> </div><p style="text-align: justify;">Similarly, it is simple to change which row the striping starts at. In this instance, the value that the 'MOD' fuction is being compared against is changed. The value tested against can be any value bewteen 0 and the divisor minus one, as these are the only values that the 'MOD' function will return. Examples are:<br /><span class="function">=MOD(ROW(),2)=1</span> will stripe every 2nd row, starting at row 1<br /><span class="function">=MOD(ROW(),3)=1</span> will stripe every 3rd row, starting at row 1<br /><span class="function">=MOD(ROW(),3)=2</span> will stripe every 3rd row, starting at row 2<br /><span class="function">=MOD(ROW(),4)=1</span> will stripe every 4th row, starting at row 1<br /><span class="function">=MOD(ROW(),4)=2</span> will stripe every 4th row, starting at row 2<br /><span class="function">=MOD(ROW(),4)=3</span> will stripe every 4th row, starting at row 3<br />etc.</p><div style="text-align: justify;"> </div><p style="text-align: justify;">The general formula is <span class="function">=MOD(ROW(),m+1)=MOD(n,m+1)</span><br />where m is the number of non-coloured (blank) rows between coloured rows, and n is the start row.</p><div style="text-align: justify;"> </div><h2 style="text-align: justify;">Column Striping</h2><div style="text-align: justify;"> </div><p style="text-align: justify;">Column striping is just as easy as row striping, the 'COLUMN()' function is used within the 'MOD' function, rather than 'ROW()'. For example:<br /><span class="function">=MOD(COLUMN(),2)=1</span> will stripe every other row, starting at row 2.<br />The effect is as shown below in Figure 6.</p><div style="text-align: justify;"> </div><p style="text-align: justify;"><!--[if gte vml 1]><v:shape id="_x0000_i1032" type="#_x0000_t75" alt="" style="'width:414.75pt;height:246pt'"> <v:imagedata src="file:///C:/WINDOWS/TEMP/msoclip1/02/clip_image009.gif" href="http://www.xldynamic.com/images/pictures/CFcolumns.gif"> </v:shape><![endif]--><!--[if !vml]--><!--[endif]--><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.xldynamic.com/images/pictures/CFcolumns.gif"><img style="cursor: pointer; width: 573px; height: 340px;" src="http://www.xldynamic.com/images/pictures/CFcolumns.gif" alt="" border="0" /></a><br /><b>Figure 6.</b></p><div style="text-align: justify;"> </div><p style="text-align: justify;"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></p><div style="text-align: justify;"> </div><h2 style="text-align: justify;">Identifying Top 3 In a Range Of Values</h2><div style="text-align: justify;"> </div><p style="text-align: justify;">Another good use of conditional formatting is to pick out certain items on a spreadsheet amongst a large number of items, so as to highlight those that of most importance. This is especially useful when the data is being updated, thus the key items may not be in any fixed place on the spreadsheet.</p><div style="text-align: justify;"> </div><p style="text-align: justify;">Using the same worksheet as before, select the data cells, enter conditional formatting, select the 'Formula Is' condition, and input the following formula<br /><span class="function">=A1=LARGE($A$1:$H$18,1)</span><br />and set the format as required (in this example, I set the format to a red background, with bold white text).</p><div style="text-align: justify;"> </div><p style="text-align: justify;">To add further conditions for the second and third largest, click the 'Add >>' button, use a condition of 'Formula Is' with formulae of<br /><span class="function">=A1=LARGE($A$1:$H$18,2)</span><br /><span class="function">=A1=LARGE($A$1:$H$18,3)</span><br />and set the formats to the same as the top value. The conditional formatting dialog should then look like Figure 7. below.</p><div style="text-align: justify;"> </div><p style="text-align: justify;"><!--[if gte vml 1]><v:shape id="_x0000_i1033" type="#_x0000_t75" alt="" style="'width:406.5pt;height:263.25pt'"> <v:imagedata src="file:///C:/WINDOWS/TEMP/msoclip1/02/clip_image010.gif" href="http://www.xldynamic.com/images/pictures/CFmaxconditions.gif"> </v:shape><![endif]--><!--[if !vml]--><!--[endif]--><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.xldynamic.com/images/pictures/CFmaxconditions.gif"><img style="cursor: pointer; width: 560px; height: 361px;" src="http://www.xldynamic.com/images/pictures/CFmaxconditions.gif" alt="" border="0" /></a><br /><b>Figure 7.</b></p><div style="text-align: justify;"> </div><p style="text-align: justify;">If this is all done successfully, the end result should be as in Figure 8.</p><div style="text-align: justify;"> </div><p style="text-align: justify;"><!--[if gte vml 1]><v:shape id="_x0000_i1034" type="#_x0000_t75" alt="" style="'width:414.75pt;height:246pt'"> <v:imagedata src="file:///C:/WINDOWS/TEMP/msoclip1/02/clip_image011.gif" href="http://www.xldynamic.com/images/pictures/CFmaxresults.gif"> </v:shape><![endif]--><!--[if !vml]--><!--[endif]--><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.xldynamic.com/images/pictures/CFmaxresults.gif"><img style="cursor: pointer; width: 544px; height: 322px;" src="http://www.xldynamic.com/images/pictures/CFmaxresults.gif" alt="" border="0" /></a><br /><b>Figure 8.</b></p><div style="text-align: justify;"> </div><p style="text-align: justify;">If wanted, each of the conditions could be formatted differently, to identify largest, second and third largest separately.</p><div style="text-align: justify;"> </div><p style="text-align: justify;">It would also have been possible to amalgate all 3 conditions into a single condition, using a formula of<br /><span class="function">=OR(A1=LARGE($A$1:$H$18,1),A1=LARGE($A$1:$H$18,2),A1=LARGE($A$1:$H$18,3))</span><br />What it cannot be is a single conditioon with a formula of<br /><span class="function">=A1=LARGE($A$1:$H$18,{1,2,3})</span><br />as conditional formatting does not support the use of array constants in the criteria.</p><div style="text-align: justify;"> </div><h2 style="text-align: justify;">Hiding Errors</h2><div style="text-align: justify;"> </div><p style="text-align: justify;">Conditional formatting can even be used to hide errors, such as #DIV/0, divid by 0, or #NA, match not found.>/p> </p><div style="text-align: justify;"> </div><p style="text-align: justify;">Fig. 9 shows an example, with two columns where the errorsre hidden, two where the same erreors are not hidden.</p><div style="text-align: justify;"> </div><p style="text-align: justify;"><!--[if gte vml 1]><v:shape id="_x0000_i1035" type="#_x0000_t75" alt="" style="'width:375pt;height:190.5pt'"> <v:imagedata src="file:///C:/WINDOWS/TEMP/msoclip1/02/clip_image012.gif" href="http://www.xldynamic.com/images/pictures/CFHideErrors.gif"> </v:shape><![endif]--><!--[if !vml]--><!--[endif]--><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.xldynamic.com/images/pictures/CFHideErrors.gif"><img style="cursor: pointer; width: 508px; height: 257px;" src="http://www.xldynamic.com/images/pictures/CFHideErrors.gif" alt="" border="0" /></a><br /><b>Figure 9.</b></p><div style="text-align: justify;"> </div><p style="text-align: justify;">The errors are hidden by formatting the cell's font colour to white, which means they will not show against the cell background (of course if the cell colour is changed, the font colour should be changed to that colour.</p><div style="text-align: justify;"> </div><p style="text-align: justify;">To create this highlighting, follow these steps:</p><div style="text-align: justify;"> </div><ul style="text-align: justify;" type="disc"><li class="MsoNormal"><b>Step 1.</b><br />Select all of the target rows in the 'State %ge' column, staring in row 2 (this example will use column G).</li></ul><div style="text-align: justify;"> </div><p class="MsoNormal" style="margin: 0mm 0mm 12pt 36pt; text-align: justify;"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></p><div style="text-align: justify;"> </div><ul style="text-align: justify;" type="disc"><li class="MsoNormal"><b>Step 2.</b><br />Goto Menu Format>Conditional Formatting<br />Change Condition 1 to Formula Is<br />Add a formula of<br /><span class="function">=ISERROR(G2)</span><br />Click the Format button<br />Select the Font Tab<br />Select White from the Color dropdown<br />OK </li></ul><div style="text-align: justify;"> </div><p class="MsoNormal" style="margin: 0mm 0mm 12pt 36pt; text-align: justify;"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></p><div style="text-align: justify;"> </div><p style="text-align: justify;">At this point, the conditional formatting dialog should look like this</p><div style="text-align: justify;"> </div><p style="text-align: justify;"><!--[if gte vml 1]><v:shape id="_x0000_i1036" type="#_x0000_t75" alt="" style="'width:406.5pt;height:126.75pt'"> <v:imagedata src="file:///C:/WINDOWS/TEMP/msoclip1/02/clip_image013.gif" href="http://www.xldynamic.com/images/pictures/CFHideErrorsDialog.gif"> </v:shape><![endif]--><!--[if !vml]--><!--[endif]--><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.xldynamic.com/images/pictures/CFHideErrorsDialog.gif"><img style="cursor: pointer; width: 540px; height: 168px;" src="http://www.xldynamic.com/images/pictures/CFHideErrorsDialog.gif" alt="" border="0" /></a><br /><b>Figure 10.</b></p><div style="text-align: justify;"> </div><p style="text-align: justify;">OK the dialog, and it is all done.</p><div style="text-align: justify;"> </div><p style="text-align: justify;">If specific errors need to be hidden, this can also be done as follows: </p><div style="text-align: justify;"> </div><ul style="text-align: justify;" type="disc"><li class="MsoNormal">#N/A, #REF - test against the error function, <span class="function">=ISNA(G2)</span> or <span class="function">=ISREF(G2)</span></li><li class="MsoNormal">all error types - test that error directly, such as <span class="function">=COUNTIF(G2,"#N/A")</span> or <span class="function">=COUNTIF(G2,"#NAME?")</span>. Note that it is necessary to get the error text correct in this way.</li></ul><div style="text-align: justify;"> </div><p style="text-align: justify;">Whilst it may not be a good idea to just mask the errors, it might be better to fix the data, but it can be done, as shown.</p><div style="text-align: justify;"> </div><h2 style="text-align: justify;">Due Dates</h2><div style="text-align: justify;"> </div><p style="text-align: justify;">Conditional formatting is an ideal vehicle for highlighting due dates, showing items that are overdue, those shortly due, and those due later.</p><div style="text-align: justify;"> </div><p style="text-align: justify;">Fig. 11 shows the resultant highlights.</p><div style="text-align: justify;"> </div><p style="text-align: justify;"><!--[if gte vml 1]><v:shape id="_x0000_i1037" type="#_x0000_t75" alt="" style="'width:330pt;height:336.75pt'"> <v:imagedata src="file:///C:/WINDOWS/TEMP/msoclip1/02/clip_image014.gif" href="http://www.xldynamic.com/images/pictures/CFDueDates.gif"> </v:shape><![endif]--><!--[if !vml]--><!--[endif]--><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.xldynamic.com/images/pictures/CFDueDates.gif"><img style="cursor: pointer; width: 458px; height: 466px;" src="http://www.xldynamic.com/images/pictures/CFDueDates.gif" alt="" border="0" /></a><br /><b>Figure 11.</b></p><div style="text-align: justify;"> </div><p style="text-align: justify;">In this example, we have a list of invoices, and the invoice due date. Highlighting is as follows: </p><div style="text-align: justify;"> </div><ul style="text-align: justify;" type="disc"><li class="MsoNormal">red - items whose due date has passed</li><li class="MsoNormal">amber - items due within the next 2 weeks</li><li class="MsoNormal">green - items due within the next 3 months (or 12 weeks)</li></ul><div style="text-align: justify;"> </div><p style="text-align: justify;" class="MsoNormal">All other items are left without highlights. </p><div style="text-align: justify;"> </div><p style="text-align: justify;">To create this highlighting, follow these steps:</p><div style="text-align: justify;"> </div><ul style="text-align: justify;" type="disc"><li class="MsoNormal"><b>Step 1.</b><br />Select all of the target rows in the 'Due Date' column, staring in row 2.</li></ul><div style="text-align: justify;"> </div><p class="MsoNormal" style="margin: 0mm 0mm 12pt 36pt; text-align: justify;"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></p><div style="text-align: justify;"> </div><ul style="text-align: justify;" type="disc"><li class="MsoNormal"><b>Step 2.</b><br />Goto Menu Format>Conditional Formatting<br />Change Condition 1 to Formula Is<br />Add a formula of<br /><span class="function">=B2<today()></today()></span><br />Click the Format button<br />Select the Pattern Tab<br />Select red from the palette<br />OK </li></ul><div style="text-align: justify;"> </div><p class="MsoNormal" style="margin: 0mm 0mm 12pt 36pt; text-align: justify;"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></p><div style="text-align: justify;"> </div><ul style="text-align: justify;" type="disc"><li class="MsoNormal"><b>Step 3.</b><br />Goto Menu Format>Conditional Formatting<br />Change Condition 1 to Formula Is<br />Add a formula of<br /><span class="function">=B2<=TODAY+2*7</span><br />Click the Format button<br />Select the Pattern Tab<br />Select orange from the palette<br />OK </li></ul><div style="text-align: justify;"> </div><p class="MsoNormal" style="margin: 0mm 0mm 12pt 36pt; text-align: justify;"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></p><div style="text-align: justify;"> </div><ul style="text-align: justify;" type="disc"><li class="MsoNormal"><b>Step 4.</b><br />Goto Menu Format>Conditional Formatting<br />Change Condition 1 to Formula Is<br />Add a formula of<br /><span class="function">=B2<=TODAY()+12*7</span><br />Click the Format button<br />Select the Font Tab<br />Select the Pattern Tab<br />Select green from the palette<br />OK </li></ul><div style="text-align: justify;"> </div><p style="text-align: justify;">At this point, the conditional formatting dialog should look like this</p><div style="text-align: justify;"> </div><p style="text-align: justify;"><!--[if gte vml 1]><v:shape id="_x0000_i1038" type="#_x0000_t75" alt="" style="'width:406.5pt;height:263.25pt'"> <v:imagedata src="file:///C:/WINDOWS/TEMP/msoclip1/02/clip_image015.gif" href="http://www.xldynamic.com/images/pictures/CFDueDatesDialog.gif"> </v:shape><![endif]--><!--[if !vml]--><!--[endif]--><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.xldynamic.com/images/pictures/CFDueDatesDialog.gif"><img style="cursor: pointer; width: 534px; height: 345px;" src="http://www.xldynamic.com/images/pictures/CFDueDatesDialog.gif" alt="" border="0" /></a><br /><b>Figure 12.</b></p><div style="text-align: justify;"> </div><p style="text-align: justify;">OK the dialog, and it is all done.</p><div style="text-align: justify;"> </div><p style="text-align: justify;">If it is necessary to test a particular date, use a formula such as<br /><span class="function">=B2<date(2007,10,1)></date(2007,10,1)></span><br />which tests for a date less than 1st October 2007<br />OR<br /><span class="function">=B2<date(year(today()),month(today())+3,day(today()))></date(year(today()),month(today())+3,day(today()))></span><br />which tests for a date less than 3 months from today (3 months here, not 12 weeks).</p><div style="text-align: justify;"> </div><h2 style="text-align: justify;">Traffic Lights</h2><div style="text-align: justify;"> </div><p style="text-align: justify;">Another useful technique that is used in management reports is to highlight the data using the 'traffic lights' technique, on target items are in green, items slightly slipping are shown in yellow, and big slippages are shown in red.</p><div style="text-align: justify;"> </div><p style="text-align: justify;"><!--[if gte vml 1]><v:shape id="_x0000_i1039" type="#_x0000_t75" alt="" style="'width:462pt;height:247.5pt'"> <v:imagedata src="file:///C:/WINDOWS/TEMP/msoclip1/02/clip_image016.gif" href="http://www.xldynamic.com/images/pictures/CFLights.gif"> </v:shape><![endif]--><!--[if !vml]--><!--[endif]--><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.xldynamic.com/images/pictures/CFLights.gif"><img style="cursor: pointer; width: 610px; height: 326px;" src="http://www.xldynamic.com/images/pictures/CFLights.gif" alt="" border="0" /></a><br /><b>Figure 13.</b></p><div style="text-align: justify;"> </div><p style="text-align: justify;">The picture shows a number of national projects with a budget, cost to date, and estimated final cost. Thye will be flagged as follows: </p><div style="text-align: justify;"> </div><ul style="text-align: justify;" type="disc"><li class="MsoNormal">green - estimated cost is less than or equal to budget</li><li class="MsoNormal">yellow - estimated cost.is less than or equal to budget + 25%</li><li class="MsoNormal">red - estimated cost is greater than budget + 25%</li></ul><div style="text-align: justify;"> </div><p style="text-align: justify;" class="MsoNormal">As well as showing the lights colours, the background is shaded to provide emphasis. </p><div style="text-align: justify;"> </div><p style="text-align: justify;">The conditional formatting will be formula driven, and to avoid showing a light on a blank line kit tests for no budget, as well as the spend status. </p><div style="text-align: justify;"> </div><p style="text-align: justify;">It would be very simple to do the highlighting by shading a cell, maybe the status cell or one of the amount cells, such as the budget. Whilst this works, it would be better to show as a traffic light shows it, a coloured circle. This is achieved by using the Winding font.</p><div style="text-align: justify;"> </div><p style="text-align: justify;">To create this traffic lights, follow these steps:</p><div style="text-align: justify;"> </div><ul style="text-align: justify;" type="disc"><li class="MsoNormal"><b>Step 1.</b><br />Select the first data row in the 'Status' colum<br />Set the font of this cell to 'Winding' Enter a lower-case letter l in the cell<br />Centre the text in this cell<br />Copy this cell down to the appropriate number of rows. </li></ul><div style="text-align: justify;"> </div><p class="MsoNormal" style="margin: 0mm 0mm 12pt 36pt; text-align: justify;"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></p><div style="text-align: justify;"> </div><ul style="text-align: justify;" type="disc"><li class="MsoNormal"><b>Step 2.</b><br />Goto Menu Format>Conditional Formatting<br />Change Condition 1 to Formula Is<br />Add a formula of<br /><span class="function">=AND(B2<>"",D2<=B2)</span><br />Click the Format button<br />Select the Font Tab<br />Select bright green from the Color dropdown<br />Select the Pattern Tab<br />Select dark green from the palette<br />OK </li></ul><div style="text-align: justify;"> </div><p class="MsoNormal" style="margin: 0mm 0mm 12pt 36pt; text-align: justify;"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></p><div style="text-align: justify;"> </div><ul style="text-align: justify;" type="disc"><li class="MsoNormal"><b>Step 3.</b><br />Goto Menu Format>Conditional Formatting<br />Change Condition 1 to Formula Is<br />Add a formula of<br /><span class="function">=AND(B2<>"",D2<=B2*1.25)</span><br />Click the Format button<br />Select the Font Tab<br />Select yellow from the Color dropdown<br />Select the Pattern Tab<br />Select dark green from the palette<br />OK </li></ul><div style="text-align: justify;"> </div><p class="MsoNormal" style="margin: 0mm 0mm 12pt 36pt; text-align: justify;"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></p><div style="text-align: justify;"> </div><ul style="text-align: justify;" type="disc"><li class="MsoNormal"><b>Step 4.</b><br />Goto Menu Format>Conditional Formatting<br />Change Condition 1 to Formula Is<br />Add a formula of<br /><span class="function">=AND(B2<>"",D2>B2*1.25)</span><br />Click the Format button<br />Select the Font Tab<br />Select red from the Color dropdown<br />Select the Pattern Tab<br />Select dark green from the palette<br />OK </li></ul><div style="text-align: justify;"> </div><p style="text-align: justify;">At this point, the conditional formatting dialog should look like this</p><div style="text-align: justify;"> </div><p style="text-align: justify;"><!--[if gte vml 1]><v:shape id="_x0000_i1040" type="#_x0000_t75" alt="" style="'width:406.5pt;height:263.25pt'"> <v:imagedata src="file:///C:/WINDOWS/TEMP/msoclip1/02/clip_image017.gif" href="http://www.xldynamic.com/images/pictures/CFLightsDialog.gif"> </v:shape><![endif]--><!--[if !vml]--><!--[endif]--><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.xldynamic.com/images/pictures/CFLightsDialog.gif"><img style="cursor: pointer; width: 569px; height: 367px;" src="http://www.xldynamic.com/images/pictures/CFLightsDialog.gif" alt="" border="0" /></a><br /><b>Figure 14.</b></p><div style="text-align: justify;"> </div><p style="text-align: justify;">OK the dialog, and it is all done.</p><div style="text-align: justify;"> </div><h2 style="text-align: justify;">A Simple Calendar</h2><div style="text-align: justify;"> </div><p style="text-align: justify;">The final example of conditional formatting is a simple, one-page calendar. This calendar shows a month per column, and highlights weekdays, weekends, and today. The year is shown in a cell, changing the year will update the calendar automatically, all as a result of conditional formatting. Because the calendar is shown in a 12x31 grid, and not every month has 31 days, the inmvalid days are whitened-out, again using conditional formating. The finished result looks like Figure 11. below</p><div style="text-align: justify;"> </div><p style="text-align: justify;"><!--[if gte vml 1]><v:shape id="_x0000_i1041" type="#_x0000_t75" alt="" style="'width:415.5pt;height:472.5pt'"> <v:imagedata src="file:///C:/WINDOWS/TEMP/msoclip1/02/clip_image018.gif" href="http://www.xldynamic.com/images/pictures/CFcalendar.gif"> </v:shape><![endif]--><!--[if !vml]--><!--[endif]--><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.xldynamic.com/images/pictures/CFcalendar.gif"><img style="cursor: pointer; width: 540px; height: 614px;" src="http://www.xldynamic.com/images/pictures/CFcalendar.gif" alt="" border="0" /></a><br /><b>Figure 15.</b></p><div style="text-align: justify;"> </div><p style="text-align: justify;">The picture shows buttons at the foot of the calendar that allow scrolling through the years, selecting today, and showing the selected date. This is achieved with VBA and is not described here, but the example workbook does have these functions. </p><div style="text-align: justify;"> </div><p style="text-align: justify;">To create this calendar, follow these steps:</p><div style="text-align: justify;"> </div><ul style="text-align: justify;" type="disc"><li class="MsoNormal"><b>Step 1.</b><br />Open a new workbook<br />Select B2:M32<br />Put a box border around the selection<br />Add vertical border lines<br />Shade all cells with a light-green background. </li></ul><div style="text-align: justify;"> </div><p class="MsoNormal" style="margin: 0mm 0mm 12pt 36pt; text-align: justify;"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></p><div style="text-align: justify;"> </div><ul style="text-align: justify;" type="disc"><li class="MsoNormal"><b>Step 2.</b><br />Put a year number in A1<br />Add a named range to A1, menu <b>Insert>Name>Define</b> with a name of 'year'<br />Put day numbers, 1-31, in A2:A32<br />In B1 insert the formula<br /><span class="function">=DATE(year,COLUMN()-1,1)</span><br />format as 'mmm' and copy across to M1 </li></ul><div style="text-align: justify;"> </div><p class="MsoNormal" style="margin: 0mm 0mm 12pt 36pt; text-align: justify;"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></p><div style="text-align: justify;"> </div><ul style="text-align: justify;" type="disc"><li class="MsoNormal"><b>Step 3.</b><br />In B2, put formula<br /><span class="function">=TEXT(DATE(year,MONTH(B$1),$A2),"ddd")</span><br />and centre the cell<br />Copy the formula to B2:M32 </li></ul><div style="text-align: justify;"> </div><p class="MsoNormal" style="margin: 0mm 0mm 12pt 36pt; text-align: justify;"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></p><div style="text-align: justify;"> </div><ul style="text-align: justify;" type="disc"><li class="MsoNormal"><b>Step 4.</b><br />Select B2:M32<br />Menu <b>Format>Conditional Formatting</b><br />Change Condition 1 to 'Formula Is', add a formula of<br /><span class="function">=DATE(year,MONTH(B$1),$A2)=TODAY()</span><br />and format as red background<br />Add condition, change Condition 2 to 'Formula Is' , add a formula of<br /><span class="function">=MONTH(DATE(year,MONTH(B$1),$A2))<>MONTH(B$1)</span><br />and format as white text and a white pattern<br />Add condition, change Condition 3 to 'Formula Is', add a formula of<br /><span class="function">=OR(WEEKDAY(DATE(year,MONTH(B$1),$A2),1)=1,WEEKDAY(DATE(year,MONTH(B$1),$A2),1)=7)</span><br />format as pale blue background </li></ul><div style="text-align: justify;"> </div><p class="MsoNormal" style="margin: 0mm 0mm 12pt 36pt; text-align: justify;"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></p><div style="text-align: justify;"> </div><ul style="text-align: justify;" type="disc"><li class="MsoNormal"><b>Step 5.</b><br />A bit of presentation, colour the headings etc. </li></ul><div style="text-align: justify;"> </div><h2 style="text-align: justify;">Restrictions</h2><div style="text-align: justify;"> </div><p style="text-align: justify;">Although conditional formatting is a very useful, very powerful facility, it does have some restrictions. It is not possible to use unions, intersections or array constants in the criteria. And possibly the severest restriction is that there are only 3 conditions allowed. Although this can be effectively increased to 4 by virtue of the default, that is anything that does not match any of the defined criteria, this is still severely limited. I would have expected Excel to have increased this by now, 10 would be much more useful, but it is still three, and so if you want more, you need to revert to VBA.</p><div style="text-align: justify;"> </div><h2 style="text-align: justify;">In Summmary</h2><div style="text-align: justify;"> </div><p style="text-align: justify;">There it is, a few examples of conditional formatting that I hope demonstrate the power of this facility. It is all about presentation and useability, rather than adding to the spreadsheet calculation functionality, but that is a very important aspect of any spreadsheet and should not be overlooked.</p><div style="text-align: justify;"> </div><p style="text-align: justify;">It's usefulness will, as always, depend upon the creativity of you the user, and the appropriateness of its use. For example, whilst the calendar may in itself be of little value, it does show the level of complexity conditional formatting can be taken to.</p><div style="text-align: justify;"> </div><p style="text-align: justify;">As I come across more good uses of conditional formatting, I will post them on the website, and include them in the download. And, of course I would welcome suggestions/examples from others.</p><div style="text-align: justify;"> </div><p style="text-align: justify;" class="MsoNormal"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></p><div class="blogger-post-footer">http://xlmaster.blogspot.com</div>Bang Adihttp://www.blogger.com/profile/07414156117073688979noreply@blogger.com0tag:blogger.com,1999:blog-5479364237934442653.post-53691955496475193382007-03-02T13:56:00.000+07:002007-03-02T13:58:26.062+07:00SUMPRODUCT<p>Multiple Condition Tests</p> <p>One of the most basic functions in any spreadsheet is to return an answer based upon some condition. This becomes especially useful when counting or summing based upon that condition. One condition is useful, but multiple conditions extend the functionality and flexibility, so that you can count say the number of items sold by part number <u>AND</u> by month. There are a number of ways that this can be achieved within Excel, but this paper is focussing on one particular function, the <span class="name">SUMPRODUCT</span> function, which by creative use has evolved a flexibility undreamt of by its originators in Microsoft.</p> <p><span class="name">SUMPRODUCT</span> is one of the most versatile functions provided in Excel. In its most basic form, <span class="name">SUMPRODUCT</span> multiplies corresponding members in given arrays, and returns the sum of those products. This page discusses the classic use of <span class="name">SUMPRODUCT</span>, how creativity and inbuilt flexibility has enabled it to evolve into a far more useful function, and explains some of the techniques being deployed. Finally, some examples of <span class="name">SUMPRODUCT</span> show its versatility.</p> <p class="MsoNormal" style="margin-right: 36pt; margin-left: 36pt;"><a href="http://www.xldynamic.com/source/xld.SUMPRODUCT.html#classic">Standard Use of SUMPRODUCT</a><br /><a href="http://www.xldynamic.com/source/xld.SUMPRODUCT.html#new">Evolving Use of SUMPRODUCT</a><br /><a href="http://www.xldynamic.com/source/xld.SUMPRODUCT.html#advantages">Advantages of SUMPRODUCT</a><br /><a href="http://www.xldynamic.com/source/xld.SUMPRODUCT.html#explain">SUMPRODUCT Explained</a><br /><a href="http://www.xldynamic.com/source/xld.SUMPRODUCT.html#format">Format of SUMPRODUCT</a><br /><a href="http://www.xldynamic.com/source/xld.SUMPRODUCT.html#examples">Examples</a><br /><a href="http://www.xldynamic.com/source/xld.SUMPRODUCT.html#refs">References</a><br /><a href="http://www.xldynamic.com/source/xld.SUMPRODUCT.html#thanks">Acknowledgments</a> </p> <h2>Standard Use of SUMPRODUCT</h2> <p>In it's classic form, <span class="name">SUMPRODUCT</span> multiplies each value in one array by the corresponding value in another array, and returns the summed result. As an example, if cells A9:A11 contain the values 1,2,3 and B9:B11 contain 10,20,30, then<br /><br /><span class="function">=SUMPRODUCT(A9:A11,B9:B11)</span><br /><br />returns 140, or (1*10)+(2*20)+(3*30)=10+40+90=140.</p> <p class="MsoNormal">This is a useful function, but nothing more than that. A further, more 'creative' use of <span class="name">SUMPRODUCT</span> has evolved, and is still evolving, driven as far as I can see mainly by the regular contributors of the Microsoft Excel newsgroups. This has been a creative and productive process that has significantly increased the useability of <span class="name">SUMPRODUCT</span>, but in a way that you will not find documented in Excel's Help. </p> <p class="MsoNormal"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></p> <p class="MsoNormal"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></p> <h2>Evolving Use of SUMPRODUCT</h2> <p>Within Excel, there are two very useful functions that support conditional counting and summing, namely <span class="name">COUNTIF</span> and <span class="name">SUMIF</span>. Very useful functions, but limited in that they can only evaluate a single test range, and only a single test condition. Multiple conditions are so useful to test ranges (say between two dates), and double tests (one array = A and another = B), and whilst this can be managed using array functions<br /><span class="function">=SUM(IF(test_A,IF(test_B, etc.</span>,<br />this is somewhat unwieldy, and is an array formula. And there is a better way, using <span class="name">SUMPRODUCT</span>.</p> <p>Note that in this section, all formulae given are using the <b>'*'</b> (multiply) operator format, but this in itself is one of the biggest discussion points around the <span class="name">SUMPRODUCT</span> function, one which is discussed <a href="http://www.xldynamic.com/source/xld.SUMPRODUCT.html#format">below</a>.</p> <p>To understand how <span class="name">SUMPRODUCT</span> can be used, first consider the following data.</p> <div align="center"> <table style="" border="1" cellpadding="0"> <tbody><tr> <td style="padding: 0.75pt; width: 22.5pt;" width="30"> <p class="MsoNormal"> </p> </td> <td style="padding: 0.75pt; width: 52.5pt;" width="70"> <p class="MsoNormal">A</p> </td> <td style="padding: 0.75pt; width: 37.5pt;" width="50"> <p class="MsoNormal">B</p> </td> <td style="padding: 0.75pt; width: 60pt;" width="80"> <p class="MsoNormal">C</p> </td> </tr> <tr> <td style="padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">1</p> </td> <td style="padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">Make</p> </td> <td style="padding: 0.75pt; width: 37.5pt;" width="50"> <p class="MsoNormal" style="text-align: center;" align="center">Month</p> </td> <td style="padding: 0.75pt; width: 37.5pt;" width="50"> <p class="MsoNormal" style="text-align: center;" align="center">Price</p> </td> </tr> <tr> <td style="padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">2</p> </td> <td style="padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">Ford</p> </td> <td style="padding: 0.75pt; width: 37.5pt;" width="50"> <p class="MsoNormal" style="text-align: center;" align="center">June</p> </td> <td style="padding: 0.75pt; width: 37.5pt;" width="50"> <p class="MsoNormal" style="text-align: center;" align="center">7,500</p> </td> </tr> <tr> <td style="padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">3</p> </td> <td style="padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">Ford</p> </td> <td style="padding: 0.75pt; width: 37.5pt;" width="50"> <p class="MsoNormal" style="text-align: center;" align="center">June</p> </td> <td style="padding: 0.75pt; width: 37.5pt;" width="50"> <p class="MsoNormal" style="text-align: center;" align="center">8,300</p> </td> </tr> <tr> <td style="padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">4</p> </td> <td style="padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">Ford</p> </td> <td style="padding: 0.75pt; width: 37.5pt;" width="50"> <p class="MsoNormal" style="text-align: center;" align="center">May</p> </td> <td style="padding: 0.75pt; width: 37.5pt;" width="50"> <p class="MsoNormal" style="text-align: center;" align="center">6,873</p> </td> </tr> <tr> <td style="padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">5</p> </td> <td style="padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">Ford</p> </td> <td style="padding: 0.75pt; width: 37.5pt;" width="50"> <p class="MsoNormal" style="text-align: center;" align="center">June</p> </td> <td style="padding: 0.75pt; width: 37.5pt;" width="50"> <p class="MsoNormal" style="text-align: center;" align="center">11,200</p> </td> </tr> <tr> <td style="padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">6</p> </td> <td style="padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">Renault</p> </td> <td style="padding: 0.75pt; width: 37.5pt;" width="50"> <p class="MsoNormal" style="text-align: center;" align="center">June</p> </td> <td style="padding: 0.75pt; width: 37.5pt;" width="50"> <p class="MsoNormal" style="text-align: center;" align="center">13,200</p> </td> </tr> <tr> <td style="padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">7</p> </td> <td style="padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">Renault</p> </td> <td style="padding: 0.75pt; width: 37.5pt;" width="50"> <p class="MsoNormal" style="text-align: center;" align="center">June</p> </td> <td style="padding: 0.75pt; width: 37.5pt;" width="50"> <p class="MsoNormal" style="text-align: center;" align="center">14,999</p> </td> </tr> <tr> <td style="padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">8</p> </td> <td style="padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">BMW</p> </td> <td style="padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">June</p> </td> <td style="padding: 0.75pt; width: 37.5pt;" width="50"> <p class="MsoNormal" style="text-align: center;" align="center">17,500</p> </td> </tr> <tr> <td style="padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">9</p> </td> <td style="padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">BMW</p> </td> <td style="padding: 0.75pt; width: 37.5pt;" width="50"> <p class="MsoNormal" style="text-align: center;" align="center">May</p> </td> <td style="padding: 0.75pt; width: 37.5pt;" width="50"> <p class="MsoNormal" style="text-align: center;" align="center">23,500</p> </td> </tr> <tr> <td style="padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">10</p> </td> <td style="padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">BMW</p> </td> <td style="padding: 0.75pt; width: 37.5pt;" width="50"> <p class="MsoNormal" style="text-align: center;" align="center">June</p> </td> <td style="padding: 0.75pt; width: 37.5pt;" width="50"> <p class="MsoNormal" style="text-align: center;" align="center">18,000</p> </td> </tr> <tr> <td colspan="4" style="padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center"><b>Table 1.</b></p> </td> </tr> </tbody></table> </div> <p>We can easily count the number of Fords with<br /><span class="function">=COUNTIF(A1:A10,"Ford")</span><br />which returns 4.</p> <p>Similalrly, it is straight-forward to get the value of Fords sold, using<br /><span class="function">=SUMIF(A1:A10,"Ford",C1:C10)</span>,<br />which gives 33,873.</p> <p>How do we get a count of how many Fords are sold in June, or the value of them? The number can be calculated with<br /><span class="function">=SUM(IF(A1:A10="Ford",IF(B1:B10="June",1,0),0))</span>,<br />which is an array formula so is committed with Ctrl-Shift-Enter, not just Enter. Similarly, the value is obtained with<br /><span class="function">=SUM(IF(A1:A10="Ford",IF(B1:B10="June",C1:C10,0),0))</span>,<br />also an array formula.</p> <p>But as this page is about <span class="name">SUMPRODUCT</span>, you would expect that we could use that function in this case, and we can. The solution for the number of Fords sold in June using this function is<br /><span class="function">=SUMPRODUCT((A1:A10="Ford")*(B1:B10="June"))</span>.<br />The value is obtained with<br /><span class="function">=SUMPRODUCT((A1:A10="Ford")*(B1:B10="June")*(C1:C10))</span><br />In my view, this formula more readily shows what the objective is.</p> <p>As a further extension of its use, we can use the <b>'+'</b> (plus) operator to count OR conditions, such as how many cars sold were either Fords, or were sold in June. This formula shows how<br /><span class="function">=SUMPRODUCT((A1:A10="Ford")+(B1:B10="June"))</span></p> <p class="MsoNormal"><!--[if gte vml 1]><v:shapetype id="_x0000_t75" coordsize="21600,21600" spt="75" preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"> <v:stroke joinstyle="miter"> <v:formulas> <v:f eqn="if lineDrawn pixelLineWidth 0"> <v:f eqn="sum @0 1 0"> <v:f eqn="sum 0 0 @1"> <v:f eqn="prod @2 1 2"> <v:f eqn="prod @3 21600 pixelWidth"> <v:f eqn="prod @3 21600 pixelHeight"> <v:f eqn="sum @0 0 1"> <v:f eqn="prod @6 1 2"> <v:f eqn="prod @7 21600 pixelWidth"> <v:f eqn="sum @8 21600 0"> <v:f eqn="prod @7 21600 pixelHeight"> <v:f eqn="sum @10 21600 0"> </v:formulas> <v:path extrusionok="f" gradientshapeok="t" connecttype="rect"> <o:lock ext="edit" aspectratio="t"> </v:shapetype><v:shape id="_x0000_i1025" type="#_x0000_t75" alt="" style="'width:57pt;"> <v:imagedata src="file:///C:/WINDOWS/TEMP/msoclip1/02/clip_image001.gif" href="http://www.xldynamic.com/images/misc/note.gif"> </v:shape><![endif]--><!--[if !vml]--><img src="file:///C:/WINDOWS/TEMP/msoclip1/02/clip_image001.gif" shapes="_x0000_i1025" border="0" height="24" width="76" /><!--[endif]--> Although array formulae are mentioned here, they are not explained. For a detailed discussion, see Chip Pearson's <a href="http://www.cpearson.com/excel/array.htm">Array Formulas</a> web page. </p> <p>So far, so good, in that we have a versatile function that can do any number of conditional tests, and has an inbuilt flexibility that provides extensibility. Its power is augmented when combined with other functions, such as can be found in the <a href="http://www.xldynamic.com/source/xld.SUMPRODUCT.html#examples">examples</a> below.</p> <h2>Advantages of SUMPRODUCT</h2> <p>Multiple conditional tests are a major advantage of the <span class="name">SUMPRODUCT</span> function as descibed above, but it has two other considerable advantages. The first is that it can function with closed workbooks, and the second is that the handling of text values can be tailored to the requirement.</p> <p>In the case of another workbook, the <span class="name">SUMIF</span> function can be used to calculate a value, such as in<br /><span class="function">=SUMIF('[Nowfal Rates.xls]RATES'!$K$11:$K$13,">1")</span></p> <p>This is fine in itself, and the value remains if the other workbook is closed, but as soon as the sheet is re-calculated, the formula returns <b>#VALUE</b>. Similarly, if the formula is entered with the other workbook already closed, a <b>#VALUE</b> is immediately returned.</p> <p><span class="name">SUMPRODUCT</span>, however, overcomes this problem. The formula<br /><span class="function">=SUMPRODUCT(--('[Nowfal Rates.xls]RATES'!$K$11:$K$13>1),--('[Nowfal Rates.xls]RATES'!$K$11:$K$13))</span><br />returns the same result, but it will still work when the other workbook is closed and the sheet is re-calculated, and can be initially entered referencing the closed workbook, without a <b>#VALUE</b> error.</p> <p>The second major advantage is being able to handle text in numeric columns differently. Consider the follwoing dataset, as shown in <b>Table 2.</b> </p> <div align="center"> <table style="" border="1" cellpadding="0"> <tbody><tr> <td style="padding: 0.75pt; width: 22.5pt;" width="30"> <p class="MsoNormal"> </p> </td> <td style="padding: 0.75pt; width: 52.5pt;" width="70"> <p class="MsoNormal">A</p> </td> <td style="padding: 0.75pt; width: 37.5pt;" width="50"> <p class="MsoNormal">B</p> </td> </tr> <tr> <td style="padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">1</p> </td> <td style="padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">Item</p> </td> <td style="padding: 0.75pt; width: 37.5pt;" width="50"> <p class="MsoNormal" style="text-align: center;" align="center">Number</p> </td> </tr> <tr> <td style="padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">2</p> </td> <td style="padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">x</p> </td> <td style="padding: 0.75pt; width: 37.5pt;" width="50"> <p class="MsoNormal" style="text-align: center;" align="center">1</p> </td> </tr> <tr> <td style="padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">3</p> </td> <td style="padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">y</p> </td> <td style="padding: 0.75pt; width: 37.5pt;" width="50"> <p class="MsoNormal" style="text-align: center;" align="center">2</p> </td> </tr> <tr> <td style="padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">4</p> </td> <td style="padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">x</p> </td> <td style="padding: 0.75pt; width: 37.5pt;" width="50"> <p class="MsoNormal" style="text-align: center;" align="center">3</p> </td> </tr> <tr> <td colspan="4" style="padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center"><b>Table 2.</b></p> </td> </tr> </tbody></table> </div> <p>If we are looking at rows 1:4. we can see that we have a text value in B1 In this case it is simply a heading row, but the principle applies to a text value in any row.</p> <p>Using <span class="name">SUMPRODUCT</span>, we can either return an error, or ignore the text. This can be useful if we want to ignore errors, or if we want to trap the error (and presumably correct it later).</p> <p>Errors will be returned if we use this version<br /><span class="function">=SUMPRODUCT((A1:A4="x")*(B1:B4))</span></p> <p>To ignore errors, use this amended version which uses the double unary operator (see <a href="http://www.xldynamic.com/source/xld.SUMPRODUCT.html#explain">SUMPRODUCT Explained</a> below for details)<br /><span class="function">=SUMPRODUCT(--(A1:A4="x"),(B1:B4))</span></p> <p>But how does it work?</p> <h2>SUMPRODUCT Explained</h2> <p>To understand how <span class="name">SUMPRODUCT</span> works will help you to determine where to use it, how you can construct your formula, and thus how you can extend it.</p> <p><b>Table 3.</b> below shows an example data set that we will use. In this example, the problem is to find how many Fords with a category of "A" were sold. A9:A20 holds the make, B9:B20 has the category, and C9:C20 has the number sold. The formula to get this result is<br /><span class="function">=SUMPRODUCT((A9:A20="Ford")*(B9:B20="A")*(C9:C20))</span>.</p> <p>The first part of the formula <span class="function">(A9:A20="Ford")</span> checks the array of makes for a value of <b>Ford</b>. This returns an array of TRUE/FALSE, in this case it is<br /><b>{TRUE,FALSE,TRUE,TRUE,TRUE,TRUE,TRUE,FALSE,TRUE,TRUE,TRUE,TRUE}</b></p> <p>Similarly, the categories are checked for the vale <b>A</b> with <span class="function">(B9:B20="A")</span>. Again, this returns an array of TRUE/FALSE, or<br /><b>{FALSE,FALSE,TRUE,TRUE,FALSE,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE}</b></p> <p>And finally, the numbers are not checked but taken as is, that is <span class="function">(C9:C20)</span>, which returns an array of numbers<br /><b>{3,4,2,1,4,3,2,8,6,8,7,6}</b></p> <p>So now we have three arrays, two of TRUE/FALSE values, one of numbers. This is showm in <b>Table 4.</b></p> <p>And this is where it gets interesting. <span class="name">SUMPRODUCT</span> usually works on arrays of numbers, but we have arrays of TRUE/FALSE here as well as an array of numbers. By using the <b>'*'</b> (multiply) operator, we can get numeric values that can be summed. <b>'*'</b> has the effect of coercing these two arrays into a single array of 1/0 values. Multiplying TRUE by TRUE returns 1 (try it, enter <span class="name">=TRUE*TRUE</span> in a cell and see the result), any other combination returns 0. Therefore, when both conditions are satisfied, we get a 1, whereas if any or both conditions are not satisfied, we get a 0. Multiplying the first array of TRUE/FALSE values by the second array of TRUE/FALSE values returns a composite array of 1/0 values, or<br /><b>{0,0,1,1,0,1,1,0,1,1,1,1}</b>.<br />This new array of 1/0 values is then multiplied by the array of numbers sold to give another array of numbers sold that satisfy the two test conditions. <span class="name">SUMPRODUCT</span> then sums the members of this array to give us a count.</p> <p><b>Table 4.</b> below shows the values that the conditional tests break down to before being acted upon by the <b>'*'</b> operator. <b>Table 5.</b> shows a virtual representation of those TRUE/FALSE values as their numerical equivalents of 1/0 and the individual multiplication results. From this, you should be able to see how <span class="name">SUMPRODUCT</span> arrives at its result, namely 35.</p> <table style="border: medium none ;" border="1" cellpadding="0"> <tbody><tr> <td style="border: medium none ; padding: 0.75pt;"> <table style="border: 0.75pt outset ;" border="0" cellpadding="0"> <tbody><tr> <td style="border: 0.75pt inset ; padding: 0.75pt; width: 22.5pt;" width="30"> <p class="MsoNormal"> </p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt; width: 52.5pt;" width="70"> <p class="MsoNormal">A</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt; width: 37.5pt;" width="50"> <p class="MsoNormal">B</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt; width: 37.5pt;" width="50"> <p class="MsoNormal">C</p> </td> </tr> <tr> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">9</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">Ford</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt; width: 37.5pt;" width="50"> <p class="MsoNormal" style="text-align: center;" align="center">B</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt; width: 37.5pt;" width="50"> <p class="MsoNormal" style="text-align: center;" align="center">3</p> </td> </tr> <tr> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">10</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">Vauxhall</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt; width: 37.5pt;" width="50"> <p class="MsoNormal" style="text-align: center;" align="center">C</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt; width: 37.5pt;" width="50"> <p class="MsoNormal" style="text-align: center;" align="center">4</p> </td> </tr> <tr> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">11</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">Ford</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt; width: 37.5pt;" width="50"> <p class="MsoNormal" style="text-align: center;" align="center">A</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt; width: 37.5pt;" width="50"> <p class="MsoNormal" style="text-align: center;" align="center">2</p> </td> </tr> <tr> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">12</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">Ford</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt; width: 37.5pt;" width="50"> <p class="MsoNormal" style="text-align: center;" align="center">A</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt; width: 37.5pt;" width="50"> <p class="MsoNormal" style="text-align: center;" align="center">1</p> </td> </tr> <tr> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">13</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">Ford</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt; width: 37.5pt;" width="50"> <p class="MsoNormal" style="text-align: center;" align="center">D</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt; width: 37.5pt;" width="50"> <p class="MsoNormal" style="text-align: center;" align="center">4</p> </td> </tr> <tr> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">14</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">Ford</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt; width: 37.5pt;" width="50"> <p class="MsoNormal" style="text-align: center;" align="center">A</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt; width: 37.5pt;" width="50"> <p class="MsoNormal" style="text-align: center;" align="center">3</p> </td> </tr> <tr> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">`5</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">Ford</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt; width: 37.5pt;" width="50"> <p class="MsoNormal" style="text-align: center;" align="center">A</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt; width: 37.5pt;" width="50"> <p class="MsoNormal" style="text-align: center;" align="center">2</p> </td> </tr> <tr> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">16</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">Renault</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">A</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt; width: 37.5pt;" width="50"> <p class="MsoNormal" style="text-align: center;" align="center">8</p> </td> </tr> <tr> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">17</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">Ford</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt; width: 37.5pt;" width="50"> <p class="MsoNormal" style="text-align: center;" align="center">A</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt; width: 37.5pt;" width="50"> <p class="MsoNormal" style="text-align: center;" align="center">6</p> </td> </tr> <tr> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">18</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">Ford</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt; width: 37.5pt;" width="50"> <p class="MsoNormal" style="text-align: center;" align="center">A</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt; width: 37.5pt;" width="50"> <p class="MsoNormal" style="text-align: center;" align="center">8</p> </td> </tr> <tr> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">19</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">Ford</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt; width: 37.5pt;" width="50"> <p class="MsoNormal" style="text-align: center;" align="center">A</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt; width: 37.5pt;" width="50"> <p class="MsoNormal" style="text-align: center;" align="center">7</p> </td> </tr> <tr> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">20</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">Ford</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt; width: 37.5pt;" width="50"> <p class="MsoNormal" style="text-align: center;" align="center">A</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt; width: 37.5pt;" width="50"> <p class="MsoNormal" style="text-align: center;" align="center">6</p> </td> </tr> <tr> <td colspan="4" style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center"><b>Table 3.</b></p> </td> </tr> </tbody></table> <p> </p> </td> <td style="border: medium none ; padding: 0.75pt;"> <p class="MsoNormal"> </p> </td> <td style="border: medium none ; padding: 0.75pt;"> <div align="center"> <table style="border: 0.75pt outset ;" border="0" cellpadding="0"> <tbody><tr> <td style="border: 0.75pt inset ; padding: 0.75pt; width: 22.5pt;" width="30"> <p class="MsoNormal" style="text-align: center;" align="center"> </p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt; width: 37.5pt;" width="50"> <p class="MsoNormal" style="text-align: center;" align="center">A</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt; width: 15pt;" width="20"> <p class="MsoNormal" style="text-align: center;" align="center"> </p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt; width: 37.5pt;" width="50"> <p class="MsoNormal" style="text-align: center;" align="center">B</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt; width: 15pt;" width="20"> <p class="MsoNormal" style="text-align: center;" align="center"> </p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt; width: 37.5pt;" width="50"> <p class="MsoNormal" style="text-align: center;" align="center">C</p> </td> </tr> <tr> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">9</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">TRUE</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">*</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">FALSE</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">*</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">3</p> </td> </tr> <tr> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">10</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">FALSE</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">*</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">FALSE</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">*</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">4</p> </td> </tr> <tr> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">11</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">TRUE</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">*</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">TRUE</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">*</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">2</p> </td> </tr> <tr> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">12</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">TRUE</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">*</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">TRUE</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">*</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">1</p> </td> </tr> <tr> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">13</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">TRUE</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">*</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">FALSE</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">*</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">4</p> </td> </tr> <tr> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">14</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">TRUE</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">*</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">TRUE</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">*</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">3</p> </td> </tr> <tr> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">15</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">TRUE</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">*</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">TRUE</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">*</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">2</p> </td> </tr> <tr> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">16</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">FALSE</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">*</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">TRUE</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">*</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">8</p> </td> </tr> <tr> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">17</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">TRUE</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">*</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">TRUE</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">*</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">6</p> </td> </tr> <tr> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">18</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">TRUE</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">*</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">TRUE</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">*</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">8</p> </td> </tr> <tr> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">19</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">TRUE</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">*</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">TRUE</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">*</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">7</p> </td> </tr> <tr> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">20</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">TRUE</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">*</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">TRUE</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">*</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">6</p> </td> </tr> <tr> <td colspan="6" style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center"><b>Table 4.</b></p> </td> </tr> </tbody></table> </div> <p> </p> </td> <td style="border: medium none ; padding: 0.75pt;"> <p class="MsoNormal"> </p> </td> <td style="border: medium none ; padding: 0.75pt;" valign="top"> <table style="border: 0.75pt outset ;" border="0" cellpadding="0"> <tbody><tr> <td style="border: 0.75pt inset ; padding: 0.75pt; width: 22.5pt;" width="30"> <p class="MsoNormal" style="text-align: center;" align="center"> </p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt; width: 37.5pt;" width="50"> <p class="MsoNormal" style="text-align: center;" align="center">A</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt; width: 15pt;" width="20"> <p class="MsoNormal" style="text-align: center;" align="center"> </p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt; width: 37.5pt;" width="50"> <p class="MsoNormal" style="text-align: center;" align="center">B</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt; width: 15pt;" width="20"> <p class="MsoNormal" style="text-align: center;" align="center"> </p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt; width: 37.5pt;" width="50"> <p class="MsoNormal" style="text-align: center;" align="center">C</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center"> </p> </td> </tr> <tr> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">9</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">1</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">*</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">0</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">*</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">3</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">0</p> </td> </tr> <tr> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">10</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">0</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">*</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">0</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">*</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">4</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">0</p> </td> </tr> <tr> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">11</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">1</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">*</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">1</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">*</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">2</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">2</p> </td> </tr> <tr> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">12</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">1</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">*</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">1</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">*</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">1</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">1</p> </td> </tr> <tr> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">13</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">1</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">*</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">0</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">*</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">4</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">0</p> </td> </tr> <tr> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">14</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">1</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">*</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">1</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">*</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">3</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">3</p> </td> </tr> <tr> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">15</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">1</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">*</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">1</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">*</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">2</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">2</p> </td> </tr> <tr> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">16</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">0</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">*</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">1</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">*</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">8</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">0</p> </td> </tr> <tr> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">17</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">1</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">*</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">1</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">*</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">6</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">6</p> </td> </tr> <tr> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">18</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">1</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">*</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">1</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">*</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">8</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">8</p> </td> </tr> <tr> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">19</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">1</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">*</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">1</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">*</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">7</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">7</p> </td> </tr> <tr> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">20</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">1</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">*</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">1</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">*</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">6</p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center">6</p> </td> </tr> <tr> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></p> </td> <td style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center"><b>35</b></p> </td> </tr> <tr> <td colspan="7" style="border: 0.75pt inset ; padding: 0.75pt;"> <p class="MsoNormal" style="text-align: center;" align="center"><b>Table 5.</b></p> </td> </tr> </tbody></table> <p class="MsoNormal"><o:p></o:p></p> </td> </tr> </tbody></table> <p><b>Table 6.</b> below shows you the same virtual representation of 1/0 numerical values without the numbers sold column, that is using <span class="name">SUMPRODUCT</span> to count the number of rows satisfying the two conditions, or<br /><span class="function">=SUMPRODUCT((A9:A20=A1)*(B9:B20="A"))</span></p><div class="blogger-post-footer">http://xlmaster.blogspot.com</div>Bang Adihttp://www.blogger.com/profile/07414156117073688979noreply@blogger.com0tag:blogger.com,1999:blog-5479364237934442653.post-5377228140265475872007-03-02T13:42:00.000+07:002007-03-02T13:51:43.411+07:00ARRAY FUNCTIONS<p style="text-align: justify;">An array is simply a series of data, which in a spreadsheet is normally stored in a range of adjacent cells. Excel however can do special things with arrays that may be used as a flexible alternative to the database functions such as DSUM.</p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.meadinkent.co.uk/xlarrays.gif"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px;" src="http://www.meadinkent.co.uk/xlarrays.gif" alt="" border="0" /></a> <p style="text-align: justify;">Many functions such as SUM or MAX can be combined with the IF function using arrays. This means that the sum or average function will be performed on only those items that meet a criteria. In other words, the values supplied as an argument to the sum function are conditional upon a value in an another column or location. The following example should give you an insight as to the potential uses of array functions.</p> A table of values (E5:G12) can be interrogated using the criteria values entered into cells F14 and H14 in order to extract summary information. The first query (in cell G16) returns the total number of items processed by operator 'AK' throughout the whole table. The second (G17) gives the highest number of items processed on a day in April (month 4). <p class="MsoNormal" style="text-align: justify;"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></p><span style=";font-family:";font-size:12;" >{=SUM(IF(G6:G12=$H$14, F6:F12, 0))}</span><br />Sum values in F6:F12 where corresponding values in G6:G12 are equal to H14<br /><br /><span style=";font-family:";font-size:12;" >{=MAX(IF(MONTH(E6:E12)=F14, F6:F12, 0))}<br /></span><span style=";font-family:";font-size:12;" >The maximum value in F6:F12 where the corresponding month in E6:E12 equals F14</span><br /><p style="text-align: justify;">Both of these are Array formulae - this is evidenced by the curly brackets {braces}. When you enter an array formula there are <b><span style="color:red;">three rules</span></b> you must follow:</p> <p class="adv" style="text-align: justify;">Would you like to learn more?</p> <ul type="disc"><li class="MsoNormal" style="text-align: justify;">Instead of typing <enter> to place the function in a cell, you must type <b><ctrl> + <shift> + <enter></enter></shift></ctrl></b>. If you don't do so, the formulae probably won't make sense and will cause an error.</enter></li><li class="MsoNormal" style="text-align: justify;">You can not type the Braces {}. They are entered automatically with the above key combination.</li><li class="MsoNormal" style="text-align: justify;">The array ranges (for the criteria and the values) must be the same size (ie the same number of rows) although they need not be in adjacent columns.</li></ul> <p style="text-align: justify;">These array functions can be used in a range of situations where the criterion ranges required by database functions (eg DSUM) would be unwieldy. In other situations the SUMIF or COUNTIF functions may be better still.</p> <p style="text-align: justify;">A peculiar use of an array function is to add up a range of numbers which have been entered as text. If a range of numeric values have been converted and formatted using the TEXT function they can no longer be added using the SUM function. The following formula however should do the trick <span style="color:purple;">{= SUM(VALUE(range_of_cells)) }</span>. Remember to use <ctrl> + <shift> + <enter>. In normal use the VALUE function converts a single text number into a numeric value.</enter></shift></ctrl></p> <p style="text-align: justify;">The array functions are limited to applying a single criteria range against each calculation. This can be limiting if you want to add up all of the items processed by operator AK during April. Another function called <a href="http://www.meadinkent.co.uk/xlsumproduct.htm">SUMPRODUCT</a> can overcome this limitation.</p><div class="blogger-post-footer">http://xlmaster.blogspot.com</div>Bang Adihttp://www.blogger.com/profile/07414156117073688979noreply@blogger.com0tag:blogger.com,1999:blog-5479364237934442653.post-59358988118726255742007-02-16T10:25:00.000+07:002007-02-16T10:45:54.903+07:00Tips on entering dates and times<div align="justify"><span style="font-weight: bold;">Dates and times</span> are numbers Microsoft Excel treats dates and times as numbers. The way that a time or date is displayed on a worksheet depends on the number format applied to the cell. When you type a date or time that Excel recognizes, the cell's format changes from the General number format to a built-in date or time format. By default, dates and times are right-aligned in a cell. If Excel cannot recognize the date or time format, the date or time is entered as text, which is left-aligned in the cell.<br /><br /><span style="font-weight: bold;">Control Panel </span>Options you select in the Regional Settings of Control Panel determine the default format for the current date and time and the characters recognized as date and time separators — for example, the slash (/) and dash (-) for dates and the colon (:) for times on United States-based systems.<br /><br /><span style="font-weight: bold;">Use a 4-digit year</span> When entering dates such as Decemeber 01, Excel matches the day first and then the year. For instance, December 01 is entered as December 1 of the present year, not as December of the year 2001.<br /><br /><span style="font-weight: bold;">Entering dates and times together</span> To type a date and time in the same cell, separate the date and time with a space.<br /><br /><span style="font-weight: bold;">The 12-hour or 24-hour clock</span> To type a time based on the 12-hour clock, type a space followed by AM or PM (or A or P) after the time. Otherwise, Excel bases the time on the 24-hour clock. For example, if you type 3:00 instead of 3:00 PM, the time is stored as 3:00 AM.<br /><br /><span style="font-weight: bold;">Viewing the serial number behind a date or time</span> Regardless of the format used to display a date or time, Excel stores all dates as serial numbers and stores all times as decimal fractions. To display a date as a serial number or display a time as a fraction, select the cells that contain the date or time. On the Format menu, click Cells, click the Number tab, and then click General in the Category box.<br /><br /><span style="font-weight: bold;">Calculating with dates and times</span> Times and dates can be added, subtracted, and included in other calculations. To use a date or time in a formula, enter the date or time as text enclosed in quotation marks. For example, the following formula would display a difference of 68:<br /><br /> ="5/12/2004"-"3/5/2004"<br /><br /><span style="font-weight: bold;">The 1904 date system</span> In Excel for Windows (and Lotus 1-2-3), days are numbered from the beginning of the century; the date serial number 1 corresponds to the date January 1, 1900. Excel for the Macintosh uses the 1904 date system; the date serial number 1 corresponds to January 2, 1904. To change the date system for use in calculations, click Options on the Tools menu, and then click the Calculation tab. Under Workbook options, select the 1904 date system check box. Use the 1904 date system for a workbook if you use that workbook with other workbooks that use the 1904 date system.<br /><br />If you open in Excel for Windows a file created in Excel version 2.0 or later for the Macintosh, Excel recognizes the file format and automatically changes dates to the 1900 date system. Similarly, if you open an Excel for Windows file on a Macintosh, Excel changes dates to the 1904 date system.<br /></div><div class="blogger-post-footer">http://xlmaster.blogspot.com</div>Bang Adihttp://www.blogger.com/profile/07414156117073688979noreply@blogger.com0tag:blogger.com,1999:blog-5479364237934442653.post-82723232069720535512007-02-16T10:13:00.000+07:002007-02-16T10:22:44.945+07:00DATEDIF Functions<div align="justify"><a name="RANGE!B2">DATEDIF worksheet function</a><br /><br />Calculates the number of days, months, or years between two dates. This function is provided for compatibility with Lotus 1-2-3.<br /><br />Syntax :<br />DATEDIF(start_date,end_date,unit)<br /><br />Start_date is a date that represents the first, or starting, date of the period. Dates may be entered as text strings within quotation marks (for example, "2001/1/30"), as serial numbers (for example, 36921, which represents January 30, 2001, if you're using the 1900 date system), or as the results of other formulas or functions (for example, DATEVALUE("2001/1/30")).<br /><a href="file:///A:/inbox2007_01-12/mk:@MSITStore:C:/Program%20Files/Microsoft%20Office/Office/1033/xlmain9.chm::/html/xlfctNOW.htm"> For more information about date serial numbers, see NOW.</a><br /><br />End_date is a date that represents the last, or ending, date of the period.<br />Unit is the type of information you want returned.<br />Unit Returns<br />"Y" The number of complete years in the period.<br />"M" The number of complete months in the period.<br />"D" The number of days in the period.<br />"MD" The difference between the days in start_date and end_date. The months and years of the dates are ignored.<br />"YM" The difference between the months in start_date and end_date. The days and years of the dates are ignored.<br />"YD" The difference between the days of start_date and end_date. The years of the dates are ignored.<br /><br />Remarks :<br /><br />Microsoft Excel stores dates as sequential serial numbers so that it can perform calculations on them. Excel stores January 1, 1900, as serial number 1 if your workbook uses the 1900 date system. If your workbook uses the 1904 date system, Excel stores January 1, 1904, as serial number 0 (January 2, 1904, is serial number 1). For example, in the 1900 date system, Excel stores January 1, 1998, as serial number 35796 because it is 35,795 days after January 1, 1900.<br /><a href="javascript:hhobj_2.Click()">Learn more about how Microsoft Excel stores dates and times.</a><br /><a href="file:///A:/inbox2007_01-12/mk:@MSITStore:C:/Program%20Files/Microsoft%20Office/Office/1033/xlmain9.chm::/html/xlfctNOW.htm">Excel for Windows and Excel for the Macintosh use different date systems as their default.</a><br /><a href="file:///A:/inbox2007_01-12/mk:@MSITStore:C:/Program%20Files/Microsoft%20Office/Office/1033/xlmain9.chm::/html/xlfctNOW.htm">For more information, see NOW.</a><br /><br />Examples :<br /><br />DATEDIF("2001/1/1","2003/1/1","Y") equals 2, or two complete years in the period.<br /><br />DATEDIF("2001/6/1","2002/8/15","D") equals 440, or 440 days between June 1, 2001, and August 15, 2002.<br /><br />DATEDIF("2001/6/1","2002/8/15","YD") equals 75, or 75 days between June 1 and August 15, ignoring the years of the dates.<br /><br />DATEDIF("2001/6/1","2002/8/15","MD") equals 14, or the difference between 1 and 15 — the day of start_date and the day of end_date — ignoring the months and the years of the dates.<br /> </div><div class="blogger-post-footer">http://xlmaster.blogspot.com</div>Bang Adihttp://www.blogger.com/profile/07414156117073688979noreply@blogger.com0tag:blogger.com,1999:blog-5479364237934442653.post-5640133757310925092007-02-09T14:36:00.000+07:002007-02-16T10:48:34.442+07:00Excel Basics<div style="text-align: justify;"><a href="http://xlmaster.blogspot.com/2006/08/excel-basics.html">Excel Basics</a>: "Just before getting started, a quick look at the essential constituents of Excel to have a basic understanding of what does what.Worksheet Menu Bar<br /><br /><span style="font-weight: bold;">The Worksheet Menu Bar</span> is the basic navigation tool of Excel. This is a single menu from which all the Excel options could be activated. You can control the whole of Excel with this bar. Clicking on each menu item triggers an action or an another menu, which is a sub-menu of the original menu. You could see an Excel icon(a small picture) on the left of the worksheet menu bar from which you can do a few things(Try it out). On the right side is the help box. If you have any doubts, you could type here to find it out. On the extreme right is the minimize,maximize and close buttons. You could also find a few buttons in the bar which you would not notice<br />when you excel. This is due to customization which you would learn later.<br /><br /><span style="font-weight: bold;">Toolbars</span><br />Toolbars are nothing but shortcuts of Worksheet Menu Bar. If you want excel to perform an action, you should navigate through the worksheet menu bar. Location a button in t"<br /><a href="http://technorati.com/claim/etqqzubzh" rel="me">Technorati Profile</a></div><div class="blogger-post-footer">http://xlmaster.blogspot.com</div>Bang Adihttp://www.blogger.com/profile/07414156117073688979noreply@blogger.com0tag:blogger.com,1999:blog-5479364237934442653.post-49892530784390339812007-02-08T19:01:00.001+07:002007-02-16T13:36:20.909+07:00Getting Started with Ms. Excel<div style="text-align: justify;">This section deals with the basic ingredients of excel.<br />When you open Microsoft Excel, you would have see a view similar to the picture given below<br /><img style="" src="http://photos1.blogger.com/blogger/1426/3428/400/excel.jpg" alt="" border="0" /><br />These are the essential ingredients of Microsoft Excel and we can see them in detail<br /><br /><span style="font-weight: bold;">Title Bar</span><br />The title shows the file you are working with.Normally when you open Excel, Excel automatically opens a new workbook by the name Book 1<br /><span style="font-weight: bold;">Worksheet Menu Bar</span><br /><img alt="worksheet menu bar" src="http://photos1.blogger.com/blogger/1426/3428/1600/worksheet.0.gif" height="19" width="730" /><br />This menu contains all excel commands available to work with.<br /><span style="font-weight: bold;">Help</span><br />As the name suggests, you could use this bar to get instant help<br /><span style="font-weight: bold;">Toolbars</span><br /><img alt="excel toolbars" src="http://photos1.blogger.com/blogger/1426/3428/1600/toolbar.0.gif" height="50" width="737" /><br />Just like the worksheet menu bar, the toolbars contain excel commands.There a lot of toolbars available in Excel and you could even create and customize them. The difference between Worksheet Menu Bar and toolbar is that toolbars contain commands that could be activated directly when clicked while you should naviagate through the worksheet menu bar to activate commands.In simple words, toolbars are shortcuts to commands available in worksheet menu bar.<br /><span style="font-weight: bold;">Formula Bar</span><br /><img alt="Formula bar" src="http://photos1.blogger.com/blogger/1426/3428/1600/formula%20bar.0.gif" /><br />This bar is extremely useful when working with formulas.This bar shows the content of the cell that is selected<br /><span style="font-weight: bold;">Status Bar</span><br /><img src="http://photos1.blogger.com/blogger/1426/3428/1600/status%20bar.0.gif" alt="Status bar" /><br />As the name suggests, this bar shows the status of Microsoft Excel.You could see this bar would provide with meaningful message if you do something in Excel.You could always see the word <span style="font-weight: bold;">Ready</span> when you start Excel.This indicates that excel is ready to work on.Likewise the status bar provides you direction when working<br /><span style="font-weight: bold;">Research Pane</span><br />Similar to the help bar, you could use this pane to get more detailed help.It is really useful for beginners as it shows a list of recently opened files.<br /><span style="font-weight: bold;">Scroll Bars</span><br />The two scroll bars, horizontal and vertical helps you in navigating through the worksheet<br /><span style="font-weight: bold;">Sheet Tabs</span><br />These tabs helps you in navigating through different worksheets in the workbook<br /><span style="font-weight: bold;">Rows,Columns and Cells</span><br /><img style="width: 646px; height: 389px;" alt="workbook" src="http://photos1.blogger.com/blogger/1426/3428/1600/workbook.0.gif" /><br />By far the most common terminology used in Excel is that of Rows, Columns and Cells<br />In Excel, rows and columns means the same as used in general. There are 65536 rows starting from 1 and 256 columns starting from A in Microsoft Excel 2003. Rows are horizontal and columns are vertical. The numbers 1,2,3 upto 65536 are called row headers. Similarly the letters A,B,C upto IV are called column headers.Cell is the singlemost part that can be referred to in Excel. Cell is also refererred as activecell(activecell refers to the cell currently selected).<br />Each cell has an identity and it is referenced using that identity.The identity is the row and cell in which it is intersected. For example if you select a cell in the first row corresponding to the first column, then the identity of the cell is <span style="font-weight: bold;">A1</span>.This is referred to as the <span style="font-weight: bold;">address of the cell</span>.<br />To know the address of the cell, just consider Excel a big graph with no negative coordinates. Just like in the graph, where x and y coordinates meet at a point, similar is the case in Excel. Thus a cell in the third row and the sixth column has a cell address of F3, one in the tenth row and the eight column has an address of H10 and so on.Whenever you select a cell the corresponding row and column headers are highlighted. Thus if you select the cell B7 then the row header 7 and the column header B are highlighted in a different color(usually orange). If you have any trouble about the address of the cell, you can simply check it out in the box to the left of formula bar.But knowing its basics is necessary to use it in formulas.<br /><span style="font-weight: bold;">Range</span><br />When you select a single area in Excel, it is called cell. When you select more than a cell then it is called Range.Normally you would select a range by using the <span style="font-size:130%;"><span style="font-weight: bold;">colon:</span></span> symbol.Thus if you want to select 10 rows and 10 columns at once, then you first cell would be A1(first row,first column) and your last cell would be J10(tenth row,tenth column). This would be specified in excel as A1:J10. You would learn a lot about this under the head Functions.<br /><span style="font-weight: bold;">Worksheet,Workbook and Workspace</span><br />These terms are also popular in Excel. If you open Excel you would always see a workbook called Book1. <span style="font-weight: bold;">Workbook is a </span><a target="_blank" style="font-weight: bold;" href="http://en.wikipedia.org/wiki/File_%28computing%29">file</a><span style="font-weight: bold;"> containing the </span><a target="_blank" style="font-weight: bold;" href="http://www.google.com/search?q=define:data">data</a><span style="font-weight: bold;"> entered by you.</span> It is just like a file where you keep your papers. Workbook is sometimes referred to as active workbook(active workbook actually refers the workbook you are currently working with).<br /><span style="font-weight: bold;">Worksheets are separate sheets inside the workbook</span>. Just like a file has different papers in it, a workbook has different worksheets in it. You could navigate through the worksheets using the sheet tabs. You can have upto 255 worksheets in a workbook.<br /><span style="font-weight: bold;">Workspace is a collection of workbooks.</span> Just think it of a file holder holding different files. For example you could be working on a sales forecast for which you would have files from different sales departments. You could save these files as a workspace so that whenever you open a file you could open all the related workbooks.This saves you time from searching and opening different workbooks.</div><div class="blogger-post-footer">http://xlmaster.blogspot.com</div>Bang Adihttp://www.blogger.com/profile/07414156117073688979noreply@blogger.com0