MODULE Introduction To Construction Estimates (Microsoft Excel Programming)
MODULE Introduction To Construction Estimates (Microsoft Excel Programming)
Microsoft Excel consists of different features of tabs, groups of commands and workbooks. It contains
and stores data in tabular form and allows the user to manipulate commands, operations and more
on it. With that, it is one of the most suitable spreadsheet programs that enables and helps us to
manage our data in tabular form and create logical analysis from it.
In MS Excel 2010, row numbers range from 1 to 1048576. There are a total of 1048576 rows, and
columns range from A to XFD and there are a total of 16384 columns.
The screenshot figures in this module are based on Excel 2016 running on
Windows 10 with the Windows 10 Basic theme. Figures herewith shows the
typical layout for Excel 2016.
Excel Icon
WORKBOOK
CREATING A WORKBOOK
A new workbook is created by clicking on the Excel icon in your computer and selecting Blank
workbook (see Figure 2). A new workbook can also be created while working in an existing
Excel workbook by typing Ctrl + N (done by clicking the Ctrl key and N key simultaneously) to
bring up a blank workbook or by selecting the File tab from the ribbon, clicking on New in the left
pane to emerge the New Workbook, and double clicking on Blank Workbook (see Figure 3).
OPENING A WORKBOOK
Existing workbooks can be opened by double clicking on the file name where the workbook was
saved. Workbooks can also be opened from Excel by typing Ctrl + O (done by clicking the Ctrl
key and O key simultaneously). Recently used files may be opened by selecting the File tab,
Open button, selecting Recent to bring up the Recent Files (see figure 4) and clicking on the file
name in the list of recently used documents in the right pane.
Workbooks are saved by (option 1) clicking on the Save button on the Quick Access toolbar
(QAT), by (option 2) typing Ctrl + S (done by clicking the Ctrl key and S key simultaneously), or
by (option 3) selecting the File tab and clicking Save in the left pane.
The first time a file is saved, any one of these actions will bring up the Save As dialogue box.
From the Save As dialogue box, the user selects the folder where the file is to be stored on the
left side (see figure 5), types the file name in the File name: bar, choose the type of file you want
your workbook to be saved (see figure 6) and clicks on the Save button.
An existing workbook can be saved under a different file name and different location/folder by
selecting the File tab and clicking on Save As in the left pane to bring up the Save As dialogue
box. The workbook is saved with a different file name and folder in the same manner that the user
saved a workbook the first time.
Figure 6. Saving a workbook in any type listed on the Save As dialogue box.
WORKSHEET
A worksheet is made from the intersections of rows and columns which form what we call “cell”
where data is entered and interpreted (see figure 7). A worksheet can do multiple tasks like
calculations, data analysis, etc. In an Excel worksheet, columns are represented by alphabets
while rows are represented by numbers.
Columns
Selected Cell
Rows Worksheet
Sheets
ADDING WORKSHEETS
Option 1: You may add, delete, rename, and change the order of the worksheets to your
workbook by clicking the “+” symbol near to the sheet (see figure 8). In this workbook, only one
worksheet can be active at a time.
Figure 8. Image above shows where is “+” to add new worksheet by option (1).
Option 2: A blank worksheet may be added by clicking the right click of the mouse, selecting
Insert... from the popup menu (see figure 9) to bring up the Insert dialogue box (see figure 10).
From the Insert dialogue box, the user selects Worksheet and clicks the OK button to insert
the worksheet.
Figure 9. Image above shows where add new worksheet by option (2).
Figure 10. Image above shows where add new worksheet by option (2).
COPYING WORKSHEETS
Option 1: A worksheet is copied by right clicking on the worksheet tab and selecting Move or
Copy... from the popup menu (see figure 11). The Move or Copy Dialogue box will emerge. The
user will choose and click the worksheet to be copied and checks the “Create a copy” check box
(see figure 12).
Figure 11. Copy a worksheet by (option 2) right clicking on that chosen worksheet to emerge pop up box.
Option 2: You can also copy worksheet by selecting the Home Menu Tab, click the downward
arrow beside the Format button in the Cell group, the Format Popup Menu will bring up, select
Move or Copy Sheet... from the popup menu (see figure 13). The same Move or Copy Dialogue
box will bring up (see figure 12) and the same manner and procedure in option (1) is to follow to
copy a worksheet.
Figure 13. Home: Format Popup menu.
DELETING WORKSHEETS
Option 1: Worksheets can be deleted by right clicking the tabs of the unneeded worksheets and
selecting Delete from the popup menu (see figure 14)
Figure 14. Delete a worksheet by (option 1) right clicking on that chosen worksheet to emerge pop up box.
Option 2: The alternate option is by selecting the Home menu tab, selecting the downward arrow
beside the Delete button in the Delete button in the Cell group, the Delete Popup Menu will bring
up, select Delete Sheet from the popup menu (see figure 15).
Figure 15. Home: Delete Popup menu. Delete a worksheet by (option 2).
If the worksheet contains data, a warning dialogue box (see figure 16) will appear warning you
that data exists and giving you the opportunity to cancel the delete. If you still want to delete the
worksheet, click on the Delete button. To cancel the delete, click on the Cancel button.
View Options
Figure 17. Excel Interface.
The Quick Access Toolbar (QAT) composes of different commands of Excel that is customizable to
provide fast access to the user by adding any command in it, whichever is quite needed the most. By
default, Save, Undo, and Repeat commands are added in the quick access toolbar commonly found
at the upper left of the application. You can add many commands as possible but not all can be
displaced.
The Ribbon includes multiple tabs, each with several groups of commands.
There are many tabs available in Microsoft Excel: Home, Insert, Draw, Page Layout,
Formulas, Data, Review, View and Help. Each tab has its own distinct features.
Tabs
Each tab of Excel Ribbon contains its related operations list. For example, the Page Layout tab
contains all related to aesthetic aspect of the file. Consequently, the formula tab contains all
the mathematical, logical, finance, date, time functions and others related to numerical.
Figure 20. Excel Ribbon
NAME BOX
The Name box gives the location or "name" of a selected cell in the worksheet.
FORMULA BAR
It allows the user to write or edit data, formula, or a function that will take place in a specific cell.
In the image shown below, cell C23 is selected. Please see how the data is gathered from another set
of cells given by the formula inside formula bar.
Figure 21. Example of formula inside the formula bar which resulted to the value in cell C23.
VIEW OPTIONS
We have few options to view any workbook in the Excel. These are the Normal view, Page Layout
view, or Page Break view found at the lower right of the application.
Page Layout
View
Page Break View
Normal View
View Options
Figure 22. View Options.
FILE MENU (BACKSTAGE VIEW)
Whenever the File Tab is clicked, the file menu also known as Backstage view will arise which
contains the information of the file and its options.
Return to Excel
pen recent workbooks, as well as other workbooks saved to your computer or OneDrive.
s information about the current workbook or inspect the workbook and set its protection controls.
Home: Shows you the file menu.
New: You can create a new blank workbook or choose from options of templates.
e a preview of your workbook, change the print setting and print your workbook.
Save and Save as: Allows you to store your workbook in your computer or other location.
Share: You can invite people to view and collaborate on your workbook or by sharing it through email as an a
can choose to export your workbook in another format such as PDF/XPS or Excel 1997-2003.
Publish: You can publish in Power BI to create and share rich visual reports and dashboards from your wo
the current workbook.
Feedback: Consist of your mood while working and reaction towards the performance of the
t: From the account pane, you can access, modify and sign-out your Microsoft account.
Options: You can control options of the file like, Office Language Preferences, Settings
ZOOM CONTROL
The Zoom control allows the user to view the worksheet on desired scale through clicking and
dragging the slider on either to the left or right. The user may zoom in and out by sliding the control
knob or by clicking on the Plus or Minus buttons located to the right and left of the slider.
Zoom Control
i. Ready Mode – In this mode, nothing is being written or edited on the spreadsheet.
ii. Enter Mode - This is when you are doing data entry in your workbook.
iii. Edit Mode – This means that the user is presently editing the contents of the current cell.
To edit the content of a cell, double‐click the selected cell with data in it or click the inside of
the formula bar.
iv. Point Mode – This is once the worksheet is used when linking to cell addresses within a
formula or from an Excel dialog window.
Programming is the process of writing instructions that get executed by computers. These
instructions are written in a programming language in which the computer can comprehend and
use to perform a certain task or even solve a problem.
Working with Microsoft Excel may take couple of times. To speed up your work and make it more
convenient, you can use the number of keyboard shortcut list down below.
Shift + F5 It provides users the option to display the find and replace dialog box.
Ctrl + B It allows you to bold all selected items of an Excel sheet. It can also be
done by pressing Ctrl + 2.
Ctrl + D It enables you to fill down the cells with the content of the selected cell.
As shown in the below picture:
Ctrl + F It offers the option to open find and replace dialog box quickly. You can
also use Shift + F5 for it.
Ctrl + G It is used to open the go-to option dialog box where you can go to the
specific cell. It can also be done by using F5.
Ctrl + H It allows you to find and replace the word or sentences in a file. For
example, if by mistake you have written a computer instead of the
computer at many places in your sheet, you can replace it with the
computer in one go.
Ctrl + I It is used to put italics on all cells in the selected section. It can also be
done by pressing Ctrl + 3.
Ctrl + K It provides the option to insert a hyperlink in a file.
Ctrl + O It offers users the option to open the dialog box where you can choose a
file that you want to open. You can also use Ctrl + F12 to open a file.
Ctrl + Q It is used to display the quick analysis options for the selected cells
with data. As shown in the below image:
Ctrl + R It allows you to fill the cells to the right with the content of the selected
cell. As shown in the below screenshot:
Ctrl + S Its use is to save the document. It can also be done by using
Alt + Shift + F2.
Ctrl + T It offers users the option to display the create table dialog box.
Ctrl + U It is used to underline all selected cells. You can also use the shortcut
key Ctrl + 4 to underline the cells in the Excel sheet.
Ctrl + V It provides users the option to paste the copied data onto the Excel
sheet. You are required to copy the data once, and then you can paste it
any number of times.
Ctrl + W It is used to close the currently open document or a file quickly. It can
also be done by pressing Ctrl + F4 shortcut keys.
Ctrl + X It allows users the option to cut the entire data of the selected cells in an
Excel sheet.
Ctrl + Z It is used to undo (get back) the deleted item. For example, if you have
deleted the data by mistake, you can press Ctrl + Z to retrieve the
deleted data. It can also be done by pressing Alt + Backspace.
Ctrl + Page up & Page It allows you to move from one worksheet to another worksheet in the
Down same Excel file.
Ctrl + F6 It enables the users to move from one document to another document
in Microsoft Excel. It can also be done by pressing Ctrl + Tab.
F4 It provides users the option to repeat the last action. For example, if
you change the red color of the text in a cell, by pressing F4, you can
apply the same text color in another cell.
F10 The function key F10 is used to activate the menu bar. For example, if
you want to open the file menu, you need to press F10, then F.
F12 It enables you to use the Save As option, which allows you to save a file
with a different name. It can also be done by using Alt + F2.
Alt + = It allows you to use the formula to add the data of all the above cells.
Ctrl + Shift + " It allows you to copy the content of a cell and to paste it into a cell,
which is just below it. It can also be done by using Ctrl + " key. For
example, if you have written "Excel" in cell B1 and its below cell is B2,
by pressing Ctrl + Shift + " or Ctrl + ' the word "Excel" will be copied in
cell B2.
Ctrl + Shift +! It is used to apply comma format in numbers. For example, as shown in
the below image:
Ctrl + Shift + $ Its use is to apply currency format to numbers. As shown in the below
screenshot:
Ctrl + Shift +% It provides users the option to apply percentage sign to numbers. For
example, see the below picture:
Ctrl + Space It enables you to select the entire active columns.
Ctrl + (Right arrow →) It allows the users to move the cursor to the next cell, which contains the
text.
Ctrl + 1 It is used to open the format cells dialog box where you can change the
text format like text color, font size, font style, text alignment, etc. It can
also be done by pressing Ctrl + Shift + F or Ctrl + Shift + P.
Ctrl + 5 Its use is to put the strikethrough to all selected cells. As shown in the
below picture:
Ctrl + - It will open a delete dialog box where you can delete a selected row or
column.
Ctrl + Shift + = It will open the insert dialog box where you can insert the new row or a
column.
Ctrl + Shift + ^ It is used to make an exponential form of any number. For example, you
have written a number 12345 in the worksheet, and if you press
Ctrl + shift + ^, the number will be changed 1.23E+04 in exponential
form.
Ctrl + Shift + & It offers users the option to make a border around the selected cells.
Ctrl + Shift + _ It offers users the option to remove a border around the selected cells in
a worksheet.
Ctrl + Home It allows the users to move the cursor to the beginning (cell A1) of the
worksheet.
Ctrl + End It is used to move the cursor to the last cell with text on the worksheet.
Shift + Page Up It allows you to select all the cells located above the selected cell.
Shift + Home It enables you to select all cells to the left of the current active cell.
Shift + (Up Arrow ↑) It enables you to extend the selected area up by one cell.
Shift + (Down Arrow ↑) It enables you to extend the selected area down by one cell.
Alt + Enter It allows the users to write in multiple lines in one cell. For example, if
you are typing in a cell, it enables you to move on the next line in one
cell by pressing Alt + Enter.
Alt + ' It is used to access the style dialog box.
Alt + F11 It provides users the option to open the Visual Basic editor.
DISCLAIMER. The sample Excel spreadsheets in this module are to provide the reader with
examples of how Excel may be used in estimating, and as such, are designed for a limited number of
estimating situations. Before using the spreadsheets in this module, the reader should understand the
limits of the spreadsheet and carefully verify that the spreadsheets (1) are applicable to his or her
estimating situation and (2) produce an acceptable answer. The reader assumes all risks from the
use and/or performance of these spreadsheets.
EXCEL FUNCTIONS AND FORMULAS
Microsoft Excel has two basic ways to perform calculations: Formulas and Functions. Functions
and formulas are the bread and butter of Excel. They drive almost everything interesting and
useful you will ever do in a spreadsheet. This article introduces the basic concepts you need to
know to be proficient with formulas in Excel.
In this subject, we will use different functions and formulas to solve certain topics that are useful
in our field.
1. Formulas
In Microsoft Excel, a formula is an expression that works on values in a range of cell/s.
Example:
=A1+A2+A3+A4+A5, which finds the total sum of the selected range of values from cell
A1 to cell A5.
2. Functions
In Microsoft Excel, a function is a predefined formula to eliminate lengthy manual entry of
formulas.
For example:
=SUM(A1:A5). This results with the same answer from formula which gives the total
sum on the values from cell A1 to A5.
Note: Formula/Function always starts with equal sign (=). In function, it is followed by
the function’s name, open parenthesis, arguments, and close parenthesis. Any
information/input you give to a function is called an argument.
Example: =SUM(A1:A5)
Function’s argument
name
WRITING FORMULAS
The formulas contain mathematical calculations. Formulas may consist of numbers, variables,
and operators. Numbers are typed in from the keyboard and do not change. Cells within the
worksheets that are referenced by the formula are known as variables. Variables are entered
by typing the cell reference or by selecting the cell and include in writing the formula.
MATHEMATICAL OPERATIONS
An Excel Formula/Function always start with an equal sign (=).
a. Addition, plus sign (+)
b. Subtraction, hyphen (‐) (also used for negative)
c. Multiplication, asterisk (*) or parenthesis (())
d. Division, slash or backslash (/)
e. Exponent/Power, caret (^)
LOGICAL OPERATIONS
a. Greater than (>)
b. Less than (<)
c. Equal to (=)
d. Greater than or equal (>=)
e. Less than or equal (<=)
f. Not equal to (<>)
ORDER OF OPERATIONS
Excel performs the calculation of a formula in the following order:
1. The calculations enclosed by the parentheses are performed, starting with the
innermost pair, and working out to the outermost pair of parentheses.
2. The variable or number raised to a power is performed.
3. Multiplication and division are performed.
4. addition and subtraction are performed.
When two calculations have the same priority, they are performed left to right.
When a formula contains relative referencing and it is copied from one cell to another, Excel
does not create an exact copy of the formula. It will change cell addresses relative to the row
and column they are moved to. For example, if a simple addition formula in cell C1 “=(A1+B1)”
is copied to cell C2, the formula would change to “=(A2+B2)” to reflect the new row (see figure
below).
To prevent this from happening, cells must be called by absolute referencing. This is
accomplished by placing dollar signs “$” within the cell addresses in the formula. Continuing
the previous example, if the formula in cell C1 reads “=($A$1+$B$1)” and this is to be copied
to cell C2, it will have the same result as C1. Both the column and row of both cells are
absolute and will not change when copied (see figure below).
Mixed referencing can also be used where the row or column is fixed, but not both. For
example, in the formula “=(A$1+$B2)”, the row of cell A1 is fixed but not the column and the
column of cell B2 is fixed but not the row (see figure below).
BASIC FUNCTIONS
In addition to mathematical equations, computer functions can also be included in the
formulas. Functions are entered by the
following options.
Option 2: Popup menu of Lookup & Reference Function from Formulas Tab
Click this to popup Insert Function Dialogue Box Type the name of the Function here
You can also choose from here
From the Insert Function Dialogue box, the user may make a function available for selection
by (option 1) selecting All or (option 2) the function’s category from the Or select a category:
dropdown box (Financial, Date & Time, Math & Trig, Statistical, Lookup & Reference,
Database, Text, Logical, Information, Engineering, Cube, Compatibility, and Web).
Alternatively, (option 3) the user may perform a key word search by typing key words in the
Search for a function: text box and clicking on the Go button.
When the function is shown in the Select a function: list box, the user may either double
clicks on the function or selects the function and clicks on the OK button to bring up the
Function Arguments dialogue box. The Function Arguments dialogue box for the SUM
function is shown in the figure below. Each function has its own Function Arguments dialogue
box. The Function
Arguments dialogue box prompts the user for the information necessary to complete the
function. The user enters the requested information and clicks the OK button to close the
Function Arguments dialogue box and create the function.
SUM
The SUM function adds a group of numbers and is particularly useful when adding a column,
row, or block number. When used, only the cells containing the first and last number are
needed to be included in the formula.
Noncontiguous cells may be added by placing a comma between the cells references. The
formula =SUM(A1:A5,B1) adds the numbers in Cells A1, A2, A3, A4, A5, and B1. The SUM
function is quickly inserted into a cell by clicking on the Formula menu tab and clicking on the
AutoSum button in the Function Library group in Formulas Tab.
AVERAGE
The AVERAGE function is configured to solve for the average of the values in a range of cells.
Only the cells containing numbers are included in the average.
MAXIMUM
The MAXIMUM function returns the highest number in a range of cells.
Example: =MAX(A1:A100) → Finds the highest value from cells A1 through A100
MINIMUM
The MINIMUM function returns the lowest number in a range of cells.
Example: =MIN(A1:A100) → Finds the lowest value from cells A1 through A100
ROUNDING
Excel provides the user 3 standard rounding functions: (1) ROUND, which rounds to the
closest number; (2) ROUNDDOWN, which rounds the number down; and (3) ROUNDUP,
which rounds the number up. Each of these functions requires the user to indicate the number
or cell containing the number to be rounded (Number) and the number of digits to round to
(Num_digits).
Examples:
=ROUND(143.145,2) → The number of digits in the function is equals to 2, the
function will round the decimal places to hundredths. This example will result to
143.15.
CEILING
The CEILING function may be used to round up a number to the next multiple of a specified
number (referred to by Excel as significance). For example, if the significance is 0.50, the
CEILING function will round up to the next 0.50 increment. The CEILING function requires the
user to indicate the number or cell containing the number to be rounded (Number) and the
significance.
FORMULA: =CEILING(NUMBER,SIGNIFICANCE)
FLOOR
The FLOOR function works in the same way as the CEILING function except it rounds down.
FORMULA: =FLOOR(NUMBER,SIGNIFICANCE)
TRIM
The TRIM function allows the users to remove unnecessary extra trailing and leading spaces
from the cell.
FORMULA: =TRIM(CELL)
Example:
PROPER
The PROPER function is a text function that allows the users to make each of the entered text
into a proper-looking style or sentence cases into capitalizing the 1 st letter of each word.
FORMULA: =PROPER(CELL)
Example:
NOW
The NOW function will just tell the user precisely what time and day it is.
FORMULA: =NOW()
TRANSPOSE
The TRANSPOSE function returns a vertical range of cells when a horizontal range is entered
as an input and vice versa.
FORMULA: =TRANSPOSE(ARRAY)
Example:
IF
The IF function is one of the most popular functions in Excel as it allows the user to make logical
comparisons between a value and what he expects.
An IF statement can have two results. The 1st result is if the comparison is True, the 2ND if the
comparison is False.
=IF(A2=1,“Goodmorning”,“Goodevening”)
says IF(A2 = 1, then return a word
“Goodmorning”, otherwise return a word
“Goodevening”).
Using a function as one of the arguments in a formula that uses a function is called
NESTING, and we’ll refer to that function as a NESTED FUNCTION.
You are not limited to only checking if one thing is equal to another and returning a
single result, you can also use mathematical operators (as discussed on previous
topics in the beginning of this module) and perform additional calculations depending
on your criteria. You can also nest multiple IF functions together in order to perform
multiple comparisons (see example below).
=IF(A2<=3,"Goodmorning",IF(A2<=7,"Goodafternoon","Goodevening"))
Logical Value if Logical test Value if true Value if false
test true Value if false: another IF Function
Nested function:
Opening parenthesis Inside Nested function: Inside Nested function: Nested function:
Opening parenthesis Closing parenthesis Closing parenthesis
=IF(A2<=3,"Goodmorning",IF(A2<=7,"Goodafternoon","Goodevening"))
says =IF(A2 is less than or equal to 3, return a word "Goodmorning",IF(A2 is less
than or equal to 7 (but greater than 3 because this was already included in the 1st
argument, in other words, it ranges from 4 to 7), return a word "Goodafternoon",
otherwise return a word "Goodevening"(all numerical values greater than 7,
meaning from 8 onwards will be returned with a result of “Goodevening”) ))
NOTE:
Any text criteria or any criteria that includes logical or mathematical symbols must
be enclosed in double quotation marks (“”). If the criterion is numerical value,
double quotation marks are not required.
ADDITIONAL TOPIC:
You can open the Excel HELP Pane by (option 1) clicking on F1 key as the standard key to
get help in MS Office, (option 2) clicking the HELP Tab on your ribbon (see figure below). In
Excel 2016, (option 3) you use can the query box or search box to enter your question and
select from helpful option links or select the question mark from the dropdown list to launch
Excel Help Pane.
For example, the user has trouble on understanding how to use the TRANSPOSE Function.
By option 2, the Help Pane will appear on the right side of your computer. Type on the
Search bar the function you want to know. The image below is showing us the result.
OTHER FUNCTIONS
VLOOKUP
VLOOKUP function helps to search for a certain criterion against a chosen column. It
searches for the given condition/s and returns a matching value from another column.
In order to solve this problem using Volume Method, the 1 st step is to compute its volume. Using
this volume as your constant multiplier, one must use the respective reference table to get the
appropriate factors given the criteria (Class Mixture, Cement, Sand and Gravel) from Table 1-2.
See how the formula VLOOKUP help us know what this value is without manually inputting the
said factor in the cell.
Formula
Criteria Factors
criteria
criteria
problem by only filling up the cell with our criteria (Class Mixture, mass of cement, sand, gravel) and let the Excel search from the values in the referen
Let’s investigate how the formula works!
=VLOOKUP(V9,$B$3:$F$7,2,0)
Lookup valuearray or criteria Accuracy
Column Number
=VLOOKUP(V9,$B$3:$F$7,3,0)
Lookup valuearray or criteria Accuracy
Column Number
=VLOOKUP(V9,$B$3:$F$7,4,0)
Lookup valuearray or criteria Accuracy
Column Number
=VLOOKUP(V9,$B$3:$F$7,5,0)
Lookup valuearray or criteria Accuracy
Column Number
a. Lookup value or criteria: V9 refers to the criterion of the problem (class mixture) in which
other choices must also list down in a column format. The row where V9 is located will be a
constant row that will give the corresponding values based on the number of column that will
be specified in the VLOOKUP Formula.
b. Array: $B$3:$F$7 refers to the cells which contain the values that satisfy your criteria. In our
example, see how the class mixture are listed in a column.
c. Column Number: 2, 3, 4, 5 (40 kg per bag of cement, 50 kg per bag of cement, sand, and
gravel respectively) refers to that particular column where the lookup value will be matched
with to give the correct value.
d. Accuracy: “0” refers to the accuracy of finding the corresponding value for your VLOOKUP
formula.
Notes:
VLOOKUP Function works when the set of choices for the lookup value or criteria are listed
in a single column and match against with values in multiple columns of the same row
where that lookup value is located.
HLOOKUP
HLOOKUP function helps to search for a certain criterion against a chosen row. It searches for
the given condition/s and returns a matching value from another row.
Formula
Criteria Factors
criteria
criteria
he problem by only filling up the cell with our criteria (Class Mixture, mass of cement, sand, gravel) and let the Excel search from the values in the refere
=HLOOKUP(S10,$B$3:$F$7,5,0)
Lookup valuearray or criteria Accuracy
Row Number
=HLOOKUP(S11,$B$3:$F$7,5,0)
Lookup valuearray or criteria Accuracy
Row Number
=HLOOKUP(S12,$B$3:$F$7,5,0)
Lookup valuearray or criteria Accuracy
Row Number
=HLOOKUP(S13,$B$3:$F$7,5,0)
Lookup valuearray or criteria Accuracy
Row Number
a. Lookup value or criteria: S10, S11, S12, S13 refers to the criteria of the problem (40 kg per
bag of cement, 50 kg per bag of cement, sand, and gravel respectively) in which these criteria
must be list down in a single row format.
b. Array: $B$3:$F$7 refers to the cells which contain the values that satisfy your criteria.
c. Row Number: “5” (class mixture) refers to that particular row where the lookup values S10,
S11, S12, S13 will be matched with to give the correct value.
d. Accuracy: “0” refers to the accuracy of finding the corresponding value for your VLOOKUP
formula.
Notes:
HLOOKUP Function works when the set of choices for the lookup value or criteria are
listed in a single row and match against with values in multiple rows of the same column
where that lookup value is located.
ADDITIONAL TOPIC:
Step 2: Configure
Settings. Choose from the
options what to allow for
the validation of criteria. In
our example, the
appropriate validation is
“List”. After clicking List,
we have to select the
Source: by selecting the
cells that contain these
choices.
Step 6: Lastly, try to enter a different alphabet/punctuation/number not listed on 4 Class Mixtures or
the cells set to Source: in Step 2. The image below is showing us the result.
SOME OTHER USEFUL EXCEL FUNCTIONS
INDEX MATCH
Formula: =INDEX(array,MATCH(cell,column,accuracy),MATCH(cell,row,accuracy))
This is an advanced alternative to the HLOOKUP and VLOOKUP formulas that have quite a few
limitations or drawbacks. INDEX MATCH is a powerful combination of Excel formulas as gives the
value straightforward given that the criteria is clear.
INDEX refers the value of a specific cell in a table based on its row and column number while MATCH
refers the position of a specific cell in a row or column.
Here are 2 examples of the INDEX and MATCH formulas combined together as an alternative to
VLOOKUP and HLOOKUP from previous examples. In these examples, given the
parameters/criteria, we look up the factor within the table and use it to solve these problems.
In order to solve this problem using Volume Method, the 1 st step is to compute its volume.
Using this volume as your constant multiplier, one must use the respective reference table to get the
appropriate factors given the criteria (Class Mixture, Cement, Sand and Gravel) from Table 1-2. See
how the formula INDEX MATCH help us know what these values are without manually inputting the
said factors in the cell.
Criteria Factors
criteria
criteria
The idea here is to solve the problem by only filling up the cell with our criteria and let the Excel search from the values in the refere
Formula
Formula: =INDEX(array,MATCH(cell,column,accuracy),MATCH(cell,row,accuracy))
=INDEX($B$3:$F$7,MATCH($V$9,$B$3:$B$7,0),MATCH(S10,$B$3:$F$3,0))
=INDEX($B$3:$F$7,MATCH($V$9,$B$3:$B$7,0),MATCH(S11,$B$3:$F$3,0))
=INDEX($B$3:$F$7,MATCH($V$9,$B$3:$B$7,0),MATCH(S12,$B$3:$F$3,0))
=INDEX($B$3:$F$7,MATCH($V$9,$B$3:$B$7,0),MATCH(S13,$B$3:$F$3,0))
a. Array: $B$3:$F$7 refers to the range of data that starts from the 1 st column and 1st row which
corresponds to the criteria of the INDEX MATCH formula.
b. Data for column criteria: $V$9 refers to the cell that contains the criteria whose choices are in
column format. In our example, see how the class mixture are listed in a column. $B$3:$B$7
refers to the range of data where the choices for $V$9 is found. “0” refers to the accuracy of
finding the corresponding value for your INDEX MATCH formula. In INDEX MATCH formula,
you have 3 choices of accuracy for the value namely “0 – exact”, “1 – less than”, and “-
1 – greater than” (see picture above).
c. Data for row criteria: S10, S11, S12, S13 refers to the cell that contains the criteria whose
choices are in row format. In our example, see how the parameters (cement, sand, gravel) are
listed in a row. Putting $ is a choice in Excel, but if the formula will be used repetitively in
multiple cells and the reference data is the same, it is advisable to put $ to denote this
common similarity. Know that if you are dragging the formula, there are instances the cells
will also be adjusted.
$B$3:$F$3 refers to the range of data where the choices for S10, S11, S12, S13 are found. “0”
refers to the accuracy of finding the corresponding value for your INDEX MATCH formula. In
INDEX MATCH formula, you have 3 choices of match value or accuracy for the value namely
“0
– exact”, “1 – less than”, and “-1 – greater than” (see picture above).
Notes:
The formula always starts with an equal sign (=), followed by the code for a formula and
ends with appropriate sequence of closing parenthesis. Note that there should be an
equal number of opening and closing parenthesis.
A dollar sign ($) in Microsoft Excel is used to create absolute cell referencing. This tells
Excel that you want to always refer to a specific cell even when your formula is copied across
and one that will not change.
A comma (,) separates each argument.
Take note that the column/row selection for MATCH should start from the 1st cell selected
in your array or range and is directly followed by values where you will get your choice.
In order to solve this problem using Area Method, the 1 st step is to compute its area. Using this
area as your constant multiplier, one must use the respective reference table to get the appropriate
factors given the criteria (Class Mixture, Cement, and Sand) from Table 2-2. See how the formula
INDEX MATCH help us know what these values are without manually inputting the said factors in the
cell.
Formula
Formula
Criteria Factors
criteria
criteria
Formula: =INDEX(array,MATCH(cell,column,accuracy),MATCH(cell,row,accuracy))
=INDEX($B$4:$G$7,MATCH($R$10,$B$4:$B$7,0),MATCH($T$9,$B$4:$G$4,0))
=INDEX($B$4:$G$7,MATCH($R$10,$B$4:$B$7,0),MATCH($Q$12,$B$4:$G$4,0))
a. Array: $B$4:$G$7 refers to the range of data that starts from the 1 st column and 1st row which
corresponds to the criteria of the INDEX MATCH formula.
b. Data for column criteria: $R$10 refers to the cell that contains the criteria whose choices are in column
format. In our example, see how the size of CHB are listed in a column. $B$4:$B$7 refers to the range
of data where the choices for $R$10 is found. “0” refers to the accuracy of
finding the corresponding value for your INDEX MATCH formula. In INDEX MATCH formula,
you have 3 choices of accuracy for the value namely “0 – exact”, “1 – less than”, and “-
1 – greater than” (see picture above).
c. Data for row criteria: $T$9 and $Q$12 refers to the cells that contains the criteria (class
mixture for cement and sand) whose choices are in row format. In our example, see how the
parameters (cement and sand) are listed in a row. Also, in solving the example problem, we
are looking for only 2 factors among the values in the table. Therefore, with this reasoning, we
can use $ to simply denote that the reference cell will not change for the 2 selected cells where
criteria (class mixture, size of CHB and sand) will be entered. $B$4:$G$4 refers to the range
of data where the choices for $T$9 and $Q$12 are found. “0” refers to the accuracy of finding
the corresponding value for your INDEX MATCH formula. In INDEX MATCH formula, you have
3 choices of accuracy for the value namely “0 – exact”, “1 – less than”, and “-1 – greater than”
(see picture above).
Notes:
The formula always starts with an equal sign (=), followed by the code for a formula
and ends with appropriate sequence of closing parenthesis.
A dollar sign ($) in Microsoft Excel is used to create absolute cell referencing. This tells
Excel that you want to always refer to a specific cell even when your formula is copied across
and one that will not change.
A comma (,) separates each argument.
Take note that the column/row selection for MATCH should start from the 1st cell selected
in your array or range and is directly followed by values where you will get your choice.
In Excel, you can combine IF with AND Functions, or IF with OR Functions to create
multiple conditional situations.
Formula
If the input data is invalid as per logical argument, this will result to
Let’s investigate how the formula works!
Notes:
The IF OR Function is configured to assess the cell where to input data if it matches
the data of any of the specified cell/numerical values/words on the logical part of the IF
OR Function to return a declared true value, otherwise, all other values aside from the
logical will be equivalent to the false value.
Formula
If the input data is valid as per logical argument, this will result to:
If the input data is invalid as per logical argument, this will result to:
Formula
If the input data satisfies all logical arguments, this will result to a true value.
If the input data did not satisfy all logical arguments, this will result to a false value.
USE NESTED FUNCTIONS IN A IF FUNCTION
We are not limited only to use single function. With the use of nesting functions, we
can manipulate and combine the principle of IF AND and IF OR functions into a
nested function.
For example (see figure below), the available mass of cement that are being
manufactured today is either 40 kg or 50 kg per bag. Therefore, we can restrict the
user to only choose between these 2 masses. Likewise, the available Class Mixture
with data on Table 1-2 are AA, A, B and C. By that, we can only make few
combinations of mass and class mixture.
"The Table 1-2 does not have data for this class mixture.")
Value if false
Nested function, IF:
Closing parenthesis
The following figures below are the results when input data on either L9 and N9 is not
included on the specified logical arguments.
Just like the concept of INDEX MATCH Formula, the CHOOSE function will return a value from an
array corresponding to the reference cell provided. The function will return the nth entry(choice) in a
given list.
The CHOOSE function is very useful when creating scenarios in financial models. By using the
CHOOSE formula, the user is able to select between different scenarios that can flow through the
entire solution.
Formula Choices
Choice #1
Choice #2
Choice #3
Reference Cell Choice #4
Formula
Let’s investigate how the formula works!
=CHOOSE(N9,B4,B5,B6,B7)
Arguments/choices
Reference Cell
a. Reference cell: N9 refers to the cell that specifies which argument (choice) is selected from
the list of choices B4,B5,B6,B7.
b. Choices: B4,B5,B6,B7 should be written right after the reference cell. It is a list of one or more
values that we want to return a value from. The returning value will appear to a selected cell in
the worksheet. From the example, the equivalent of choice #4 is class mixture “C” which
appear in cell M11 as the selected returning cell.
Notes:
If reference cell is 1, CHOOSE returns choice #1; if it is 2, CHOOSE returns choice #2;
and so on.
i. SUMIF adds all cells that meet certain criteria and gives you the numerical sum. SUMIF can only
be applied to 1 criterion and 1 range (1 Condition).
The Excel SUMIF’s criteria can be applied to dates, numbers, and text. The SUMIF function
supports logical operators (>, <, <>, =, or combination) and wildcards (*,?) for partial
matching.
Example: The cost of 10x20x40 CHB, 15x20x40 CHB and 20x20x40 is 10php, 15 php and 18 php,
respectively. As per the supplier, if the cost of CHB per location is less than or equal to 2000 Php, the
supply will be delivered immediately and will be paid on cash by the owner. Otherwise, other supplies
will be ordered for the meantime and will be delivered after 3 weeks when the owner can already pay
the due amount. How much will the owner pay for the 1 st batch of supply of materials? 2ND batch?
Using the Area Method, we know that to solve for the number of CHB per location, we must
multiply the area and 12.5 pcs/sqm. From this, we will get the results under column M.
Formula Array
Criteria
Formula Array
Criteria
Manually, we can get the sum of the costs 1500php, 375 php, 750 php, 562.50 php, and
1687.5 php whose values are less than 2000 php by simply adding the values. This sum corresponds
to 4875 php as the cost of 1st batch of materials. Likewise, 11250php and 56225php sums to
16875php for the cost of 2ND batch of materials.
Since we have 2 independent conditions to satisfy: expense for materials that cost less than or
equal to 2000.00php and expense for materials that cost greater than or equal to 2000php, and our
aim is to know these numerical sums of the total expense for these conditions, Excel’s SUMIF
Function is a great help to lessen the burden of lengthy solution.
Let’s investigate how the formula works!
Formula: =SUMIF(array,“criteria″)
=SUMIF(N3:N9, “<=2000”)
array condition
=SUMIF(N3:N9, “>=2000”)
array condition
a. Array: N3:N9 refers to the range of data that you want to apply the criteria/condition against.
b. Criteria: “<=2000” and “>=2000” refers to the condition used to determine which cells to add.
Notes:
The argument is enclosed by quotation marks (“”).
The SUMIF function returns the sum of cells in a range that meet a single condition.
ii. While SUMIF gives numerical value, COUNTIF counts all cells that meet certain criteria and
gives you population. Just like SUMIF, COUNTIF can only be applied to 1 criteria and 1 range (1
Condition).
The Excel COUNTIF’s criteria can be applied to dates, numbers, and text. The COUNTIF function
supports logical operators (>, <, <>, =, or combination) and wildcards (*,?) for partial matching.
Example: (COUNTIF FOR NUMERALS) From the previous example, count the number of items
for 1st and 2ND batch of materials.
Formula Array
1
2
3
4
5
Criteria
Formula Array
Criteria
Formula: =COUNTIF(array,“criteria″)
=COUNTIF(N3:N9, “<=2000”)
array condition
=COUNTIF(N3:N9, “>=2000”)
array condition
a. Array: N3:N9 refers to the range of data that you want to apply the criteria/condition against.
b. Criteria: “<=2000” and “>=2000” refers to the condition used to determine which cells
to count.
Notes:
The argument is enclosed by quotation marks (“”).
The COUNTIF function returns the number of cells in a range that meet a single condition.
N15 is the selected cell where the result based on the formula will appear.
Example: (COUNTIF FOR TEXT) Find the number of locations that uses 10 x 20 x 40 CHB and 15 x
20 x 40 CHB.
Formula Array
1
2
3
4
5
Criteria
Formula Array
Criteria
Formula: =COUNTIF(array,“criteria″)
array criteria
Notes:
The argument is enclosed by quotation marks (“”) since it is a text parameter.
The COUNTIF function returns the number of cells in a range that meet a single condition.
N18 is the selected cell where the result based on the formula will appear.
iii. The SUMIFS function sums cells in a range using supplied criteria. Unlike the SUMIF function,
SUMIFS can apply more than one set of criteria, with more than one range.
Example: How many 10 x 20 x 40 CHB and 15 x 20 x 40 CHB are required to order for the
masonry walls (interior and exterior parts) of the
house?
Criteria
Criteria
From the example, the conditions are to know the quantity to be ordered for 10x20x40 CHB
and 15x20x40 CHB. In order to know these 2 independent quantities, we should separate the
needed quantity per location based on their required CHB size.
Manually, the quantity for 10x20x40 CHB is simple the sum of 150pcs + 37.5pcs + 562.5pcs
+ 75pcs +56.25pcs which is equals to 881.25pcs. Likewise, for 15x20x0 CHB, that is 750pcs +
112.5 pcs = 862.5 pcs.
Having 2 parameters, the range of quantities versus the sizes of the material, we can
eliminate this manual solution by the use of SUMIFS Function. SUMIFS Function is configured to
sum up
values that satisfy 2 or more conditions.
a. Array: M3:M9 refers to the range of data that you want to apply the criteria/condition against.
b. Criteria Range: K3:K9 refers to the range of data that come in pair with the criteria “10 x 20
x 40” and “15 x 20 x 40” which corresponding value refers to the data in array M3:M9.
c. Criteria: “10 x 20 x 40” and “15 x 20 x 40” refers to the condition used to determine
which cells to add from array M3:M9.
Notes:
The criteria is enclosed by quotation marks (“”).
The SUMIFS function returns the number of cells in a range that meet two or more
conditions. In the 1st picture above, SUMIFS is configured to sum values in column M when
the CHB size in column K is “10 x 20 x 40” and the numerical result will appear at the
selected cell N11. Likewise, in the second example, SUMIFS is set to sum values in
column M when the CHB size in column K is “15 x 20 x 40” and the numerical result will
appear at the selected cell N12.
N11, N12 are the selected cell where the result based on the formula will appear.
iv. The Excel COUNTIFS function returns the count of cells or the number of times that meet/match
two or more criteria. Just like SUMIFS, COUNTIFS can be used with criteria based on dates,
numbers, text, and other conditions. COUNTIFS supports logical operators (>, <, <>, =) and
wildcards (*,?) for partial matching.
Example: The owner wants to have an inventory for the doors and windows of his 2-storey
residential building. Help him count how many pairs of received & installed or pending & not yet
installed for windows and doors as shown from the picture using MS Excel.
From the problem, we have 2 given conditions for doors and windows, whether they are: (1)
received & installed and (2) or pending & not yet installed.
Manually, we can count them and have the same following answers as listed on the summary of
the figure. But with the help of Excel’s COUNTIF, we can easily eliminate the burden of manual
counting especially for the cases wherein the data is vast, and the possibility of error is high.
Let’s investigate how the formula works!
=COUNTIFS(C3:C20,“Received”,D3:D20,“Installed”)
=COUNTIFS(F3:F20,“Received”,G3:G20,“Installed”)
a. Array: C3:C20 refers to the range of data that you want to apply the 1ST criterion/condition
paired with the 2ND criterion/condition on D3:D20 for Windows. If both criteria are met, they will
be counted. Likewise, this is also the same principle for F3:F20 paired with G3:G20 for Doors.
b. Criteria: “Received” paired with “Installed” and “Pending” paired with “Not yet installed” are the
criteria that should be met with the data on both chosen arrays C3:C20 & D3:D20 and F3:F20
& G3:G20 for windows and doors, respectively. And since COUNTIFS function only counts
cells that satisfy the criteria on the argument, they will not be counted if one of the partners of a
pair are not exactly met.
Notes:
The criterion is enclosed by quotation marks (“”).
The COUNTIFS function returns the count of cells in a range that meet two or more
conditions. In the picture above for windows, COUNTIFS is configured to count values in
column C when paired with column D, having either “Received” & “Installed” or “Pending” &
“Not yet installed”. This is also the same principle how the results are for the doors.
F22, F23, F24, F25 are the selected cell where the result based on the formula will appear.