Anda di halaman 1dari 2

Home

Forums

VBA macros

Tutorials

Downloads

Open XL

Jobs

About Us

BUY EXCEL BOOKS ONLINE: 1. VBA & Macros


2. VBA for Modelers
3. Excel 2013 VBA and Macros
4. Excel VBA for Dummies
5. Excel with VBA & .NET
6. Mastering VBA
7. Excel 2013 Programming
Search

Create Excel Dashboard using OFFSET, SUM and MATCH functions


Calendar

Charts

Chr

Conditional

Formula Custom Select

For matting

Dashboar d

Custom
Data

Development

Validation Date/Time Downloads Ebook Event Macro Excel

Functions
Number
OFFSET Function Pivot Tables Queries and Solutions
Right Rows Columns Save Split Text Training Tutorials
Dashboards

Interview

Formatting

Formula

User Defined Function (UDF)

VBA

VSTO Macro Workbooks Worksheets

Discount on GODADDY Domain & Hosting Plans


$5.99 = .Co/.Com Domains

Tags : Conditional Formatting,

Function

IsEmpty IsNull IsNumer ic LCase Left Len

UBound UCase

Macro

For ms

+7 Recommend this on Google

Dashboard Development, Data Validation, Excel Dashboards, Formatting, Formula, Functions, OFFSET

1
Like

As we learned in our previous article on OFFSET function, when we increase either the row
height or column width in the offset function "=OFFSET(A1,2,0,1,1)" to more than 1, the
reference is converted to a range from a single cell value. Now this range can be provided to
various formulas where it will be used as Dynamic Range.

Now we'll try to understand how to use OFFSET function in conjunction with SUM Function. Before
we begin, let's have a look at a dashboard where we're effectively using SUM Function in conjunction
with OFFSET and MATCH function.

2.69 = .co.uk Domains


$1.99 = Web Hosting
$12.99 = SSL Certificates
Subscribe for FREE Excel Items:
E-mail :
Subscribe
Interviews/Jobs
3 things to remember before the Interview
50 Oral VBA Interview Questions
15 Essential Logical Puzzles (VBA)
15 Excel Pivot Tables Interview Questions
50 Excel Formula/Functions Questions
Jobs (Analyst/Excel/Access/SQL)
Downloads
OPEN EXCEL
Excel 2003 style menu in Excel 2007
Stocks Tracker
World
United States
NASDAQ
Dow Jones
London
Paris
German
Australian
European
Shanghai
Singapore
Formulas
BEGINNER
Absolute/Relative References
Nested Formulas
Arithmetic Operations(+,-,/,*)
Text Functions
CHAR
CLEAN
TRIM
LEFT
RIGHT
REPT
REPLACE
Mathematical Functions
ABS
FLOOR
CEILING
ROUND
INT
SIGN
ODD
EVEN
PI
TRUNC
Information Functions
ISBLANK
ISERR
ISERROR
ISEVEN
ISLOGICAL
ISNA
ISREF
ISTEXT
DATE/TIME Functions
SECOND
MINUTE
HOUR
DAY
MONTH
YEAR
TODAY
NOW
Statistical Formulas
SMALL
LARGE
MAX
MIN
MEDIAN
AVERAGE
SUM
INTERMEDIATE
Auditing Formulas

Unwinding the Nested Formula and Conditional Formatting used in the Sample Dashboard
FORMULA USED:
=SUM(OFFSET(B6,0,0,1,MATCH($B$3,$B$5:$M$5,0)))
1. MATCH Function
Syntax: MATCH(lookup_value,lookup_array,match_type)
Definition: It returns the relative position of an item in an array that matches a specified value in a
specified order. It is used instead of the LOOKUP functions when we need the position of an item in
a range instead of the item itself. (Source: Excel Help on Match Function)
Lookup_value is the value you use to find the value you want in a table.
Lookup_array is a contiguous range of cells containing possible lookup values. Lookup_array must be
an array or an array reference.
Match_type is the number -1, 0, or 1. Match_type specifies how Microsoft Excel matches
lookup_value with values in lookup_array.
If match_type is 1, MATCH finds the largest value that is less than or equal to
lookup_value. Lookup_array must be placed in ascending order: ...-2, -1, 0, 1, 2, ..., A-Z,
FALSE, TRUE.
If match_type is 0, MATCH finds the first value that is exactly equal to lookup_value.
Lookup_array can be in any order.
If match_type is -1, MATCH finds the smallest value that is greater than or equal to
lookup_value. Lookup_array must be placed in descending order: TRUE, FALSE, Z-A, ...2, 1,
0, -1, -2, ..., and so on.
If match_type is omitted, it is assumed to be 1.
IN OUR EXAMPLE, we're using MATCH($B$3,$B$5:$M$5,0), which as per the definition of MATCH
function returns the index number / position of cell B3 in the array B5:M5. So, if you'll choose APR, it
will return 1, in case of AUG, it will return 5 and so on....Please note, we choose 0 for the exact
match as well.

Trace Errors/Smart Tag


Text Functions
MID
SUBSTITUTE
LEN
FIND
VALUE
Mathematical Functions
QUOTIENT
ROUNDDOWN/UP
MOD
POWER
MROUND
Logical Functions
SUMIFS
COUNTIFS
AVERAGEIF
IF
AND
NOT
OR
IFERROR Function
Date/Time Functions
TIMEVALUE
DATEVALUE
DATEDIF
WORKDAY
WEEKNUM
Information Functions
COUNT
COUNTA
COUNTBLANK
ERROR.TYPE
N
NA
TYPE
ADVANCED
Array Formulas(CSE)
User Defined Functions(UDF)
Lookup Functions
VLOOKUP
HLOOKUP
MATCH
INDEX
CHOOSE
OFFSET Function
INDIRECT Function
FREQUENCY Function
Statistical Functions
FORECAST
GROWTH
TREND
Mathematical Functions
FACT
PERMUT
COMBIN
MINVERSE
MMULT
RANDBETWEEN
Database Functions
DAVERAGE
DCOUNT
DSUM
DGET
DMAX
DMIN
Date/Time Functions
EOMONTH
NETWORKDAYS

2. OFFSET Function
Here we used Type-IV OFFSET Function which takes single cell as input but returns a range of
single/multiple cells depending on the return value of MATCH function.
In our example, we're using OFFSET(B6,0,0,1,MATCH($B$3,$B$5:$M$5,0)). So, if we choose B3 as APR,
it will be OFFSET(B6,0,0,1,1) which means B6, similarly if we choose B3 as OCT, it will
be OFFSET(B6,0,0,1,7) which means B6:H6.
Read the full article on OFFSET Function here.

3. SUM Function
Definition: Adds all the numbers in a range of cells.
Syntax: SUM(number1,number2, ...)
Number1, number2, ... are 1 to 255 arguments for which you want the total value or sum.
Remarks
Numbers, logical values, and text representations of numbers that you type directly into
the list of arguments are counted. So, "5" will become 5, TRUE will become 1 and False will
become 0.
If an argument is an array or reference, only numbers in that array or reference are
counted. Empty cells, logical values, or text in the array or reference are ignored.
Arguments that are error values or text that cannot be translated into numbers cause
errors. If there is any #NA, #VALUE etc. error is present in the reference range, it will
return the same error ignoring every other thing present in the reference range. (Source:
MS Excel Help on SUM Function)
In our Sample dashboard, we are using SUM(OFFSET(B6,0,0,1,MATCH($B$3,$B$5:$M$5,0))), so it will
return the cumulative sum of the sales of Wine up to the selected month in cell B3.

4. Conditional Formatting
Formula Used: =IF(B$5<=$B$3,1,0)
Note: The game of this conditional formatting lies in what is absolute reference and what is relative
reference.
Applied on: =$B$6:$M$11

Click here to DOWNLOAD THE DASHBOARD. Happy Excel Dashboarding :)

How to use?
1. Macro Recorder
2. Excel VBA Macro
3. Formulas
4. User Defined Functions(UDFs)

17 ways to OPTIMIZE VBA Code for FASTER Macros

5. Event Macros
6. Charts
7. Header & Footer

BONUS VBA MACRO: Excel 2003 Style menu in Excel 2007 / 2010

8. Name Manager
9. Formula Auditor
10. Sort

Are you going for an interview ?


3 things to remember before Excel VBA Interview
50 Excel VBA Interview questions

11. Remove Duplicates


12. What-If Analysis
13. Subtotal
14. Scenarios
15. Data Consolidation

or looking for a job ?


Excel, Access, SQL, VBA, MIS, Reporting and Data Analysts Jobs

16. Protection Features


17. Proofing Features
18. Sharing Features
19. Workspace

Shrink or Reduce the size of Excel Workbook without losing data

20. Install Excel Add-in


Sample Dashboards
Cumulative Sales Dashboard
Miscellaneous
Contact a Trainer
Recommended Books
Sponsored Products
Ask your Excel Query

Learn: VLOOKUP

OFFSET

Custom Format

Array Formula

Anonymous said...
Wow, it's good but I need more elaboration on Conditional formatting. Thanks.
March 6, 2011 at 10:26 PM

andrei said...
is any possibility to achieve something like that: if in April, the product "x" shows there, if not,

Anda mungkin juga menyukai