Upload
gwenda-phillips
View
216
Download
1
Tags:
Embed Size (px)
Citation preview
Introduction to Microsoft ExcelIntroduction to Microsoft Excel
FeaturesFeatures
calculates and recalculates (immediate results)calculates and recalculates (immediate results)
graphical data representation (chart)graphical data representation (chart)
carries out “What-if” analysiscarries out “What-if” analysis i.e., an evaluation in which certain values are chani.e., an evaluation in which certain values are chan
ged in order to reveal the effects of those changes ged in order to reveal the effects of those changes on decision-makingon decision-making
Basic Arithmetic OperatorsBasic Arithmetic Operators
++ :- addition:- addition -- :- subtraction:- subtraction ** :- multiplication:- multiplication // :- division:- division ^̂ :- exponentiation:- exponentiation
TerminologyTerminology
WorksheetWorksheet consists of columns and rowsconsists of columns and rows the intersection of columns and rows is called the intersection of columns and rows is called
“cell”. “cell”.
Columns are denoted by letter, e.g. A, B, ..., Columns are denoted by letter, e.g. A, B, ...,
Rows are denoted by number, e.g. 1, 2, ...Rows are denoted by number, e.g. 1, 2, ...
TerminologyTerminology
Active cellActive cell the cell in which data is enteredthe cell in which data is entered ““F2” is the function key to modify the cell’s F2” is the function key to modify the cell’s
contentscontents
WorkbookWorkbook the collection of worksheets , the file format of the collection of worksheets , the file format of
MS Excel, its file extension is “XLS”MS Excel, its file extension is “XLS”
TerminologyTerminology
Cell reference/Relative addressCell reference/Relative address naming convention that starts with column, naming convention that starts with column,
then rowthen row e.g., A1, B7e.g., A1, B7
Terminology Terminology
Absolute reference/addressAbsolute reference/address a dollar sign “$” precedes column and rowa dollar sign “$” precedes column and row e.g. $A$1, $B$7e.g. $A$1, $B$7
N.B. N.B.
absolute address is used when the calculation absolute address is used when the calculation involved a fixed address/rangeinvolved a fixed address/range
TerminologyTerminology
RangeRange an address specified by the started and ended an address specified by the started and ended
cells with a colon in betweencells with a colon in between
e.g., A1:B7, $A$1:$B$7e.g., A1:B7, $A$1:$B$7 FormulaFormula
defined by user to perform specific calculation, defined by user to perform specific calculation, must be started with an equal sign “=”must be started with an equal sign “=”
e.g. =A1+B7e.g. =A1+B7
TerminologyTerminology
FunctionsFunctions a built-in formula that assists calculation, some a built-in formula that assists calculation, some
common functions of Excel are SUM, common functions of Excel are SUM, AVERAGE, COUNT, MIN, and MAX AVERAGE, COUNT, MIN, and MAX
MacroMacro records frequently used commands/operations, records frequently used commands/operations,
retrieves in future to perform the recorded retrieves in future to perform the recorded commands in single runcommands in single run
FunctionsFunctions
function can be edited directly in the cell or;function can be edited directly in the cell or; using the Function Wizardusing the Function Wizard
Edit MenuEdit Menu
contains the “Cut”, “Paste” and “Copy” contains the “Cut”, “Paste” and “Copy” commandscommands
Delete...Delete... deletes the selected columns or rowsdeletes the selected columns or rows
Delete SheetDelete Sheet remove the current selected worksheet from remove the current selected worksheet from
workbookworkbook
Format CellFormat Cell
Number formatNumber format
DecreaseDecimal
CurrencyStyle Increase
DecimalPercentageStyle
CommaStyle
Insert MenuInsert Menu
NameName defines a name to a rangedefines a name to a range
PicturePicture inserts picture/clipart into a worksheetinserts picture/clipart into a worksheet
Insert MenuInsert Menu
WorksheetWorksheet inserts a blank worksheet to a workbookinserts a blank worksheet to a workbook
ChartChart inserts a chart object into current or a new inserts a chart object into current or a new
worksheetworksheet
Inserting ChartInserting Chart
selects the data range where the chart is selects the data range where the chart is created from (CTRL+Mouse)created from (CTRL+Mouse)
selects the Chart Wizardselects the Chart Wizard selects the type of chartsselects the type of charts enters the details of chart such as titles, enters the details of chart such as titles,
scales, etc.scales, etc.
Modifying ChartModifying Chart
double click on the Chart object to modify double click on the Chart object to modify the items in the Chartthe items in the Chart
Modifying Axis ScaleModifying Axis Scale
double click on the axisdouble click on the axis edits the “Scale”edits the “Scale”
Modifying LegendModifying Legend
right-click on the graphright-click on the graph chooses “Format Data Series”chooses “Format Data Series” edits the “Name and Values” boxedits the “Name and Values” box
Creating Combination GraphCreating Combination Graph
the data have to be specified twice at the the data have to be specified twice at the first step in creating the graphfirst step in creating the graph
Protecting A WorksheetProtecting A Worksheet
worksheet can be locked to prevent from worksheet can be locked to prevent from editing by othersediting by others
Tools MenuTools MenuProtectionProtectionProtect SheetProtect Sheet
Split WindowSplit Window
SetupSetup Window MenuWindow MenuSplitSplit moves the split linesmoves the split lines
ClearClear Window MenuWindow MenuRemove SplitRemove Split
Freeze PanesFreeze Panes
SetupSetup positions the active cellpositions the active cell Window MenuWindow MenuFreeze PanesFreeze Panes
ClearClear Window MenuWindow MenuUnfreeze PanesUnfreeze Panes
Data SortingData Sorting
selects the range to be sortedselects the range to be sorted Data MenuData MenuSortSort specifies the sorted key and ordered methodspecifies the sorted key and ordered method
Data FilteringData Filtering
SetupSetup selects the header rangeselects the header range Data MenuData MenuFilterFilterAutoFilterAutoFilter chooses the drop down box and specifies chooses the drop down box and specifies
the criteriathe criteria
Data FilteringData Filtering
ClearClear Data MenuData MenuFilterFilterAutoFilterAutoFilter
Working On Multiple WorksheetsWorking On Multiple Worksheets
cell/range can be linked to other worksheetscell/range can be linked to other worksheets
e.g., cell B1 in Sheet2 contains the formula:e.g., cell B1 in Sheet2 contains the formula:
=Sheet1!A10=Sheet1!A10
Logical FunctionsLogical Functions
IF()IF()
NOT()NOT()
AND()AND()
OR()OR()
Function - IF()Function - IF()
returns one value if logical test is true, anotreturns one value if logical test is true, another value if logical test is falseher value if logical test is false
Syntax:Syntax:
IF(logical_test, value_if_true, value_if_false)IF(logical_test, value_if_true, value_if_false)
Example Example
IF(9 < 8,C1+1,D1*2)IF(9 < 8,C1+1,D1*2)
If If 9 < 8 9 < 8 thenthen
returns C1+1returns C1+1
otherwiseotherwise
returns D1*2returns D1*2
IF(9<8, C1+1, D1*2)IF(9<8, C1+1, D1*2)
Example -IF()Example -IF()
Logical testLogical test
otherwiseotherwisethenthen
Function - AND()Function - AND()
Syntax:Syntax:
AND(logical_1, logical_2, ...)AND(logical_1, logical_2, ...)
Example Example
IF(AND(A1>0,B1>0),C1,D1)IF(AND(A1>0,B1>0),C1,D1)
AA BB AND(A, B)AND(A, B)TRUETRUE TRUETRUE TRUETRUETRUETRUE FALSEFALSE FALSEFALSEFALSEFALSE TRUETRUE FALSEFALSEFALSEFALSE FALSEFALSE FALSEFALSE
returns true ifreturns true if
all the logical valuesall the logical values
are true.are true.
Function - OR()Function - OR()
Syntax:Syntax:
OR(logical_1, logical_2, ...)OR(logical_1, logical_2, ...)
Example Example
IF(OR(A1>0,B1>0),C1,D1)IF(OR(A1>0,B1>0),C1,D1)
AA BB OR(A, B)OR(A, B)TRUETRUE TRUETRUE TRUETRUETRUETRUE FALSEFALSE TRUETRUEFALSEFALSE TRUETRUE TRUETRUEFALSEFALSE FALSEFALSE FALSEFALSE
returns true ifreturns true if
one of the logical one of the logical
values is true.values is true.
Function - NOT()Function - NOT()
negates the logical negates the logical valuevalue
Syntax:Syntax:
NOT(logical_value)NOT(logical_value)
AA NOT(A)NOT(A)TRUETRUE FALSEFALSEFALSEFALSE TRUETRUE
Statistical FunctionsStatistical Functions
COUNT()COUNT()
COUNTIF()COUNTIF()
COUNTA()COUNTA()
COUNTBLANK()COUNTBLANK()
AVERAGE()AVERAGE()
SUM()SUM()
SUMIF()SUMIF()
SUMPRODUCT()SUMPRODUCT()
SUMSQ()SUMSQ()
LARGE()LARGE()
MIN()MIN() SMALL()SMALL()
MAX()MAX() RANK()RANK()
Function - COUNT()Function - COUNT()
counts the number of numeric entries counts the number of numeric entries in in the given argumentthe given argument
Syntax:Syntax:
COUNT(value1, value2, ...)COUNT(value1, value2, ...)
ExampleExample
COUNT(A1:B7)COUNT(A1:B7)
Function - COUNTIF()Function - COUNTIF()
counts the number of entries counts the number of entries in the specifiein the specified range d range that satisfies the given criteriathat satisfies the given criteria, not, note that the criteria has to be e that the criteria has to be “quoted”“quoted”
Syntax:Syntax:
COUNTIF(Range, Criteria)COUNTIF(Range, Criteria)
ExampleExample
COUNTIF(A1:B7, “>=40”)COUNTIF(A1:B7, “>=40”)
Function - COUNTA()Function - COUNTA()
counts the number of non-empty entries counts the number of non-empty entries in in the specified rangethe specified range
Syntax:Syntax:
COUNTA(Range)COUNTA(Range)
ExampleExample
COUNTA(B2:E6)COUNTA(B2:E6)
Function - COUNTBLANK()Function - COUNTBLANK()
counts the number of blank entries counts the number of blank entries in the in the specified rangespecified range
Syntax:Syntax:
COUNTBLANK(Range)COUNTBLANK(Range)
ExampleExample
COUNTBLANK(B2:E6)COUNTBLANK(B2:E6)
Function - AVERAGE()Function - AVERAGE()
calculates the average calculates the average of a given of a given argumentsarguments
Syntax:Syntax:
AVERAGE(number1, number2, ...)AVERAGE(number1, number2, ...)
ExampleExample
AVERAGE(A1:B7)AVERAGE(A1:B7)
Function - MIN()Function - MIN()
finds the minimum value finds the minimum value of a given of a given argumentsarguments
Syntax:Syntax:
MIN(number1, number2, ...)MIN(number1, number2, ...)
ExampleExample
MIN(A1:B7)MIN(A1:B7)
Functions - MAX()Functions - MAX()
finds the maximum value finds the maximum value of a given of a given argumentsarguments
Syntax:Syntax:
MAX(number1, number2, ...)MAX(number1, number2, ...)
ExampleExample
MAX(A1:B7)MAX(A1:B7)
Function - SUM()Function - SUM()
finds the sum finds the sum of a given argumentsof a given arguments
Syntax:Syntax:
SUM(number1, number2, ...)SUM(number1, number2, ...)
ExampleExample
SUM(A1:B7)SUM(A1:B7)
Function - SUMIF()Function - SUMIF()
computes the sum of “range2” if “range1” computes the sum of “range2” if “range1” satisfies the criteriasatisfies the criteria
Syntax:Syntax:
SUMIF(range1, criteria, range2)SUMIF(range1, criteria, range2)
ExampleExample
SUMIF(A2:A11, “>7”, B2:B11)SUMIF(A2:A11, “>7”, B2:B11)
Function - SUMPRODUCT()Function - SUMPRODUCT()
multiplies corresponding components in the multiplies corresponding components in the given array, and returns the sum of those given array, and returns the sum of those products.products.
Syntax:Syntax:
SUMPRODUCT(range1, range2)SUMPRODUCT(range1, range2)
ExampleExample
SUMPRODUCT(A2:A11, B2:B11)SUMPRODUCT(A2:A11, B2:B11)
Function - SUMSQ()Function - SUMSQ()
returns the sum of the squares of the returns the sum of the squares of the argumentsarguments
Syntax:Syntax:
SUMSQ(range1, range2)SUMSQ(range1, range2)
ExampleExample
SUMSQ(A2:A11, B2:B11)SUMSQ(A2:A11, B2:B11)
Function - LARGE()Function - LARGE()
returns the n-th largest value in the data setreturns the n-th largest value in the data set
Syntax:Syntax:
LARGE(range, n)LARGE(range, n)
ExampleExample
LARGE(A2:A11, 4)LARGE(A2:A11, 4)
Function - SMALL()Function - SMALL()
returns the n-th smallest value in the data sereturns the n-th smallest value in the data sett
Syntax:Syntax:
SMALL(range, n)SMALL(range, n)
ExampleExample
SMALL(A2:A11, 4)SMALL(A2:A11, 4)
Function - RANK()Function - RANK()
returns the rank of a number in a list of returns the rank of a number in a list of numbersnumbers
Syntax:Syntax:
RANK(num, range, order)RANK(num, range, order)
ExampleExample
RANK(A2, A2:A11)RANK(A2, A2:A11)
0 - descending0 - descendingnon zero - ascendingnon zero - ascending
Mathematical FunctionsMathematical Functions
ABS()ABS()
INT()INT()
MOD()MOD()
SQRT()SQRT()
ROUND()ROUND()
RAND()RAND()
TRUNC()TRUNC()
QUOTIENT()QUOTIENT()
Function - ABS()Function - ABS()
returns the absolute value returns the absolute value of a given numberof a given number
Syntax:Syntax:
ABS(number)ABS(number)
Example Example
ABS(-2) = 2ABS(-2) = 2
ABS(-12.5) = 12.5ABS(-12.5) = 12.5
Function - INT()Function - INT()
returns the integer/integral part returns the integer/integral part of a given numof a given numberber
Syntax:Syntax:
INT(number)INT(number)
Example Example
INT(2.58) = 2INT(2.58) = 2
INT(-2.5) = -3 (take the smallest integer)INT(-2.5) = -3 (take the smallest integer)
Function - MOD()Function - MOD()
returns a remainder returns a remainder after a / b where bafter a / b where b
Syntax:Syntax:
MOD(number, divisor)MOD(number, divisor)
ExampleExample
MOD(5, 3) = 2MOD(5, 3) = 2
MOD(10,5) = 0MOD(10,5) = 0
Function - SQRT()Function - SQRT()
returns the square root returns the square root of a given numberof a given number
Syntax:Syntax:
SQRT(number)SQRT(number)
ExampleExample
SQRT(16) = 4SQRT(16) = 4
Function - ROUND()Function - ROUND()
rounds a number rounds a number to the specified nearest decimto the specified nearest decimal placeal place
Syntax:Syntax:
ROUND(number, decimal)ROUND(number, decimal)
Example Example
ROUND(10.475, 2) = 10.48ROUND(10.475, 2) = 10.48
ROUND(10.824, 0) = 11ROUND(10.824, 0) = 11
Function - ROUND()Function - ROUND()
Example Example
ROUND(123.47, -1) = 120ROUND(123.47, -1) = 120
ROUND(125.47, -2) = 100ROUND(125.47, -2) = 100
Function - TRUNC()Function - TRUNC()
truncates a number to an integer truncates a number to an integer by removing tby removing the fractional part of the numberhe fractional part of the number
Syntax:Syntax:
TRUNC(number)TRUNC(number)
Example Example
TRUNC(8.9) = 8TRUNC(8.9) = 8
TRUNC(-8.9) = -8TRUNC(-8.9) = -8
Function - QUOTIENT()Function - QUOTIENT()
returns the integer portion of a divisionreturns the integer portion of a division
Syntax:Syntax:
QUOTIENT(number1, number2)QUOTIENT(number1, number2)
ExampleExample
QUOTIENT(5, 2) = 2QUOTIENT(5, 2) = 2
QUOTIENT(16, 4) = 4QUOTIENT(16, 4) = 4
Function - RAND()Function - RAND()
generates a random number x, generates a random number x,
where 0 < x < 1where 0 < x < 1
Syntax:Syntax:
RAND()RAND()
ExampleExample
RAND() = 0.6196RAND() = 0.6196
Date & Time FunctionsDate & Time Functions
DATE()DATE()
NOW()NOW()
WEEKDAY()WEEKDAY()
Function - DATE()Function - DATE()
returns the (serial) number of a particular returns the (serial) number of a particular datedate
Syntax:Syntax:
DATE(year, month, day)DATE(year, month, day)
Example Example
DATE(99, 3, 12)DATE(99, 3, 12)
Function - NOW()Function - NOW()
returns the (serial) number of the current returns the (serial) number of the current date and timedate and time
Syntax:Syntax:
NOW()NOW()
Function - WEEKDAY()Function - WEEKDAY()
returns weekday number of the current datreturns weekday number of the current datee
Syntax:Syntax:
WEEKDAY()WEEKDAY()
11 SundaySunday
22 MondayMonday
33 TuesdayTuesday
44 WednesdayWednesday
55 ThursdayThursday
66 FridayFriday
77 SaturdaySaturday
Text FunctionsText Functions
LEFT()LEFT()
RIGHT()RIGHT()
MID()MID()
UPPER()UPPER()
LOWER()LOWER()
VALUE()VALUE()
EXACT()EXACT()
FIND()FIND()
SEARCH()SEARCH()
LEN()LEN()
TRIM()TRIM() CONCATENATE()CONCATENATE()
CHAR()CHAR() ISBLANK()ISBLANK()
PROPER()PROPER()
Function - LEFT()Function - LEFT()
copys character(s) from a string starting frocopys character(s) from a string starting from leftm left
Syntax:Syntax:
LEFT(text, num)LEFT(text, num)
ExampleExample
LEFT(“Final Fantasy”, 5) = “Final”LEFT(“Final Fantasy”, 5) = “Final”
number of char.number of char.to copyto copy
Function - RIGHT()Function - RIGHT()
copy character(s) from a string starting from copy character(s) from a string starting from rightright
Syntax:Syntax:
RIGHT(text, num)RIGHT(text, num)
ExampleExample
RIGHT(“Type-R”, 1) = “R”RIGHT(“Type-R”, 1) = “R”
number of char.number of char.to copyto copy
Function - MID()Function - MID()
copy character(s) from a string, starting at tcopy character(s) from a string, starting at the position you specifyhe position you specify
Syntax:Syntax:
MID(text, start_pos, num)MID(text, start_pos, num)
ExampleExample
MID(“R34 GT-R”, 5 , 4) = “GT-R”MID(“R34 GT-R”, 5 , 4) = “GT-R”
number of char.number of char.to copyto copy
startingstartingpositionposition
Function - UPPER()Function - UPPER()
converts all letters in a text string to uppercaconverts all letters in a text string to uppercasese
Syntax:Syntax:
UPPER(text)UPPER(text)
ExampleExample
UPPER(“toyota”) = “TOYOTA”UPPER(“toyota”) = “TOYOTA”
Function - LOWER()Function - LOWER()
converts all letters in a text string to lowercaconverts all letters in a text string to lowercasese
Syntax:Syntax:
LOWER(text)LOWER(text)
ExampleExample
LOWER(“HONDA”) = “honda”LOWER(“HONDA”) = “honda”
Function - TRIM()Function - TRIM()
removes all spaces from text except for singremoves all spaces from text except for single spaces between wordsle spaces between words
Syntax:Syntax:
TRIM(text)TRIM(text)
ExampleExample
TRIM(“ Bio Hazard ”) = “Bio Hazard”TRIM(“ Bio Hazard ”) = “Bio Hazard”
Function - CHAR()Function - CHAR()
returns the character specified by the ASCII returns the character specified by the ASCII codecode
Syntax:Syntax:
CHAR(num)CHAR(num)
ExampleExample
CHAR(65) = “A”CHAR(65) = “A”
ASCIIASCIIcodecode
Function - VALUE()Function - VALUE()
converts text to numberconverts text to number
Syntax:Syntax:
VALUE(text)VALUE(text)
ExampleExample
VALUE(“2048”) = 2048VALUE(“2048”) = 2048
Function - EXACT()Function - EXACT()
compares two strings and returns TRUE if tcompares two strings and returns TRUE if they are exactly the same, FALSE otherwisehey are exactly the same, FALSE otherwise
Syntax:Syntax:
EXACT(text1, text2)EXACT(text1, text2)
ExampleExample
EXACT(“IS200”, “IS 200”) = FALSEEXACT(“IS200”, “IS 200”) = FALSE
Function - FIND()Function - FIND()
finds a string from another string, returns the pofinds a string from another string, returns the position of the char. foundsition of the char. found
Syntax:Syntax:
FIND(text1, text2, start_pos)FIND(text1, text2, start_pos)
ExampleExample
FIND(“O”, “TOYOTA”, 3) = 4FIND(“O”, “TOYOTA”, 3) = 4
FIND(“o”, “TOYOTA”) = ERRORFIND(“o”, “TOYOTA”) = ERROR
Function - SEARCH()Function - SEARCH()
similar to FIND, but the search string is not cassimilar to FIND, but the search string is not case sensitivee sensitive
Syntax:Syntax:
SEARCH(text1, text2, start_pos)SEARCH(text1, text2, start_pos)
ExampleExample
SEARCH(“O”, “TOYOTA”, 3) = 4SEARCH(“O”, “TOYOTA”, 3) = 4
SEARCH(“o”, “TOYOTA”) = 2SEARCH(“o”, “TOYOTA”) = 2
Function - PROPER()Function - PROPER()
capitalizes the first letter in text. Converts all otcapitalizes the first letter in text. Converts all other letters to lowercaseher letters to lowercase
Syntax:Syntax:
PROPER(text)PROPER(text)
ExampleExample
PROPER(“EXCEL is easy”) =PROPER(“EXCEL is easy”) =
““Excel Is Easy”Excel Is Easy”
Function - CONCATENATE()Function - CONCATENATE()
join several text strings into one stringjoin several text strings into one string
Syntax:Syntax:
CONCATENATE(text1, text2, ...)CONCATENATE(text1, text2, ...)
ExampleExample
CONCATENATE(“EXCEL ”, “is easy”) = CONCATENATE(“EXCEL ”, “is easy”) = “EXCEL is easy”“EXCEL is easy”
Equivalent Operator - &Equivalent Operator - &
join several text strings into one stringjoin several text strings into one string
Syntax:Syntax:
text1 & text2 & ...text1 & text2 & ...
ExampleExample
““EXCEL ” & “is easy” = “EXCEL is easy”EXCEL ” & “is easy” = “EXCEL is easy”
Function - ISBLANK()Function - ISBLANK()
test whether or not the cell is empty.test whether or not the cell is empty.
Syntax:Syntax:
ISBLANK(val)ISBLANK(val)
ExampleExample
ISBLANK(A15) = FALSEISBLANK(A15) = FALSE
Function - LEN()Function - LEN()
returns the length of a string.returns the length of a string.
Syntax:Syntax:
LEN(text)LEN(text)
ExampleExample
LEN(“Excel”) = 5LEN(“Excel”) = 5
Lookup FunctionsLookup Functions
HLOOKUPHLOOKUP
VLOOKUPVLOOKUP
LOOKUPLOOKUP
Function - HLOOKUP()Function - HLOOKUP()
Syntax:Syntax:
HLOOKUP(lookup_value, lookup_range, HLOOKUP(lookup_value, lookup_range, row_num, matching)row_num, matching)
rangerangeTRUE : approx. matchTRUE : approx. matchFALSE: exact matchFALSE: exact match
i.e., the row that returns the valuei.e., the row that returns the value
Function - HLOOKUP()Function - HLOOKUP()
When the value is foundWhen the value is foundin the 1st row, returns the in the 1st row, returns the
result from one of the rest ofresult from one of the rest ofthe row.the row.
Always lookup theAlways lookup the1st row1st row
Function - VLOOKUP()Function - VLOOKUP()
Syntax :Syntax :
VLOOKUP(lookup_value, lookup_range, colVLOOKUP(lookup_value, lookup_range, col_num, matching)_num, matching)
rangerangeTRUE : approx. matchTRUE : approx. matchFALSE: exact matchFALSE: exact match
i.e., the col. that returns the valuei.e., the col. that returns the value
Function - VLOOKUP()Function - VLOOKUP()
Always lookup theAlways lookup the1st col1st col
When the value is foundWhen the value is foundin the 1st col, returns the in the 1st col, returns the
result from one of the rest ofresult from one of the rest ofthe col.the col.
Function - LOOKUP()Function - LOOKUP()
Syntax 1:Syntax 1:
LOOKUP(lookup_value,LOOKUP(lookup_value,
lookup_range, result_range)lookup_range, result_range)
must be same sizemust be same size
Function - LOOKUP() - Syntax 1Function - LOOKUP() - Syntax 1
lookup the valuelookup the valuefrom mfrom mthth row/col row/col
When the value is found When the value is found in the min the mthth row/col, row/col,
returns the result from returns the result from nnthth row/col. row/col.
Note:Note:Lookup range must be orderedLookup range must be orderedLookup and result range must have same sizeLookup and result range must have same size
Function - LOOKUP()Function - LOOKUP()
Syntax 2:Syntax 2:
LOOKUP(lookup_value, range)LOOKUP(lookup_value, range)
Function - LOOKUP()Function - LOOKUP()
NotesNotes Similar to HLOOKUP/VLOOKUPSimilar to HLOOKUP/VLOOKUP If cols <= rows (array/range size) thenIf cols <= rows (array/range size) then
lookup 1st collookup 1st col If cols > rows (array/range size) thenIf cols > rows (array/range size) then
lookup 1st rowlookup 1st row Always return the last row/colAlways return the last row/col
Function - LOOKUP() - Syntax 2Function - LOOKUP() - Syntax 2
When the value When the value is found in the is found in the
1st row/col, always 1st row/col, always returns the result returns the result
from the last row/col.from the last row/col.
Always lookup theAlways lookup the1st row/col1st row/col
Note:Note:cols <= rowscols <= rows, lookup , lookup 1st col1st colcols > rowscols > rows, lookup , lookup 1st rows1st rows
Macros (巨集 )Macros (巨集 )
Definition:Definition: a sequence of instructions that tells Excel to doa sequence of instructions that tells Excel to do
Purpose:Purpose: automates repetitive tasksautomates repetitive tasks
macro codes are stored in a Module sheetmacro codes are stored in a Module sheet
Automatic MacroAutomatic Macro
activates automatically whenever the activates automatically whenever the workbook is openedworkbook is opened
In MS Excel, the name of automatic macro In MS Excel, the name of automatic macro is “Auto_Open”is “Auto_Open”
Ordinary MacroOrdinary Macro
activates only when invoked by useractivates only when invoked by user
Macro FormatMacro Format
Sub Macro_Name()Sub Macro_Name()
Codes...Codes...
End SubEnd Sub
Macro RecorderMacro Recorder
the easiest way to create a macrothe easiest way to create a macro
ToolsToolsMacroMacroRecord New MacroRecord New Macro
enters macro name and starts recordingenters macro name and starts recording
Running A MacroRunning A Macro
ToolsToolsMacroMacro
chooses macro and click “Run”chooses macro and click “Run”
Editing A MacroEditing A Macro
chooses “Macro” from “Tools” menuchooses “Macro” from “Tools” menu chooses “Visual Basic Editor”chooses “Visual Basic Editor”