Excel DSS Functions
Excel DSS Functions
Decision Support Systems (DSS) are computer programs used to help managers solve complex
business problems. DSS programs are commonly found in large, integrated packages called
enterprise resource planning software that provide information services to an organization.
Software packages such as SAP, Microsoft Dynamics offer sophisticated DSS capabilities.
However, many business problems can be modeled for solutions using less complex tools such as
Visual Basic, Access, and Microsoft Excel.
Excel IF Function
The IF function can perform a logical test and return one value for a TRUE result, and another
for a FALSE result. For example, to "pass" scores above 70: =IF(A1>70,"Pass","Fail"). More
than one condition can be tested by nesting IF functions. The IF function can be combined with
logical functions like AND and OR.
Purpose
Test for a specific condition
Return value
The values you supply for TRUE or FALSE
Syntax
=IF (logical_test, [value_if_true], [value_if_false])
Arguments
Usage notes
Use the IF function to test for or evaluate certain conditions, and then react differently depending
on whether the test was TRUE or FALSE.
For example, let's say you want to assign either "Pass" or "Fail" to students based on a test score.
In that case, you need to test the sore itself (for each student) and then return either "Pass" or
"Fail".
If you had a score in cell C6, and you wanted to test this score to see if is at least 70, you would
use this:
=C6>=70
1|Page
This translates as "C6 contains a value greater than or equal to 70". It will either be TRUE or
FALSE, depending on the value in C6. You then supply a value that the IF function should return
if the test is TRUE, and a value to use if the test is FALSE.
This is the formula that appears D6 in the example shown. When it is copied down the column, it
will test every score and return the correct result.
Nested IF statements
You may here the term "Nested IF" or "Nested IF statement". This refers to using more than one
IF function so that you can test for more conditions and return more possible results. Each IF
statement needs to be carefully "nested" inside another so that the logic is correct.
For example, the following formula can be used to assign an grade rather than a pass / fail result:
=IF(C6<70,"F",IF(C6<75,"D",IF(C6<85,"C",IF(C6<95,"B","A"))))
2|Page
COUNTIF Function
Summary
COUNTIF is a function to count cells that meet a single criteria. COUNTIF can be used to count
cells with dates, numbers, and text that match specific criteria. The COUNTIF function supports
logical operators (>,<,<>,=) and wildcards (*,?) for partial matching.
Purpose
Count cells that match criteria
Return value
A number representing cells counted.
Syntax
=COUNTIF (range, criteria)
Arguments
Usage notes
The COUNTIF function in Excel counts the number of cells in a range that match the supplied
criteria
Non-numeric criteria needs to be enclosed in double quotes but numeric criteria does not:
3|Page
The wildcard characters ?and * can be used in criteria. A question mark matches any one
character and an asterisk matches any sequence of characters.
To find a literal question mark or asterisk, use a tilde (~) in front question mark or asterisk (i.e.
~?, ~*).
SUMIF Function
Summary
SUMIF is a function to sum cells that meet a single criteria. SUMIF can be used to sum cells
based on dates, numbers, and text that match specific criteria. SUMIF supports logical operators
(>,<,<>,=) and wildcards (*,?) for partial matching.
Purpose
Sum numbers in a range that meet supplied criteria
Return value
The sum of values supplied.
Syntax
=SUMIF (range, criteria, [sum_range])
Arguments
range - The range of cells that you want to apply the criteria against.
sum_range - [optional] The cells to add together. If sum_range is omitted, the cells in
range are added together instead.
4|Page
Usage notes
Text criteria, or criteria that includes math symbols, must be enclosed in double quotation
marks (").
The wildcard characters ?and * can be used in criteria. A question mark matches any one
character and an asterisk matches any sequence of characters.
To find a literal question mark or asterisk, use a tilde (~) in front question mark or
asterisk (i.e. ~?, ~*).
Conditional formatting
Conditional formatting is a fantastic way to quickly visualize data in a spreadsheet. With
conditional formatting, you can do things like highlight dates in the next 30 days, flag data entry
problems, highlight rows that contain top customers, show duplicates, and more.
Excel ships with a large number of "presets" that make it easy to create new rules without
formulas. However, you can also create rules with your own custom formulas. By using your
own formula, you take over the condition that triggers a rule, and can apply exactly the logic you
need. Formulas give you maximum power and flexibility.
For example, using the "Equal to" preset, it's easy to highlight cells equal to "apple".
But what if you want to highlight cells equal to "apple" or "kiwi" or "lime"? Sure, you can create
a rule for each value, but that's a lot of trouble. Instead, you can simply use one rule based on a
formula with the OR function:
Here's the result of the rule applied to the range B4:F8 in this spreadsheet:
5|Page
Here's the exact formula used:
=OR(B4="apple",B4="kiwi",B4="lime")
Quick start
You can create a formula-based conditional formatting rule in four easy steps:
6|Page
3. Enter a formula that returns TRUE or FALSE.
7|Page
The ISODD function only returns TRUE for odd numbers, triggering the rule:
Formula logic
Formulas that apply conditional formatting must return TRUE or FALSE, or numeric
equivalents. Here are some examples:
=ISODD(A1)
=ISNUMBER(A1)
=A1>100
=AND(A1>100,B1<50)
=OR(F1="MN",F1="WI")
The above formulas all return TRUE or FALSE, so they work perfectly as a trigger for
conditional formatting.
When conditional formatting is applied to a range of cells, enter cell references with respect to
the first row and column in the selection (i.e. the upper left cell). The trick to understanding how
conditional formatting formulas work is to visualize the same formula being applied to each cell
8|Page
in the selection, with cell references updated as usual. Imagine that you entered the formula in
the upper left cell of the selection, and then copied the formula across the entire selection
Formula Examples
Below are examples of custom formulas you can use to apply conditional formatting. Some of
these examples can be created using Excel's built-in presets for highlighting cells, but custom
formulas can go far beyond presets, as you can see below.
To highlight rows that represent orders from Texas (abbreviated TX), use a formula that locks the
reference to column F:
=$F5="TX"
Filtering Data
Introduction
Filters can be used to narrow down the data in your worksheet and hide parts of it from view.
While it may sound a little like grouping, filtering is different because it allows you to qualify
9|Page
and display only the data that interests you. For example, you could filter a list of survey
participants to view only those who are between the ages of 25 and 34. You could also filter an
inventory of paint colors to view anything that contains the word blue, such as bluebell or
robin's egg blue.
In this lesson, you'll learn how to filter the data in your worksheet to display only the
information you need.
Filtering data
Filters can be applied in different ways to improve the performance of your worksheet. You can
filter text, dates, and numbers. You can even use more than one filter to further narrow your
results.
To filter data:
In this example, we'll filter the contents of an equipment log at a technology company. We'll
display only the laptops and projectors that are available for checkout.
1. Begin with a worksheet that identifies each column using a header row.
2. Select the Data tab, then locate the Sort & Filter group.
10 | P a g e
4. Drop-down arrows will appear in the header of each column.
5. Click the drop-down arrow for the column you want to filter. In this example, we'll filter the Type
column to view only certain types of equipment.
7. Uncheck the boxes next to the data you don't want to view, or uncheck the box next to Select All
to quickly uncheck all.
8. Check the boxes next to the data you do want to view. In this example, we'll check Laptop and
Projector to view only these types of equipment.
11 | P a g e
9. Click OK. All other data will be filtered, or temporarily hidden. Only laptops and projectors will
be visible.
12 | P a g e
13 | P a g e