Useful Excel Functions (Autosaved)

download Useful Excel Functions (Autosaved)

of 31

  • date post

    13-Apr-2018
  • Category

    Documents

  • view

    220
  • download

    0

Embed Size (px)

Transcript of Useful Excel Functions (Autosaved)

  • 7/27/2019 Useful Excel Functions (Autosaved)

    1/31

    INT

    What Does It Do ?

    This function rounds a number down to the nearest whole number.

    Syntax

    =INT(Number)

    Example

    Table 1 calculates the age of four people but the decimal points are unsightly

    Table 1Birth Date Today's Date Age1-Jan-80 6-Jul-07 27.50992

    5-Feb-81 6-Jul-07 26.4120520-Oct-79 6-Jul-07 27.709791-Nov-81 6-Jul-07 25.67556

    Table 2 shows the same calculation formatted to zero decimalsThe issue is that certain ages are rounded up, giving us incorrect ages

    Table 2Birth Date Term Start Age

    1-Jan-80 6-Jul-07 285-Feb-81 6-Jul-07 2620-Oct-79 6-Jul-07 281-Mar-81 6-Jul-07 26

    Table 3 shows the age calculation with the INT function

    Table 3Birth Date Term Start Age

    1-Jan-80 6-Jul-07 27 25.55-Feb-81 6-Jul-07 26 25.620-Oct-79 6-Jul-07 271-Mar-81 6-Jul-07 26

  • 7/27/2019 Useful Excel Functions (Autosaved)

    2/31

    ROUND

    Number

    Places ToRound

    RoundedNumber

    1.47589 0 11.47589 1 1.5

    1.47589 2 1.48

    What Does It Do ?

    This function rounds a number to a specified amount 0f decimal places.If 0 is used the number is rounded to the nearest whole number.

    Syntax

    =ROUND(NumberToRound,DecimalPlacesToUse)

    ROUNDDOWN

    NumberPlaces To

    RoundRounded

    Down

    1.47589 0 11.47589 1 1.41.47589 2 1.47

    13643.48 -1 1364013643.48 -2 1360013643.48 -3 13000

    What Does It Do ?

    This function rounds a number down to a specified amount of decimal places.

    Syntax=ROUNDDOWN(NumberToRound,DecimalPlacesToUse)

    ROUNDUP

    Number

    Places ToRound

    RoundedUp

    1.47589 0 21.47589 1 1.51.47589 2 1.48

    13643.48 -1 1365013643.48 -2 1370013643.48 -3 14000

    What Does It Do ?

    This function rounds a number up to a specified amount of decimal places.

    Syntax

    =ROUNDUPNumberToRound,DecimalPlacesToUse)

  • 7/27/2019 Useful Excel Functions (Autosaved)

    3/31

    IF

    What Does It Do?

    This function tests a condition.If the condition is met it is considered to be TRUE.If the condition is not met it is considered as FALSE.Depending upon the result, one of two actions will be carried out.

    Syntax

    =IF(Condition,ActionIfTrue,ActionIfFalse)The Condition is usually a test of two cells, such as A1=A2.The ActionIfTrue and ActionIfFalse can be numbers, text or calculations.

    Example 1

    The following table shows the Sales figures and Targets.

    The =IF() function is used to compare the Sales with the Target.If the Sales are greater than or equal to the Target the result of Achieved is shown.If the Sales do not reach the target the result of Not Achieved is shown.Note that the text used in the =IF() function needs to be placed in double quotes "Achieved".

    Name Sales Target ResultRep 1 1000 5000 Not AchievedRep 1 6000 5000 AchievedRep 1 2600 2500 Achieved

    Rep 1 2000 4000 Not Achieved

    Example 2

    The following table is similar to that in Example 1.This time the Commission to be paid to the sales rep is calculated.If the Sales are greater than or equal to the Target, the Commission is 10% of Sales.If the Sales do not reach Target, the Commission is only 5% of Sales.

    Name Sales Target % of Target Achieved CommissionRep 1 1000 5000 -80% No CommisionRep 1 6000 5000 20% 900Rep 1 2600 2500 4% 260Rep 1 2000 4000 -50% No Commision

  • 7/27/2019 Useful Excel Functions (Autosaved)

    4/31

  • 7/27/2019 Useful Excel Functions (Autosaved)

    5/31

    AND

    What Does It Do?

    This function tests two or more conditions to see if they are all true.It can be used to test that a series of numbers meet certain conditions.It can be used to test that a number or a date falls between an upper and lower limit.Normally the AND() function would be used in conjunction with a function such as =IF().

    Syntax

    =AND(Test1,Test2)Note that there can be up to 30 possible tests.

    Example 1

    The following example shows a list of people and their hair/eye colorCan you find the person with your Hair and Eye Color?

    Name Hair Eyes Brown Hair and Blue EyesAllen Blonde Blue FALSEBob Red Brown FALSE

    Carol Blonde Brown FALSEDavid Brown Blue TRUEEric Red Blue FALSEFred Black Brown FALSEGail Red Blue FALSE

    Harry Blonde Blue FALSEIan Black Blue FALSE

    Janice Black Blue FALSEMark Brown Brown FALSEMike Brown Blue TRUE

    Name Hair Eyes Brown Hair and Blue EyesAllen Blonde Blue No MatchBob Red Brown No Match

    Carol Blonde Brown No MatchDavid Brown Blue MatchEric Red Blue No MatchFred Black Brown No MatchGail Red Blue No Match

    Harry Blonde Blue No MatchIan Black Blue No Match

    Janice Black Blue No MatchMark Brown Brown No MatchMike Brown Blue Match

  • 7/27/2019 Useful Excel Functions (Autosaved)

    6/31

  • 7/27/2019 Useful Excel Functions (Autosaved)

    7/31

    OR

    What Does It Do?

    This function tests two or more conditions to see if any of them are true.It can be used to test that at least one of a series of numbers meets certain conditNormally the OR() function would be used in conjunction with a function such as =

    Syntax=OR(Test1,Test2)Note that there can be up to 30 possible tests.

    Example

    The following example shows a list of people and their hair/eye color

    Name Hair Eyes Red Hair or Brown Hair

    Allen Blonde Blue FALSEBob Red Brown TRUE

    Carol Blonde Brown FALSE

    David Brown Blue FALSEEric Red Blue TRUEFred Black Brown TRUEGail Red Blue TRUE

    Harry Blonde Blue FALSE

    Ian Black Blue TRUEJanice Black Blue TRUEMark Brown Brown FALSEMike Brown Blue FALSE

  • 7/27/2019 Useful Excel Functions (Autosaved)

    8/31

    ions.IF().

  • 7/27/2019 Useful Excel Functions (Autosaved)

    9/31

    LEFT

    What Does It Do ?

    This function displays a specified number of characters from the left hand side of apiece of text.

    Syntax=LEFT(OriginalText,NumberOfCharactersRequired)

    Example

    Convert these 9 digit postal codes into 5 digit postal codes.

    Zip Zip70056-2343 70056

    75023-5774 7502355403-9986 5540390210-8867 90210

  • 7/27/2019 Useful Excel Functions (Autosaved)

    10/31

    RIGHT

    What Does It Do ?

    This function displays a specified number of characters from the right hand side of apiece of text.

    Syntax

    =RIGHT(OriginalText,NumberOfCharactersRequired)

    Example

    Extract the phone number without the area code

    Phone Phone(214)887-7765 887-7765(703)654-2180 654-2180

    (504)887-7767 887-7767(514)887-7768 887-7768

  • 7/27/2019 Useful Excel Functions (Autosaved)

    11/31

  • 7/27/2019 Useful Excel Functions (Autosaved)

    12/31

    MID

    What Does It Do ?

    This function picks out a piece of text from the middle of a text entry.The function needs to know at what point it should start, and how many characters to pick.If the number of characters to pick exceeds what is available, only the available characterswill be picked.

    Syntax

    =MID(OriginalText,PositionToStartPicking,NumberOfCharactersToPick)

    Example

    Convert these phone numbers into the correct format (xxx)xxx-xxxx.

    Job Code Job Level2901105 14351006 12214001 4

    5542075 24431443 11113543 3

  • 7/27/2019 Useful Excel Functions (Autosaved)

    13/31

  • 7/27/2019 Useful Excel Functions (Autosaved)

    14/31

    UPPER LOWER

    What Does It Do ?

    These functions change the case of a given text string

    Syntax

    =UPPER(Cell Reference or Text)

    =LOWER(Cell Reference or Text)=PROPER(Cell Reference or Text)

    Example

    Name Upper Case Lower CaseMiKe's CoFFee MIKE'S COFFEE mike's coffee

  • 7/27/2019 Useful Excel Functions (Autosaved)

    15/31

    PROPER

    Proper CaseMike'S Coffee

  • 7/27/2019 Useful Excel Functions (Autosaved)

    16/31

    TRIM

    What Does It Do ?

    This function removes unwanted spaces from a piece of text.The spaces before and after the text will be removed completely.Multiple spaces within the text will be trimmed to a single space

    Syntax=TRIM(TextToTrim)

    Example

    Original Text Trimmed Text ABCD ABCD

    A B C D A B C D Alan Jones Alan JonesABCD ABCD

  • 7/27/2019 Useful Excel Functions (Autosaved)

    17/31

    COUNT

    What Does It Do ?

    This function counts the number of numeric entries in a list.It will ignore blanks, text and errors.

    Syntax

    =COUNT(Range1,Range2,Range3... through to Range30)

    Example

    Item Jan Feb Mar Bricks 1000

    Wood 5000Glass 2000 1000Metal 1000Count 3 2 0

  • 7/27/2019 Useful Excel Functions (Autosaved)

    18/31

    COUNTA

    What Does It Do ?

    This function counts the number of numeric or text entries in a list.It will ignore blanks.

    Syntax

    =COUNTA(Range1,Range2,Range3... through to Range30)

    Example

    The =COUNTA() function has been used because of its ability to count text and numeric entries.

    Maths English Art History

    Alan Fail 1Bob 2 1 3

    Carol 1 1 1David Fail FailElaine 1 3 2 Fail

    How many students passed each exam.

    Math English Art History4 3 5 2

    Exams TakenBy Each Student

    423

    32

  • 7/27/2019 Useful Excel Functions (Autosaved)

    19/31

    COUNTBLANK

    What Does It Do ?

    This function counts the number of blank cells in a range.

    Syntax

    =COUNTBLANK(RangeToTest)

    Example

    Admin Accounts Production PersonnelFactory 1 Y NFactory 2 Y Y NFactory 3Factory 4 N N N

    Factory 5 Y YFactory 6 Y Y Y NFactory 7 N Y