unit 2 data analytics

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 19

Seven Basic Excel Formulas For Your Workflow

Since you’re now able to insert your preferred formulas and function correctly, let’s check some
fundamental Excel functions to get you started.

1. SUM

The SUM function is the first must-know formula in Excel. It usually aggregates values from a
selection of columns or rows from your selected range.

=SUM(number1, [number2], …)

Example:

=SUM(B2:G2) – A simple selection that sums the values of a row.

=SUM(A2:A8) – A simple selection that sums the values of a column.

=SUM(A2:A7, A9, A12:A15) – A sophisticated collection that sums values from range A2 to
A7, skips A8, adds A9, jumps A10 and A11, then finally adds from A12 to A15.

=SUM(A2:A8)/20 – Shows you can also turn your function into a formula.
2. AVERAGE

The AVERAGE function should remind you of simple averages of data, such as the average
number of shareholders in a given shareholding pool.

=AVERAGE(number1, [number2], …)

Example:

=AVERAGE(B2:B11) – Shows a simple average, also similar to (SUM(B2:B11)/10)


3. COUNT

The COUNT function counts all cells in a given range that contain only numeric values.

=COUNT(value1, [value2], …)

Example:

COUNT(A:A) – Counts all values that are numerical in A column. However, you must adjust
the range inside the formula to count rows.

COUNT(A1:C1) – Now it can count rows.


4. COUNTA

Like the COUNT function, COUNTA counts all cells in a given rage. However, it counts all
cells regardless of type. That is, unlike COUNT that only counts numerics, it also counts dates,
times, strings, logical values, errors, empty string, or text.

=COUNTA(value1, [value2], …)

Example:

COUNTA(C2:C13) – Counts rows 2 to 13 in column C regardless of type. However, like


COUNT, you can’t use the same formula to count rows. You must make an adjustment to the
selection inside the brackets – for example, COUNTA(C2:H2) will count columns C to H
5. IF

The IF function is often used when you want to sort your data according to a given logic. The
best part of the IF formula is that you can embed formulas and functions in it.

=IF(logical_test, [value_if_true], [value_if_false])

Example:

=IF(C2<D3,“TRUE”,”FALSE”) – Checks if the value at C3 is less than the value at D3. If the
logic is true, let the cell value be TRUE, otherwise, FALSE

=IF(SUM(C1:C10) > SUM(D1:D10), SUM(C1:C10), SUM(D1:D10)) – An example of a


complex IF statement. First, it sums C1 to C10 and D1 to D10, then it compares the sum. If the
sum of C1 to C10 is greater than the sum of D1 to D10, then it makes the value of a cell equal to
the sum of C1 to C10.
6. TRIM

The TRIM function makes sure your functions do not return errors due to extra spaces in your
data. It ensures that all empty spaces are eliminated. Unlike other functions that can operate on a
range of cells, TRIM only operates on a single cell. Therefore, it comes with the downside of
adding duplicated data to your spreadsheet.

=TRIM(text)

Example:

TRIM(A2) – Removes empty spaces in the value in cell A2.


7. MAX & MIN

The MAX and MIN functions help in finding the maximum number and the minimum number in
a range of values.

=MIN(number1, [number2], …)

Example:

=MIN(B2:C11) – Finds the minimum number between column B from B2 and column C from
C2 to row 11 in both columns B and C.

=MAX(number1, [number2], …)

Example:
=MAX(B2:C11) – Similarly, it finds the maximum number between column B from B2 and
column C from C2 to row 11 in both columns B and C.
More Resour
Use cell references
in a formula
When you create a simple formula or a formula by that
uses a function, you can refer to data in worksheet cells
by including cell references in the formula arguments.
For example, when you enter or select the cell
reference A2, the formula uses the value of that cell to
calculate the result. You can also reference a range of
cells.

For more information about cell references, see Create


or change a cell reference. For more information about
formulas in general, see Overview of formulas.

1. Click the cell in which you want to enter the formula.

2. In the formula bar , type = (equal sign).


3. Do one of the following, select the cell that contains
the value you want or type its cell reference.
You can refer to a single cell, a range of cells, a
location in another worksheet, or a location in
another workbook.

When selecting a range of cells, you can drag the


border of the cell selection to move the selection, or
drag the corner of the border to expand the
selection.

1. The first cell reference is B3, the color is blue, and


the cell range has a blue border with square corners.

2. The second cell reference is C3, the color is green,


and the cell range has a green border with square
corners.
Note: If there is no square corner on a color-coded border, the reference is to a named range.

4. Press Enter.
Insert a formula in a table cell
1. Select the table cell where you want your result. If the
cell is not empty, delete its contents.
2. On the Table Tools, Layout tab, in the Data group,
click Formula.
3. Use the Formula dialog box to create your formula.
You can type in the Formula box, select a number
format from the Number Format list, and paste in
functions and bookmarks using the Paste
Function and Paste Bookmark lists.

Update formula results


In Word, the result of a formula is calculated when it is
inserted, and when the document containing the
formula opens. In Outlook, the result of a formula is
only calculated when it is inserted and won't be
available for the recipient of the email to edit.

You can also manually update:

 The result of one or more specific formulas


 The results of all formulas in a specific table
 All the field codes in a document, including formulas
Formulas in Tables

1. Select the table cell where you want your result. If the
cell is not empty, delete its contents.
2. On the Table Tools, Layout tab, in the Data group,
click Formula.
3. In the Formula dialog box, do one of the following:

To add the numbers… Type this in


the Formula box
Above the cell =SUM(ABOVE)
Below the cell =SUM(BELOW)
Above and below the =SUM(ABOVE,BELOW)
cell
Left of the cell =SUM(LEFT)
Right of the cell =SUM(RIGHT)
Left and right of the cell =SUM(LEFT,RIGHT)
Left of and above the =SUM(LEFT,ABOVE)
cell
Right of and above the =SUM(RIGHT,ABOVE)
cell
Left of and below the =SUM(LEFT,BELOW)
cell
To add the numbers… Type this in
the Formula box
Right of and below the =SUM(RIGHT,BELOW)
cell
How to Calculate Percentage in Excel?
Calculate Percentage in Excel (Basic Method)

 The formula =C2/B2 should be entered in cell D2 and copied to any number of rows you require.

 You can view the resulting decimal fractions as percentages by clicking the Percent Style button (Home tab
> Number group).

 As explained in Percentage tips, you should add more decimal places if necessary.

Or,

The Excel formula for calculating percentages is (without multiplying by 100) Numerator/Denominator. You can
convert the output to a percentage by pressing CTRL+SHIFT+%, or by clicking "%" under the "number" group
on the Home tab.

Fundamentals to Calculate Percentage

Percentage formula in excel: A percentage can be calculated using the formula=part/total. Imagine you are
trying to apply a discount and you would like to reduce the amount by 25%. The formula for this calculation will
be =Price*1-Discount %. (Imagine the "1" as a representation of 100%.)

The Percentage is a mathematical operation that involves multiplying the fraction by a hundred. The word
percent belongs to the Latin language, where it was called "Per-Cent."

For example, consider you are in school and you have six subjects in total. You are asked to write an exam for
each subject, and every subject has 100 marks to score. The total marks for all the subjects included sums up
to 600.

Let us imagine you scored 475 out of 600. Now, calculate the average of your scores.

The average is calculated by dividing your score by the total number of marks and multiply the fraction by 100.

That is,

(475/600)*100 = 79.16
Excel ROUND Function

Summary
The Excel ROUND function returns a number rounded to a given number of digits. The ROUND function
can round to the right or left of the decimal point.

Purpose
Round a number to a given number of digits

Return value
A rounded number.

Syntax
=ROUND (number, num_digits)

Arguments
 number - The number to round.
 num_digits - The place at which number should be rounded.
Version
Excel 2003

Usage notes
The ROUND function rounds a number to a given number of places. ROUND rounds up when the last
significant digit is 5 or greater, and rounds down when the last significant digit is less than 5.

ROUND takes two arguments, number and num_digits. Number is the number to be rounded,
and num_digits is the place at which number should be rounded. When num_digits is greater than zero,
the ROUND function rounds on the right side of the decimal point. When num_digits is less or equal to
zero, the ROUND function rounds on the left side of the decimal point. Use zero (0) for num_digits to
round to the nearest integer. This behavior is summarized in the table below:
Digits Behavior

>0 Round to nearest .1, .01, .001, etc.

<0 Round to nearest 10, 100, 1000, etc.

=0 Round to nearest 1

Round to right
To round values to the right of the decimal point, use a positive number for digits:
=ROUND(A1,1) // Round to 1 decimal place
=ROUND(A1,2) // Round to 2 decimal places
=ROUND(A1,3) // Round to 3 decimal places
=ROUND(A1,4) // Round to 4 decimal places
Round to left
To round down values to the left of the decimal point, use zero or a negative number for digits:
=ROUND(A1,0) // Round to nearest whole number
=ROUND(A1,-1) // Round to nearest 10
=ROUND(A1,-2) // Round to nearest 100
=ROUND(A1,-3) // Round to nearest 1000
=ROUND(A1,-4) // Round to nearest 10000
Nesting inside ROUND
Other operations and functions can be nested inside the ROUND function. For example, to round down
the result of A1 divided by B1, you can ROUND in a formula like this:
=ROUND(A1/B1,0) // round result to nearest integer
Any formula that returns a numeric result can be nested inside the ROUND function.

Other rounding functions


Excel provides a number of rounding functions, each with a different behavior:
 To round with standard rules, use the ROUND function.
 To round to the nearest multiple, use the MROUND function.
 To round down to the nearest specified place, use the ROUNDDOWN function.
 To round down to the nearest specified multiple, use the FLOOR function.
 To round up to the nearest specified place, use the ROUNDUP function.
 To round up to the nearest specified multiple, use the CEILING function.
 To round down and return an integer only, use the INT function.
 To truncate decimal places, use the TRUNC function.

You might also like