You are on page 1of 15

What is a Formula? Formula is any calculation written by the user in Excel.

Formula may contain Simple values, cell references, even functions and mathematical Operator
Mathematical Operators are "+" for addition, "-" for subtraction, "/" for division and "*" for multiplicatio
In order to write a formula or a function in a cell we start by typing Equal sign(=) that indicates that the
contents of the cell is either a formula or a function
For Example : Formula can be =A2+B2 or =10+15, or =sum(A2,B2)*5 ,or =A2/B2, or =A2*5, or =A2-A3

What will be the result of =3+3*3


What will be the result of =(3+3)*3

Without using paranthesis 3+3*3 will result 12 because multiplication will be done first as a Rule followe
With Parenthesis addition will be done first and then the result of addition will be multiplied

DMAS rule is followed when multiple arithmetic operators are preseant in a given formula or function w
parenthesis, to evaluate a formula DMAS Rule is used, which States that Division or Multiplication which
first will be evaluated and then Addition and Subtraction whichever comes first.
mathematical Operator
ivision and "*" for multiplication.
sign(=) that indicates that the

A2/B2, or =A2*5, or =A2-A3

l be done first as a Rule followed by addition


n will be multiplied

n a given formula or function without


Division or Multiplication whichever comes
es first.
What is a function? Function is a predefined calculation to calculate specific values.
All Functions have name followed by the opening parenthesis and aguments and then closing parenthesis
Arguments are the simple values, cell references or range references
SUM(A1,B2) results the addition of values in cell A1 and B2
SUM(10,15) perform an addition and provide a result 25
MAX(A1:A5) results the maximum values presents in cells starting from A1 to A5
SUM and MAX are the name of the function followed by the parenthesis (A1,B2) and (A1:A5) are the argu

We develop formula based on some logic required to perform some evaluating/calculating task but functi
built in by Microsoft Excel having predefined logic.

To Enhance the power of Functions we can use it in Formulas, We can one of more functions in the formu
SUM(A1:A5)*.5%
nts and then closing parenthesis.

1 to A5
(A1,B2) and (A1:A5) are the arguments

uating/calculating task but function are already

e of more functions in the formula For Example


QTr1 QTr2 QTr3
Year
Prd A Prd B Prd A Prd B Prd A Prd B
2011 10 15 20 30 40 55
2012 20 25 30 40 60 65
2013 30 35 40 50 80 85
2014 40 45 50 60 90 95
2015 50 55 60 70 95 95

Total 150 Calculation of Total and


Average 30 Average using Formula

Total 150 Calculation of Total and


AVERAGE 30 Average using Function
QTr1 QTr2 QTr3
Year
Prd A Prd B Prd A Prd B Prd A Prd B
2011 10 15 20 30 40 55
2012 20 25 30 40 60 65
2013 30 35 40 50 80 85
2014 40 45 50 60 90 95
2015 50 55 60 70 95 95

COUNT 5 5 5 5 5 5 Count function will return the number of


values in a range

MAX 50 55 60 70 95 95 MAX Function will return the highest


value in a range

MIN 10 15 20 30 40 55 MIN Function returns the Smallest Value


in a range
return the number of

eturn the highest

ns the Smallest Value


AutoSum Feature Keyboard ShortCut Ctrl+=
QTr1 QTr2 QTr3
Year
Prd A Prd B Prd A Prd B Prd A Prd B
2011 10 15 20 30 40 55
2012 20 25 30 40 60 65
2013 30 35 40 50 80 85
2014 40 45 50 60 90 95
2015 50 55 60 70 95 95
Count 5
Simple IF IF Income is 3000 or more Than
Increment rate is 5% of Income
Sr.No Name BasicIncome Bonus otherwise 3%
1 Ali 2000 60
2 Wali 2500 75
3 Zahid 1500 45
4 Nadir 1000 30 Syntax
5 Badar 7000 350 IF(Condition,Action1,Action2)
6 Waqar 1800 54
7 Naveed 3500 175
8 Khalil 3000 150
9 Shahid 2100 63
10 Nasir 1900 57
Nested IF
Sr.No Name Income Increment Syntax
1 Ali 2000 400 IF(Condition1,Action1,IF(Condition2,Action2,IF(Co
2 Wali 2500 500 ndition3, Action3,Action4)))
3 Zahid 1500 15
4 Nadir 1000 10 Criteria Settings
5 Badar 7000 350 Rank Salesman as per following Increment
6 Waqar 1800 18 Income>=5000 5% of Income
7 Naveed 3500 105 Income>=3000 <5000 3% of Income
8 Khalil 3000 90 Income>=2000 <3000 2% of Income
9 Shahid 2100 420 Income < 2000 1% of Income
10 Nasir 1900 19
Values How many values that are greater than 10? Countif Function
10
5
20 Syntax
30 How many values that are equal to 30? COUNTIF(Range,Criteria)
30
2
40
15 How many values that are less than 20?
5
3

Values
A How many A values exist in Range A13 to A23?
A
4
B
B How many B values exist in Range A13 to A23?
B
5
C
C How many C values exist in Range A13 to A23?
A
4
C
A
B
C
B
Countif Function

Syntax
COUNTIF(Range,Criteria)
Department Employee Basic Salary Sum Values that are equal to 3000 SUMIF Function add values from
MKT Kamran 1000 6000 satisfies a particular con
MGT Saleem 2000

FIN Ali 3000 Sum of Values greater than 5000 Syntax


PRD Kabeer 4000 13000 SUMIF(Range,Criteria,[Sum
MKT Naveed 5000

MGT Shahid 6000 Sum of Sales made by [SumRange] is an optoinal arg


FIN Zahid 7000 MGT used when criteria range is d
SumRange
PRD Salman 1000 11000
MKT Amir 2000
MGT Waleed 3000 Department Salary
FIN Tanveer 4000 MKT 8000
PRD Kamran 5000 MGT 11000
FIN 14000
PRD 10000

Total Salary 43000 Total Salary 43000


Function add values from a range that
satisfies a particular condition.

Syntax
MIF(Range,Criteria,[SumRange])

Range] is an optoinal argument, only


when criteria range is different from
SumRange
Bonus is fixed for all Salesman
Relative Cell Referance and Absolute Cell that is certain given %age of
Referance sales
Sr.No Name Sales Bonus Bonus Rate
1 Ali 2000 60 3% Relative Cell Referance
2 Wali 2500 75 Cell Referance incremented
3 Zahid 1500 45 by specific Rows Number or
Column Numbers When a
4 Nadir 1000 30
formula is copied from one
5 Badar 7000 210 cell to another cell
6 Waqar 1800 54 Absolute Cell Referance
7 Naveed 3500 105
Cell Reference will be fixed
8 Khalil 3000 90 and do not change when
9 Shahid 2100 63 formula is copied from once
cell to another
10 Nasir 1900 57

You might also like