0% found this document useful (0 votes)
38 views65 pages

Ebook of Excel Formulas-Index

Excel Formula

Uploaded by

Agung Widi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views65 pages

Ebook of Excel Formulas-Index

Excel Formula

Uploaded by

Agung Widi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 65

Ebook of Excel Formulas

(Sept-2019)

Excel Solutions with Advanced Formulas


An Essential Resource for Excel Users
1050+ Formulas Across 240+ Tabs, with Explanation
Illustrated Live in Excel Workbook

Solve Real Life Problems - Resolve Complex Scenarios

Author: Amit Tandon, ExcelAnytime.com


http://www.excelanytime.com

Order the Latest Version of Ebook Today: https://www.excelanytime.com/excel_models.php

Please send your Feedback and suggestions to: [email protected]

© 2019 Amit Tandon / Excelanytime.com

Disclaimer: The Ebook content & information is made available for your general information purpose only. I / we reserve the
in the Ebook, in my / our sole discretion and without any notice. Though I / we endeavor to provide content, information, for
express or implied, regarding the accuracy, correctness, completeness, reliability, usability or suitability of this information
solutions is therefore strictly at your own risk. In no event shall I / we be liable to you or any third-party for any loss or dama
whatsoever arising from loss of data or loss of profits arising out of or in connection with the use of this Ebook or content t
Target Users: The Ebook does not teach basic Excel - it uses Excel Formulas, many of them are Advanced Formulas
suitable for Excel Users who are already familiar with Excel Basics and Functions. Regular Excel users and Excel
Professionals should find it particularly useful.

Ebook: This Ebook is all about providing Excel Solutions using Formulas - it illustrates using Excel Formulas to
help Solve Real-Life Problems. I believe that using Formulas continues to be the most important facet of Microsoft
Excel, and that Excel without formulas might be unthinkable. Formulas continue to be the primary mode of
providing Solutions in Excel. Towards this I have attempted to cover a wide range of aspects and functions, with a
Live illustration in this Excel Workbook of providing Solutions using Excel Formulas.

Special Emphasis has been given to Array Formulas, which is a critical and powerful tool in Excel, which enables
multiple calculations (involving multiple rows-columns) simultaneously, and obviate the need to use multiple
formulas.

Topics: The Ebook covers a wide range of topics: Extract a Unique List, Duplicates List, Sort / Rank Values, Count
Uniques / Duplicates, Sum Uniques, Count / Countif / Sum / Sumif / Average / Averageif - Multiple Criteria, Non-
Contiguous Range(s) - Count / Sum / Average / Match, Sumif / Countif Hidden Cells / Rows, Dates / Days / Months /
Time Formulas, Return Column / Row Headers, Working with Arrays - Multiple Array Match, Dynamic Range
Reference, Most Common Occurrences / Mode, Sequences - Increment / Repeat / Transpose, String & Text
Formulas, Convert / Replace Letters to Numbers, Index-Small / Aggregate, Index-Match, Nth Smallest / Largest /
Positive / Negative, Slab Rates - Progressive Splits - Cut Offs, Closest Match, Skip Error Values in SUM / AVG / MAX-
MIN, Join / Combine Multiple Cells, ...

on / Excelanytime.com

se only. I / we reserve the right to change, amend, withdraw, delete or add any content, information, material or service contained
content, information, formulas & solutions to the best of my / our ability, I / we make no statements, promises or warranties,
ability of this information, content, formulas & solutions. Any reliance you place on such information, content, formulas &
arty for any loss or damage, including without limitation, indirect or consequential loss or damage, or any loss or damage
of this Ebook or content therein.
This is the Full Index of "Ebook of Excel Formulas" wherein the links / tabs have been disabled. Refer Next Sheet name
INDEX
SN Tab Name - Click to View
243
Commonly Used Formulas:
1 #ImpExcelFormulas!$A$1
Unique List:
2 #UniqueList_OneColumn!$A$1
3 #UniqueList_Criteria_OneColumn_1!$A$1
4 #UniqueList_Criteria_OneColumn_2!$A$1
5 #UniqueList_SkipSpecific_OneCol!$A$1
6 #UniqueList_BasedOn2Columns!$A$1
7 #Unique_AppearIn1ColumnOr2Column!$A$1
8 #Unique_Sorted_AppearIn1Or2Cols!$A$1
9 #Uniques_Sorted_MultiRowColRange!$A$1
10 #UniqueList_5Left_VariableLeft!$A$1
11 #ListColumnValuesAppearingOnce!$A$1
Duplicate List:
12 #Duplicates_SingleColumn!$A$1
13 #Duplicates_NonDuplicates_2Cols!$A$1
14 #Duplicates_Uniques_2ColumnCombo!$A$1
Sort / Rank Values:
15 #SortColumn_Uniques_Duplicates!$A$1
16 #SortColumn_BothTextAndNumbers!$A$1
17 #SortRank_IgnoreErrors!$A$1
18 #Rank_UniqueCombos_ArrayCriteria!$A$1
19 #Rank_MultiCategories_BlankCells!$A$1
20 #ConsolidatedRanking_MultiColumn!$A$1
21 #RankArrayValues_CustomAsceOrder!$A$1
22 #SplitValues_GroupRanks!$A$1
Count Uniques / Duplicates:
23 #Count_Uniques_Duplicates!$A$1
24 #CountUniques_Condition!$A$1
25 #Count_UniqueMonthsFromDates!$A$1
26 #CountUniques_Only1OrBothColumns!$A$1
27 #CountMultipleOccurrencesOnce_1!$A$1

28 #CountMultipleOccurrencesOnce_2!$A$1

29 #CountUniques_ArrayCriteria_OR!$A$1
30 #CountUniques_NameCorrMultiVals!$A$1
31 #CountUniques_MultiConds_AND_OR!$A$1
32 #Count_MultipleValuesInSameRow!$A$1
33 #Count_ConsecutiveOccurrences!$A$1
34 #Count_ConsecutivePositivesNegat!$A$1
35 #Count_ConsecutiveIncreasingVals!$A$1
36 #Count_ConsecutiveIncreasingBy1!$A$1
37 #CountContinuousBlanksAppearLast!$A$1
38 #CountGroups_ConsecutiveOccurr!$A$1
39 #CountGroups_Consec_SkipWeekends!$A$1
40 #CountRows_MinOneOccurrence!$A$1
41 #CountUniqueColumns_MinOneValue!$A$1
Sum Uniques:
42 #Largest3SUM_CorrespMultiNames!$A$1
43 #Sum_Uniques_Duplicates_1stOccur!$A$1
44 #Sum_Uniques_2Columns_1stOccurr!$A$1
Count / Countif:
45 #CountOccurrencesOfArrayValues!$A$1
46 #CountCells_SpecificMultiLetters!$A$1
47 #CountIf_MultiCriteria_AND_OR_1!$A$1
48 #CountIf_MultiCriteria_AND_OR_2!$A$1
49 #CountIfs_MultiArrayCriteria!$A$1
50 #CountOccurrences_AllColumnCells!$A$1
51 #CountOccurr_IgnoreCommaDotExcla!$A$1
Count Non-Contiguous Range(s):
52 #CountUniques_MultiConds_AndOr!$A$1
53 #CountIfs_NonContigRng_WildCards!$A$1
54 #CountNonBlanks_NonContigCells!$A$1

55 #CountOccurrences_NonContigRange!$A$1
56 #CountArrayCrit_RelateCorrespNo!$A$1
Sumif / Countif Hidden Cells / Rows:
57 #SumifCountif_HideRowsCommand!$A$1
58 #SumifCountif_HideRowsAutoFilter!$A$1
Sum / Sumif:
59 #SumIfs_MultiCriteria_AND_OR_1!$A$1
60 #SumIfs_MultiCriteria_AND_OR_2!$A$1
61 #SumIfs_AND_OR_2Columns!$A$1
62 #Sumif_MultiMonths_DateRange!$A$1
63 #Sum_MaxValue_EachRowOfMultiCols!$A$1
64 #SumIf_MultiCriteria_PartMatch!$A$1
65 #SumAdjacentCells_MultiColumns!$A$1
66 #SumLast12_ExclLargestLowest!$A$1
Sum Non-Contiguous Range(s):
67 #SumIfs_NonContigRng_WildCards!$A$1
68 #Sum_NonContiguousRanges_1!$A$1
69 #SUM_NonContiguousRanges_2!$A$1
70 #SUM_MultipleNonContiguousCells!$A$1
71 #Sum_Largest_NonContiguousCells!$A$1
72 #Sum_Smallest_NonContiguousCells!$A$1
73 #Sum_Count_DiagonalCells!$A$1
Average / Averageif:
74 #Avg_Last10_ExclLargestLowest!$A$1
75 #Average_Largest5Values_MatchId!$A$1
76 #Avg_Last20_PositivesNegatives!$A$1
77 #Average_ConsecutiveNegatives!$A$1
78 #Average_1st10Values_SkipZeros!$A$1
79 #Average_SpecificTextHalfValue!$A$1
Average Non-Contiguous Range(s):
80 #AvgNonContiguousCells_1!$A$1
81 #AvgNonContiguousCells_2!$A$1
Match using Non-Contiguous Range(s):
82 #NonContiguousCells_Match!$A$1
83 #NonContiguousRanges_IndexMatch!$A$1
Dates - Days - Months:
84 #Dates_Days_BasicFormulas!$A$1
85 #Date_PreviousNextSunday!$A$1
86 #Date_LastSundayInMonth!$A$1
87 #Date_FirstSundayInMonth!$A$1
88 #ListAllSundaysInMonth!$A$1
89 #DaysInMonth_StartEndDate_1!$A$1
90 #DaysInMonth_StartEndDate_2!$A$1
91 #DaysInMonth_MultiStartEndDates1!$A$1
92 #DaysInMonth_MultiStartEndDates2!$A$1
93 #UniqueDays_MultiStartEndDates!$A$1
94 #OverlapDates_MultiStartEndDates!$A$1
95 #Sum_ConsecutiveDaysEndStartMatc!$A$1
96 #RepeatId_EachYrInStartEndDates!$A$1
97 #CheckDate_MultiStartEndDates!$A$1
98 #MatchDateWithName_MultiStartEnd!$A$1
99 #NamesInMonth_MultiStartEndDates!$A$1
100 #Rolling12Mths_DatesDiff!$A$1
101 #Next5Dates!$A$1
102 #Average_AllMonths_TillPrevMonth!$A$1
103 #ListPositionDateIncrementChange!$A$1
104 #Sum_Weekdays_Weekends!$A$1
105 #DatesClassify_WeekNo_DayOfWeek!$A$1
106 #DatedIf_YrsMthsDaysBtwn2Dates!$A$1
107 #EndDateTime_FromStartDateTime!$A$1

108 #StartDateTime_FromEndDateTime!$A$1
Time:
109 #TimeDiff_TimeRanges_MatchTime!$A$1
110 #TimeDiff_MultiStartEndTimes!$A$1
Return Headers of Matching Value:
111 #Headers_1stLast_MatchingValue!$A$1
112 #Headers_1stLast_ClosestValue!$A$1
113 #MatchValue_ReturnAdjacentCell!$A$1
Multiple Array Match:
114 #ExactCaseSensMultiCellsMatch!$A$1
115 #ReturnIds_AnyRowCellValueMin100!$A$1
116 #MatchCol_MultiColsArray!$A$1
117 #MatchRow_MultiRowArray!$A$1
118 #NewItem1stSoldPrevAllBlankCount!$A$1
119 #Match2ValuesInSameRow!$A$1
120 #SearchMultiValues_EachCellColmn!$A$1
121 #MatchMutlipleValues_3Columns!$A$1
122 #MatchMultiValuesCombo_SameIndex!$A$1
123 #Match_MultiColumns_AdjacentCol!$A$1
124 #MultiRowColumnMatching!$A$1
125 #MultiArrayMatch_Match2Arrays_1!$A$1
126 #MultiArrayMatch_Match2Arrays_2!$A$1
127 #MultiArrayMatch_2Arrays_2Cols!$A$1
128 #MultiArrayMatch_2Arrays_MaxDiff!$A$1
129 #MultiArrayMatch_ColRow_1!$A$1
130 #MultiArrayMatch_ColRow_2!$A$1
131 #ConsecutiveOccurrencesMultiRows!$A$1
132 #SumCorrespColsRowsInRange!$B$1
133 #MaxSum_CorrespondngCells2Arrays!$A$1
134 #ArrayLookup!$A$1
135 #LowestHighestCorrespValue_Array!$A$1
136 #Match3CellValuesConsecutively!$A$1
137 #Exactly2BlanksBetweenNonBlanks!$A$1
138 #MultiConvergingYrs_StartYrsGaps!$A$1
139 #SumProduct_MultipleArrays!$A$1
Dynamic Range Reference:
140 #DynamicRangeReference_1!$A$1

141 #DynamicRangeReference_2!$A$1
142 #DynamicRangeRef_BtwnBlankCells!$A$1
143 #DynamicRange_Lookup!$A$1
144 #DynamicRange_CommSlabs!$A$1
145 #DynamicRng_StartEndCell_SumAvg!$A$1
146 #CountCells_ToEqualOrCrossSum!$A$1
147 #ReferLast10CellsInFormula!$A$2
148 #DynamicLast5Cells_Average!$A$1
Most Common Occurrences - Mode:
149 #MostCommonValue_Conditions!$A$1
150 #First3MostCommonValues_MODE!$A$1
151 #MostRepeatedValue_ForGivenName!$A$1
Sequences - Increment, Repeat, Transpose:
152 #IncrementNumbers_Sequence_1!$A$1
153 #IncrementNumbers_Sequence_2!$A$1
154 #RepeatEachValue_Add3Strings!$A$1
155 #RepeatEachValue_FixedTimes!$A$1
156 #RepeatEachValue_SpecificTimes!$A$1
157 #RepeatNamesPerCellCount2Cols!$A$1
158 #MultiRowColRange_ToSingleRow!$A$1
159 #SplitColumnToMultiColumns!$A$1
160 #Transpose_SingleColumnToRows!$A$1
161 #Transpose_AlternateColumnsRows!$A$1
162 #Transpose_MultiColsRows_OneRow!$A$1
163 #Transpose_SingleColumn_MultiRow!$A$1
164 #Transpose_Repeat_ColumnsRows!$A$1
165 #MissingNos_ConsecutiveNosList!$A$1
166 #MissingValuesInList_Count!$A$1
167 #ConsecutiveListMultiStartEndNos!$A$1
168 #ProgressivelyIncrement2Values!$A$1
169 #IndexNo_EachUniqueNameInColumn!$A$1
170 #IncrementColRowRef_CopyDownForm!$A$1
String & Text Formulas:
171 #SplitStringIntoCells_TextNos!$A$1
172 #ExtractNthSubString_FromString!$A$1
173 #ExtractCommaSeparatedSubStrings!$A$1
174 #SplitStringsInRng_SeparateCells!$A$1
175 #PositionOfNthOccurrenceInString!$A$1
176 #PositionLastOccurrenceInString!$A$1

177 #ExtractSubStringAfterLastSpace!$A$1
178 #ExtractTextBetweenBrackets!$A$1
179 #SplitStringIn2Parts_Separator!$A$1
180 #ExtractSubString_Start_EndText!$A$1
181 #StringPrecedingStarting_1stNumb!$A$1
182 #ExtractSubStringAfter1stLetter!$A$1
183 #Avg_NumbersPreceding1stLetter!$A$1
184 #ExtractSubStringAfterLastNumber!$A$1
185 #ExtractNumberPrecedingSpecText!$A$1
186 #ExtractTextPrecedingSpecText!$A$1
187 #Position_1st_Last_DigitInString!$A$1
188 #ExtractLastNumberInString!$A$1
189 #Position_1st_Last_TextInString!$A$1
190 #ExtractLast_Text_SubString!$A$1
191 #NumberPreceding1stTextCharacter!$A$1
192 #Extract1stDigit_Number_InString!$A$1
193 #Extract1stAlphaNumSubString!$A$1
194 #SplitString_ToSubStrings!$A$1
195 #SumNosBeforeAfter1stSpace!$A$1
196 #ExtractNumbers_AlphaNumeric!$A$1
197 #ExtractText_AlphaNumeric!$A$1
198 #SumNumbersPrecededByLetter!$A$1
199 #ExtractDateTimeFromString!$A$1
200 #SplitCodesTelephoneNo_CodeList!$A$1
201 #SplitString_50CharsEachCell!$A$1
202 #IncrementEachValueInString!$A$1
203 #StringFormulas!$A$1
204 #1st2ndLastName_Reverse_Extract!$A$3
Convert / Replace Letters to Numbers:
205 #ConvertLettersToCorrespNos_SUM!$A$1
206 #ConvertLettersToSequenNos_SUM!$A$1
207 #ReplaceLetters_CorrespondingNos!$A$1
208 #ReplaceEachNumberWithLetter!$A$1
Index-Small / Aggregate:
209 #Index_Small_Aggregate_1!$A$1
210 #Index_Small_Aggregate_2!$A$1
211 #Index_Small_Aggregate_3!$A$1
212 #VlookupMultipleValues!$A$1
213 #MissingValuesInMultiColumnRange!$A$1
214 #Largest5_MultipleSameValues!$A$1
215 #Largest5_IgnoreDuplicateValues!$A$1
Index-Match:
216 #IndexMatch_SpecificCol_LastCol!$A$1
217 #IndexMatch_MultipleCriteria!$A$1
218 #IndexMatch_MultiConditions!$A$1
219 #IndexMatch_RowAndColumn!$A$1
220 #IndexMatch_MatchRowInColumn!$A$1
221 #MatchingRow_1stLastNonBlankCell!$A$1
222 #IndexMatch_IsnumberSearch!$A$1
223 #MatchMinMaxInArray_WithinRange!$A$1
224 #1stOccurr_2Cutoffs_ReturnCutoff!$A$1
Nth Smallest, Largest, Positive-Negative:
225 #NthLargest_Smallest_MultiCond!$A$1
226 #LastNth_PositveNegativeValue!$A$1
227 #Second_SecondLast_Nth_Match!$A$1
228 #SearchBottomUp_NthExactMatch!$A$1
Slab Rates - Progressive Splits - Cut Offs:
229 #Tax_SlabRates_Incremental!$A$1
230 #SplitUnitsProgressively_1!$A$1
231 #SplitUnitsProgressively_2!$A$1
232 #CutOffValues_MultiSlabs_Price!$A$1
Closest Match - Match within Range:
233 #ClosestValueInArrayToSpecValue!$A$1
234 #1stValueBtwnMinMax_1stBelowMin!$A$1
Skip Error Values in SUM, AVG, MAX, VLOOKUP:
235 #SkipErrors_SumAvgMin_Aggregate!$A$1
236 #SkipErrors_Vlookup_IndexMatch!$A$1
Join / Combine Multiple Cells:
237 #CombineMultipleCells_In1Cell_1!$A$1
238 #CombineMultipleCells_In1Cell_2!$A$1
239 #MultipleSmallValuesInSingleCell!$A$1
240 #CombineCells_Reverse1stLastName!$A$1
241 #TextJoin_ReturnMultiMatchingIds!$A$1
MIN/MAX/MATCH/LOOKUP/CHOOSE vs IF/THEN:
242 #IfThen_MinMaxMatchChooseLookup!$A$1
243 #OverduePayables_AvailableCash!$A$1
l Formulas" wherein the links / tabs have been disabled. Refer Next Sheet named "Illustrated_Index" to Access a Sample of Actual Linked Tabs
You may browse the Titles and also search by keyword(s)
Tab Title

Commonly used Excel Formulas: First / Last Number or Text in Column - Return Value or Row Number; using 2 as the lookup_value in LOOK
SUBTOTAL with OFFSET, Dynamic Range;

Return Unique List of values from a Single Column - Multiple Occurrences to Appear only Once
Return Unique List of values from Column A (Multiple Occurrences Appear only Once), for specific Corresponding Column B values

Return Unique List of values from Column A (Multiple Occurrences Appear only Once), for specific Corresponding Column B Month Number /

Extract Unique List of values from a Column - Skip Specific Value(s)


Extract a Unique List of Values based on 2 columns, where Multiple Occurrences Appear only Once
Return Unique List of values which appear only in One Column and NOT the other - or Unique List from Both Columns
Return Unique List of values, Sorted in Ascending Order, which appear only in One Column and NOT the other
Sorted List, in Ascending Order, of Unique Values from Multi Row-Column Range, skip blank cells.
Extract Unique List from a Column comprising of: (i) Fixed Length of 1st 5 Characters of each cell string; or (ii) Variable Length of Characters
the 1st "-" (Dash)
Extract Values which appear ONLY once (ie. Unique Values) from a Column

Extract Duplicates - Extract column Values which have multiple occurrences


Extract Duplicates / Non-Duplicates in 2 Columns - which are Common / Not-Common in 2 Columns
Extract Duplicates / Uniques in 2 Columns Combined (Values in 2 columns are considered together)

Sort Column values in Ascending / Descending Order, Retain Duplicates or Extract only Once (ie. Uniques)
Sort Column values, both Text & Numbers, in Ascending Order, Retain Duplicates or Extract only Once (ie. Uniques)
Rank & Sort Numbers in a Column, Ignoring Error Values
Rank, in Ascending Order, for Unique Values considering 2 columns (both Year and Week Number) together
Rank Values within Each Category - give Average Rank for Same Values - Blank Cells considered as Highest / Lowest Values
Return Consolidated Ranking in Multiple Columns
Rank Text Values in Ascending Order / Custom Order - Multiple Occurrences to Increment Rank
Split Values into Multiple Equal Groups / Ranks

Count Unique Values / Duplicate Values in a Column


Count Unique values in a Column, with Condition(s) - each distinct value is counted only once irrespective whether it appears once or multiple
Count Unique Months, from an Array of Dates in a Column
Count Uniques: (i) which appear in BOTH Columns; (ii) which appear in 1 Column and NOT in the Other Column
Count Occurrences of a Value in Whole or in Part: (i) Count Once if Occurrence in Same Row of One or Both columns or (ii) Count Twice if O
Columns
Count Values where Multiple Occurrences are (i) Counted Once (Unique values) or (ii) Counted as many times they Occur - Condition of "Yes
Columns

Count Unique column A values (Multiple Occurrences of a Value are Counted Once) where column B values Match ANY of the Array values (

Count Unique Names (Multiple Occurrences of a Name are Counted as One) in column, where each Name corresponds to specific Multiple V
Count Unique values in column A, subject to Multiple Conditions - AND / OR
Count Number of Rows in a Range where Multiple Values appear atleast once in the Same Row
Count Number of Groups of Consecutive Occurrences of a value in a Column; Count Maximum Number of Consecutive Occurrences of a val

Count Groups of Consecutive Positive / Negative / Zero Values; Average (or Maximum) Number of Cells in Positive / Negative / Zero Value G
Count Number of Times, specific number of Consecutive Increasing Values, appear in a Column
Count Max Consecutively Incrementing Dates by 1, for a specific name, in a Column
Count Number of Continuous Non-Blank cells which appear Last
Count Number of Groups, for Consecutive Occurrences of a Value
Count Number of Groups of Consecutive Occurrences, Ignoring Weekends
Count Number of Rows with occurrence of atleast one 1
Count of Number of Unique Columns with atleast one Value, corresponding to a Specific Id.

SUM Multiple Values corresponding to a Name, and Determine the 3 Largest SUMS - from an Array of Multiple Names each having Multiple O
SUM Unique List of Values only - for Multiple Occurrences of a value consider ONLY the First Occurrence; SUM corresponding Values for Na
only Once, or (ii) appear Multiple Times.
SUM Unique List of Values (2-Column) - for Multiple Occurrences of a value consider ONLY the First Occurrence

Count Multiple Occurrences of Array Values in a Range; Count Duplicates in 2 Columns.


Count the number of Cells containing Specific Letter(s) / Character(s), as part of a String
COUNTIF with Array Criteria & OR / AND: Combine criteria from multi-columns using OR and AND.
COUNTIFS (or Sumproduct) for Multiple Columns, Array Criteria, using AND / OR conditions
CountIf for Multiple Array Criteria - uses both AND / OR, for Part and Whole Match

Count Occurrences of a Value in all cells of a Column, either as a whole or in part - value may be appear multiple times in a cell, separated by

Count Occurrences of a Word in a column - ignore preceding or trailing Comma(s) or Dot(s) or Exclamation(s).

Counts Unique Values in a Column per Multiple Conditions (AND / OR) in Multiple Non-Contiguous Columns
COUNTIF for Non-Contiguous Cells in "Range" or "Criteria", COUNTIF with Wildcard Characters, COUNTIF for Date Range(s)
Count the number of Non-Blank cells in Non-Contiguous Cells / Ranges, in a Row
1) Count number of cells where a value appears atleast once (either individually or as part of a string), in Multiple Non-Contiguous Ranges; 2)
of the Value;
Countif with Multiple Criteria - multiply each occurrence with a value corresponding to the respective Criteria and return SUM

Sum, SumIf, CountIf, Count Uniques: Using SUBTOTAL function to Exclude / Include Cells Hidden with the Hide Rows command.
Sum, SumIf, CountIf, Count Uniques: Exclude / Include Cells Hidden by a FILTER

SUMIF with Array Criteria & OR / AND: Combine criteria from multi-columns using OR and AND.
SUMIFS (or Sumproduct) for Multiple Columns Criteria, using EITHER / OR conditions, Non-Contiguous Cells
SUMIF - Either / Or for 2 Columns separately - if EITHER Column A OR Column B contain respective values, then return SUM of Column C
Return SUM of values corresponding to One or Multiple Months, Date Range, and Multiple Names - using SUM, SUMIFS or SUMRODUCT
SUM Max values of Each Row, in a Multiple Column Range
SUMIF - SUM corresponding column B cells where column A cells contain any of the Multiple Values (C2:C5) in Full or in Part
SUM Adjacent Cells in Multiple Columns for a Specific Value
SUM of Last 12 values in a Column; Sum Largest 5 out of Last 12 values; SUM last 12 values Excluding Highest / Lowest values

SUMIF for Non-Contiguous Cells in "Range" or "Criteria", SUMIF with Wildcard Characters, SUMIF for Date Range(s)
SUM Non-Contiguous Ranges of a Column - SUM EACH block of consecutive cells, starting from specific position, & skip specific number of
SUM Non-Contiguous Ranges of a Column - SUM of ALL blocks of consecutive cells, starting from specific position, & skipping specific numb
SUM - Assign separate Values to Non-Contiguous Cells and return SUM
SUM Largest 4 Values in Non-Contiguous Cells of a Row
SUM of Smallest 3 Non Contiguous Cells (with values above zero or non-blank cells) with Uneven Intervals
Sum / Count Diagonal Cells in a Range

AVERAGE of Last 10 values in a Column - Exclude Highest / Lowest


AVERAGE Largest 5 Values in a Column, per Matching Id
AVERAGE of Last 20 values in a Column - Only Positives / Only Negatives
AVERAGE of Consecutive Negative Numbers (ie. if Consecutive more than Once atleast) in a Column (A2:A30)
AVERAGE of the First 10 Values in a Column - Exclude / Include Zeros; consider Blanks as Zeros or Skip Blanks; Ignore Error values.
AVERAGE Column A Values, and if "<" Occurs with the Number, then consider Half the Number's Value

AVERAGE of Non Contiguous Cells which are Unevenly Distributed


AVERAGE of Non Contiguous Cells which are Evenly Distributed

Match value in Multiple Non-Contiguous Cells - Evenly Distributed or Un-Evenly Distributed cells
Use Index-Match functions on Mutiple Non-Contiguous Ranges (un-evenly distributed) in a column

Dates & Days, Some Basic Formulas


(i) Return Date of Previous Sunday or Same Date if Sunday; (ii) Return Date of Previous Sunday - only Previous Date and not Same Date eve
Return Date of Last Sunday / Monday / Tuesday / Wednesday / Thursday / Friday / Saturday in a Month.
Return Date of First Sunday in a Month.
List All Sundays (or Mondays / Tuesdays / Wednesdays / Thursdays / Fridays / Saturdays) in a Month
Number of days in a Month bewteen Start Date & End Date

Number of Days (ALL Days or WORKING Days) in each Month multiplied by the Month's Daily Rate, between corresponding Start Date & En

Number of Days between Multiple Start & End Dates, which fall within a specified Month, for specified Name - Count of ALL dates (including o
Number of days falling in a Month bewteen Multiple Start Dates & End Dates - Count of ALL dates (including overlapping) or only Unique Date
Count the number of Unique Dates (exclude overlapping dates) between Multiple Start-End Dates
Count the Number of Dates which Overlap (ie. occur more than once) between Multiple Start-End Dates
Sum Number of Consecutive Days for a specific Name where End Date and Next Start Date Match
Repeat Id, for each Full or Part Year, falling between its corresponding Start and End Dates
Check if Date falls between an Array of Multiple Start-End Dates, and return corresponding Id
Match if Date corresponding to a Name, falls within an Array of Multiple Start-End Dates
Count Number of Names within a Month, between Multiple corresponding Start-End Dates
Dynamic Rolling 12 months - Total Number of Days, between Each Start & End Date, within past 12 months
Return NEXT 5 Dates after a Specified Date - return column A Names corresponding to the NEXT 5 Dates in column B after cell D2 date.
Calculate Average of ALL Months, till Previous Month (relative to cell D2 month), starting from January
List All Positions where a Date Increments or Changes in a Column
Sum Weekdays & Weekends separately for each Name per given Dates
Classify Dates per Week Number and Day of the Week
DATEDIF Function Calculates the Number of Years, Months, or Days between Two Dates - Start and End Dates.

Determine End Date (& Time) from Start Date (& Time) and Duration (Work Hours), per given Daily Start & End Time, Lunch Break, excluding

Determine Start Date (& Time) from End Date (& Time) and Duration (Work Hours), per given Daily Start & End Time, Lunch Break, excluding
Time Difference, Add Time, Time Ranges, Match Current Time
Calculate Time Difference between Adjacent Cells for Multiple Start-End Times, return SUM

Column & Row Headers of a Value having Multiple Occurrences in a Range, where it appears First or Last
Column & Row Headers for the Closest Match of a Value in a Range - Multiple Occurrences of the Nearest / Closest Value
Match a Value in a Multi-Column Range, and return corresponding Value from Adjacent Column

Match Position of Occurrence of Text in Multiple Cells, return SUM of Corresponding Values - Exact / Case-Sensitive Match
Return all IDs where any Cell in the Corresponding Row has a Value of 100 or more
Match Column values with Multiple Columns - Array Matching - Number of Columns in a Range where All Cells Match with All cells of a separ
Match Row values with Multiple Rows - Array Matching - Number of Rows in a Range where All Cells Match with All cells of a separate Row.
Determine New Items Sold in a Day - Items 1st Sold on a Day (Mon to Sat) which were not sold on Previous Days
Match Occurrence of 2 Values in Same Row (within a range)
Return Rows from a Column which contain Specific Multiple Values (Array Match)
Multiple Values Match - Match if NONE or ALL 3 values appear in 3 Columns respectively.
Match Multiple Values Combo to same Index
Match Text in Multiple Columns and return corresponding Value from Adjacent Column
Multiple Rows and Columns Matching, consider Non-Congruous Columns
Multi Array Match - Match 2 Arrays in Varying Order
Multi Array Match - Match 2 Arrays in Varying Order
Multi Array Match - Match 2 Arrays, 2 columns Combo, in Varying Order
Multi Array Match - Maximum Difference in Values of 2 Columns Corresponding to Same ID, where IDs are in Varying order
Array Match - Match Row Array Names with Column Array Names - return SUM of corresponding Values from Adjacent Column
Array Match - Match Column Array values with Row Array values, return 1st or Last Match
Determine rows where "Y" Appears in Consecutive Cells - Return column A Names corresponding to rows with specific number of Consecutiv
Determine Occurrence of a Value in a Multi Row-Column Range, and return SUM from Corresponding Columns (or Rows) of Adjacent Range
Return SUM of Largest 2 Corresponding Cells, in 2 Distinct Arrays Corresponding to 2 Distinct Dates
Array Lookup - Lookup Corresponding Value, from an Array Grouping
Lowest / Highest corresponding Value in Array - Return Lowest or Highest Grade for a Student within Multiple Subjects
Match Occurrence of 3 Cell Values Consecutively in a Column (Array)
Check for exactly 2 Consecutive Blank Cells, inbetween Non-Blanks, in a Row.
Multiple Converging Years Overlapping with a Specific Year - Multiple Start Years have corresponding Periods & determine if a Start Year con
Year
Expenses on Multiple Holidays for Multiple Days - use SUMPRODUCT

Dynamic Range Reference for COUNTIF, Start Cell Resets on Appearance of a Value after Blanks ie. Dynamic Range Starts from every Non
Dynamic Range Reference for COUNTIF - Variable number of Cells between 2 Occurrences of a Specific Text - Dynamic Range Starts from
"Class"
Dynamic Range Reference to return Max / Min Value - between Blank Cells
Dynamic Ranges for Lookup - choose a matching range
Using Multiple Result Vectors / Ranges in Lookup/Vlookup - for Calculating Commission per Sales Slabs
SUM / AVERAGE Dynamic Range given Start & End Points
Number of Months Required for SUM to Equal or Cross a Specific Amount - Count of Cells (Columns / Rows) till a Specific Sum Value is achi
Refer Previous 10 Cells In Formula - COUNTIF for 10 Preceding Cells (Dynamic Range)
Determine Dynamic Range of Last 5 Non-Blank Cells in a Row, Return Average
Most Common / Occurring Value, per specific Conditions - using MODE or FREQUENCY functions
First, Second & Third Most Occurring Values (Numbers) in a Range, using MODE Function
Most Repeated Value in a Column for specified Name

Increment or Repeat Numbers Sequence.


Increment or Repeat Numbers / Letters Sequence.
Repeat Each Value in a Column thrice, by attaching 3 separate strings to each value
Repeat Each Value in a Column, as many Number of Times and for Each Value of another Column
Repeat Each Value in a Column, specific Number of Times
Repeat Names in Order of their Respective Count in Each Cell of columns A & B
List Values from a Multi Row-Column Range into a single Row
Split Single Column Values to Multiple Columns, per Specific Number of Rows
Transpose each Set of Rows in a Column to Multiple Columns - Specify Number of Columns in each Row for "Transposed Range"
Transpose Alternate Columns / Set of Rows, in a Range - Specify Number of Columns for "Transposed Range"
Transpose Multiple Rows / Columns to a Single Row and Multiple Columns
Split each Group of Continuous Non-Blank cells, of a Column, into Separate Rows
Repeat Column Values in a Column, Transpose Row to Column and Repeat, Repeat Multiple Columns in Single Column
Return Missing Numbers from Consecutive Numbers List
Total Number of Missing Values from a List, corresponding to a specific Date
List All Numbers consecutively, in a column, between Multiple Start-End Numbers
Progressive Increment of Values - Cojoin 2 Values with a specific inbetween difference and Increment each of these
Distinct Index Number for Each Unique Name - Provide Same Index to Duplicate Names in column B, else Increment Index by 1 for New Nam
Increment Column / Row Reference in each Successive Cell while Copying Down Formula - Contiguous or Non-Contiguous Rows

Split String into Separate Cells with Last Name, First Name and Numbers
Extract Nth Sub-String from a String having Multiple Sub-Strings per Specified Separator (Space, Comma, etc)

From a String comprising of Comma Separated (Comma OR Semi-colon Separated) Sub-strings, Extract each Sub-string in Consecutive Cel

Enter Each Sub-String (separated with a Space) from Multiple Cells, in each of the Succesive Cells of a Single Column.
Return Position of Nth Occurrence of a Character(s) in a String
Position of Last Occurrence of a Character(s) in a String

Extract Sub-string after Last Occurrence of Space in a String; Extract Sub-string after Last Occurrence of EITHER Dash OR "x", whichever is

Extract Sub-String between Opening & Closing Brackets / Parenthesis


Split String into 2 Parts - to the Left (and Right) of the Last Space Preceding the 1st Occurrence of Separator
Extract Sub-String, starting from a Specific Text within a String till the Next Semi-colon
Position of 1st Number in String; Extract String to the Left of 1st Number / Starting from 1st Number.
Extract Sub-String Starting from 1st Alphabetic Letter
Average of Alphanumeric Range - Average of Numbers, preceding the 1st English Letter (A to Z) in each Cell of a Column
Extract Sub-String After Last Occurrence of a Number / Numerical in a String
Extract the "Number" or "Alphanumeric Sub-string", immediately Preceding Occurrence of a specific text ("no") within a String
Extract Single Word Preceding 1st Occurrence of Specific Text, in a Comma Separated String
Position of 1st or Last Numeric character in an AlphaNumeric String.
Extract Last Numeric Character, or Last Number (Multi Digit), in an AlphaNumeric String.
Position in AlphaNumeric String of 1st Text Character, Last Text Character, 1st Letter (A-Z), Last Digit Preceding 1st Text Character
Extract Last Text Character, or Last Sub-string (Multi characters), in an AlphaNumeric String.
Extract Number (multi digits / numericals) Preceding the 1st Text Character in an Alphanumeric String.
Extract First Numerical Digit / First Number, in Alphanumeric String
Extract First Sub-String from a Cell which Contains a Number ie. the 1st Number or 1st AlphaNumeric Sub-String
Split Strings into sub-string(s): Split sub-strings separated by spaces (a delimiter) into separate cells; Extract sub-string starting from the first n
SUM Single Numbers After / Before First Space in each Cell, in AlphaNumeric Range
Extract Numbers / Digits from Alphanumeric String - Excluding / Including Leading Zeros
Extract All Text Characters from Alphanumeric String - Remove each number or digit in the String
SUM Alphanumeric Values - Considers only those Numericals which Precede the First Letter ("A" to "Z" or "a" to "z").
Extract Date / Date and Time, from String
Split Codes & Telephone Numbers, per Given List of Codes
Split String into Sub-Strings of Max 50 characters each in 2 separate cells (Balance in 3rd cell), without Breaking a Sub-String
Increment, by a Specified Amount, Each of the Multiple Values in a String Separated by Specific Character(s)
String Formulas - using Excel Functions / Formulas for working with Strings
Reverse First Name & Last Name, where each Name is Separated with a Space; Extract each Name (First, Middle, Last Names) from a Full N

Convert Characters To Corresponding Numbers and return Sum - return SUM of each Character's Numeric Value (where given).
Convert English word(s) into their Numerical Sum - Convert Letters (A-Z) To Numbers (1-26 ie. Number Sequence) and return the SUM
Convert Letters to Numbers - Replace each Character in a String with a corresponding Number
Replace each Number (0 to 9) in a String with corresponding Letter (A=0, B=1, C=2, … J=9)

List all Non Blank Cells consecutively, using INDEX-SMALL or INDEX-AGGREGATE Functions
List all Names where corresponding Values are within specified MIN-MAX values - use INDEX-SMALL or INDEX-AGGREGATE
Return corresponding Index Numbers, per conditions - use INDEX-SMALL or INDEX-AGGREGATE
Vlookup Multiple Values - Return MULTIPLE corresponding values for ONE Lookup Value, using INDEX-SMALL or INDEX-AGGREGATE Fu
Extract List of Missing Names - Names in Column which do Not Occur in a Multi-Column Range
Return Corresponding Names for Largest 5 Values - Return Multiple Largest where 2 or more Values are Same
Largest 5 Values Ignoring Duplicates - Multiple occurrences of a Value are considered only Once

INDEX-MATCH: Return Corresponding Name, for Matching Value in a "Specified Column" or "Specified Column Heading" or "Last Column"
Index-Match: Match Multiple Values / Criteria
Match Multiple Conditions to Return corresponding Value - use AGGREGATE / INDEX-MATCH / SUMIFS / SUMPRODUCT
Index-Match, Match Row and Column in a Range
Index-Match, Match Value in Row of corresponding Column
Match Name in a Range and return 1st / Last Non-Blank Cell from Matching Row - INDEX-MATCH-LOOKUP
Match in one Column, Search in another Column - return (i) Corresponding 1st Ocurrence of Value; or (ii) SUM of All Corresponding Values.
Match with a Range of Multiple IDs, return MIN / MAX corresponding Value - use INDEX-MATCH-AGGREGATE

Determine 1st column A value which is EITHER (i) 100 or less; OR (ii) 200 or more; and return cut-off values 100 or 200 respectively (or "X" /

Return Nth Largest / Smallest Value in a Column, per Multiple Conditions


Find Last / Nth Occurrence Positive / Negative / Zero Value, or its Row Number, in a Column containing Numerical Values
Find Second / Second-Last / Nth Match - Return the 2nd / 2nd-Last / Nth Non-Blank column A value where column B name Matches with cell
Search / Match from Bottom Up in a Column - Exact Match; Last Exact Match Position in a Column

Calculate Total Tax on Income per Slab Rates - can be used to calculate Tax, Sales Commission, etc. where Incremental Slab Rates are use
Split Units Progressively - 3-Step Split - fit Bowls into Stacks and Boxes (per specific number of Bowls in 1 Stack and number of Stacks in 1 B
Split Units Progressively (4-Step Split) fit Coppers into Silvers, Golds & Platinums (per specific number of Coppers / Silvers / Golds in 1 Silver
respectively)
Determine Price per Multiple Slabs and Minimum Cut Off Quantity

Return Closest Value to a Specific Value, from an Array of Values in a Column appearing in Random Order
Find 1st Value in between specified Minimum and Maximum values, and if None then return the Largest Value Less than the Minimum

Skipping / Avoiding Errors while using SUM, AVERAGE, MIN & MAX - using Aggregate to Skip Errors
Skip Error Values for Vlookup and Index-Match

Join Text from Multiple Cells in a Single Cell, with Line Breaks
Combine Multiple Cells in a Single Cell, with a Condition, with inbetween Line Break or Comma-Space
Return Precise Number of Smallest Values (Elements) Resulting from a Formula Calculation, within a Single Cell
Combine Full Names from each of the Multiple Cells into a Single Cell, and Interchange First & Last Name in each Cell
Use the TEXTJOIN function to return Multiple Row Headers in a Cell, for Each Occurrence of a Value in a Multi Column & Row Range

Using MIN / MAX or ISNUMBER / MATCH / CHOOSE or LOOKUP as an alternate to IF / THEN formulas
Accounts Payable - Appropriate Available Cash to Pay Overdue Amounts, with Longest Overdue Periods being Paid First
Formulas.
Formula
Nos
1067

35

3
3

5
4
5
4
4

2
4
3

5
2
5
1
2
1
6
4

8
9
1
3

2
2
3
4

9
3
1
2
1
1
3
2

5
4
15
11
1

12

2
17
2

15
17

15
11
6
13
2
4
1
3

19
2
1
4
7
14
3

6
4
6
1
6
1

16
12

2
3

27
28
28
21
2
1

2
3
2
2
1
3
1
1
2
1
2
4
4
2
1
8

1
17
1

14
12
2

8
2
4
2
1
3
2
1
1
1
2
3
4
1
6
3
4
6
2
1
2
2
5
1

2
3
5
3
2
2
2
2
2
2

9
6
1
4
1
1
1
1
1
1
2
1
3
2
3
2
1
1
4

3
2

1
2
5

2
2
3
6
1
1
2
2
1
6
2
5
2
2
4
1
4
2
5
3
1
2
2
3
4
10
10

4
4
7
1

3
2
2
2
1
2
2

3
2
4
1
1
2
2
4

8
20
5
10

2
3
4

1
1

19
3

2
5
5
2
2

11
1
An illustration - Sample of 14 (out of 243) Actual Linked Tabs containing Formulas: C
INDEX
SN Tab Name - Click to View
243
Unique List:
2 #VALUE!
24 #VALUE!
35 #VALUE!
40 #VALUE!
Count / Countif:
47 #VALUE!
Average / Averageif:
74 #VALUE!
Dates - Days - Months:
86 #VALUE!
Return Headers of Matching Value:
111 #VALUE!
Multiple Array Match:
117 #VALUE!
Sequences - Increment, Repeat, Transpose:
152 #VALUE!
String & Text Formulas:
173 #VALUE!
Index-Small / Aggregate:
212 #VALUE!
Slab Rates - Progressive Splits - Cut Offs:
229 #VALUE!
Closest Match - Match within Range:
233 #VALUE!
n - Sample of 14 (out of 243) Actual Linked Tabs containing Formulas: Click on column B Links to Access corresponding Tab
You may browse the Titles and also search by keyword(s)
Tab Title

Return Unique List of values from a Single Column - Multiple Occurrences to Appear only Once
Count Unique values in a Column, with Condition(s) - each distinct value is counted only once irrespective whether it appears once or multiple
Count Number of Times, specific number of Consecutive Increasing Values, appear in a Column
Count Number of Rows with occurrence of atleast one 1

COUNTIF with Array Criteria & OR / AND: Combine criteria from multi-columns using OR and AND.

AVERAGE of Last 10 values in a Column - Exclude Highest / Lowest

Return Date of Last Sunday / Monday / Tuesday / Wednesday / Thursday / Friday / Saturday in a Month.

Column & Row Headers of a Value having Multiple Occurrences in a Range, where it appears First or Last

Match Row values with Multiple Rows - Array Matching - Number of Rows in a Range where All Cells Match with All cells of a separate Row.

Increment or Repeat Numbers Sequence.

From a String comprising of Comma Separated (Comma OR Semi-colon Separated) Sub-strings, Extract each Sub-string in Consecutive Cel

Vlookup Multiple Values - Return MULTIPLE corresponding values for ONE Lookup Value, using INDEX-SMALL or INDEX-AGGREGATE Fu

Calculate Total Tax on Income per Slab Rates - can be used to calculate Tax, Sales Commission, etc. where Incremental Slab Rates are use

Return Closest Value to a Specific Value, from an Array of Values in a Column appearing in Random Order
Formula
Nos

3
9
3
3

15

28

14

1
Names Unique List Unique List Unique List Return Unique List of values from a Single Column - Multiple Occurrences
Chris Chris Chris Chris Column A values appear either once (Unique) or multiple times (Duplicate
Tracy Tracy Tracy Tracy In column B, the formula (non-array) is to be entered in cell B2 & copied d
John John John John
Note: If cell B2 formula is in a different column, replace "B$1:B1" in the fo
Mary Mary Mary Mary
starts from a different cell, say B16 instead of B2, then replace "B$1:B1"
John Jane Jane Jane
Tracy
Chris Explanation - Cell B2 formula:
1) COUNTIF(B$1:B1,A$2:A$20): counts values of column A in the precedi
Jane 1s and zeros, with 1 indicating column A values which already occur in th
2) INDEX(COUNTIF(B$1:B1,A$2:A$20)+(A$2:A$20=""),): this combines th
used in calculation. Index is used to keep it a non-array formula. As this i
already occur in preceding cells or for blank cells. The aim is to match wi
preceding cells of column B. This is the lookup_array argument of the MA
3) MATCH(0,INDEX(COUNTIF(B$1:B1,A$2:A$20)+(A$2:A$20=""),),0): The
appear in the preceding cells and this also skips blank cells, as explained
returned.

Explanation - Cell C2 formula:


IF(A$2:A$20<>"",COUNTIF(C1:$C$1, A$2:A$20)): this is the lookup_array
in the preceding cells of the formula column (column C) as the formula g
formula - point 2) above of explanation of cell B2 formula. All other logic

Explanation - Cell D2 formula:


1) IF(A$2:A$20<>"",MATCH(A$2:A$20,A$2:A$20,0)): returns an array of n
numbers indicate the relative position of each name in column A, with sim
twice in the 1st and 7th position which means that cell A2 & A8 names ar
subsequent occurrence of similar name. The number 2 occurs twice in th
occurrence of cell A3 name (which is 2) is repeated for each subsequent
FREQUENCY function.

2) ROW(A$2:A$20)-ROW(A$2)+1: This returns an array of consecutive va


function against which the data_array values of 1) above are grouped to d
{2;2;2;1;0;0;0;0;1;0;0;0;0;0;0;0;0;0;0;0} - the numbers are the frequency w
the position of its 1st occurrence in the column. So those values with a fr
for multiple occurrences of the same value. If a value occurs multiple tim
enables determination of UNIQUE values. For example, the 1st 2 indicate
in the 1st position of its occurrence, the next 2 indicates that cell A3 valu
The next 1 indicates that cell A5 value occurs once, and the 2nd 1 (in pos

3) IF(FREQUENCY(IF(A$2:A$20<>"",MATCH(A$2:A$20,A$2:A$20,0)),ROW
FALSE;FALSE; FALSE;FALSE; 9;FALSE;...} - which determines position
even for multiple occurrences of the same value). Using the SMALL funct
smallest in the next cell, and so on. Using the INDEX function - "INDEX(A
e Column - Multiple Occurrences to Appear only Once
nique) or multiple times (Duplicate) - these are extracted to appear ONLY ONCE in a column.
to be entered in cell B2 & copied down. Similarly enter Array formula (Ctrl+Shift+Enter) in cell C2 / D2 and copy down.

column, replace "B$1:B1" in the formula with that column (ex. if formula is in column F then update to "F$1:F1"); if cell B2 formula
ead of B2, then replace "B$1:B1" with "B$15:B15"; do similarly for cell C2 formula. Column D formula needs no such change.

values of column A in the preceding cells of the formula column (column B) as the formula gets copied down. It returns an array of
A values which already occur in these preceding cells.
(A$2:A$20=""),): this combines the above with (A$2:A$20="") which returns TRUE for blank cells and this TRUE becomes 1 when
ep it a non-array formula. As this is copied down, it returns an array of 1s and zeros, where 1 indicates column A values which
blank cells. The aim is to match with zero values which return non-blank column A cells which have not already appeared in
lookup_array argument of the MATCH function.
$2:A$20)+(A$2:A$20=""),),0): The Match function is used with lookup_value of zero to determine column A values which do not
lso skips blank cells, as explained above. Used with the INDEX function - "INDEX(A$2:A$20," - the unique column A values are

2:A$20)): this is the lookup_array argument of the MATCH function and returns the count of values of non-blank cells of column A
lumn (column C) as the formula gets copied down. This gives the same results as the lookup_array argument used in cell B2
of cell B2 formula. All other logic of this cell C2 formula is same as cell B2 formula.

A$2:A$20,0)): returns an array of numbers and FALSE values - {1;2;3;4;3;2;1;FALSE;9;FALSE;...} - Blank cells return FALSE. The
of each name in column A, with similar names having the same position of their 1st occurrence, for example, the number 1 occurs
means that cell A2 & A8 names are same and the position of 1st occurrence of cell A2 name (which is 1) is repeated for each
e. The number 2 occurs twice in the 2nd and 6th position which means that cell A3 & A7 names are same and the position of 1st
is repeated for each subsequent occurrence of similar name. Blank cells return FALSE. This is the data_array argument of the

eturns an array of consecutive values from 1 to 19 - {1;2;3;4; ... ;17;18;19}. This is the bins_array argument of the FREQUENCY
alues of 1) above are grouped to determine their occurrence / frequency. The FREQUENCY function returns an array of values -
- the numbers are the frequency with which each value appears in column A, but this Frequency is returned for each value only at
column. So those values with a frequency of 1 or more return a number only at one position (ie. 1st position of occurrence) even
alue. If a value occurs multiple times, say twice, then its Frequency is returned as 2but the value is considered only once. This
s. For example, the 1st 2 indicates that cell A2 value (the 1st value in column A) appears twice in the column and this 2 is returned
e next 2 indicates that cell A3 value also occurs twice, and similarly the third 2 also indicates that cell A4 value also occurs twice.
occurs once, and the 2nd 1 (in position 9) indicates that cell A10 value also occurs once in column A.

TCH(A$2:A$20,A$2:A$20,0)),ROW(A$2:A$20)-ROW(A$2)+1),ROW(A$2:A$20)-ROW(A$2)+1): returns an array - {1;2;3;4;


E;...} - which determines position of non-blank cells in column A (those with a frequency of 1 or more but returns only one position
me value). Using the SMALL function for this array with k argument of "ROW(A1)" returns the smallest value in the 1st cell, the 2nd
ng the INDEX function - "INDEX(A$2:A$20," - returns the unique column A values in the order they occur.
opy down.

:F1"); if cell B2 formula


s no such change.

wn. It returns an array of

RUE becomes 1 when


mn A values which
eady appeared in

values which do not


olumn A values are

blank cells of column A


nt used in cell B2

s return FALSE. The


e, the number 1 occurs
repeated for each
d the position of 1st
ray argument of the

of the FREQUENCY
s an array of values -
for each value only at
n of occurrence) even
ed only once. This
n and this 2 is returned
lue also occurs twice.

y - {1;2;3;4;
turns only one position
e in the 1st cell, the 2nd
Values Condition Condition Count Count Unique values in a Column, with Condition(s) - each distinct value is cou
AAAA CA Y
BBBB CA N Condition in column B:
5678 NY N 4 Count Unique values in col A where co B is <> "Local" - count each distinct value only
AAAA NY Y IF(B2:B20<>"Local",IF(A2:A20<>"",MATCH(A2:A20,A2:A20,0))): returns an array of nu
1234 Local Y numbers indicating the relative position of each value in column A (where column B <
5678 NY N "Local", return FALSE. This is the data_array argument of the FREQUENCY function.
CCCC Local N ROW(A2:A20)-ROW(A2)+1: returns an array of consecutive numbers 1 to 19 - {1;2;3;4;
this is the bins_array argument of FREQUENCY function.
AAAA CA Y
FREQUENCY(IF(B2:B20<>"Local",IF(A2:A20<>"", MATCH(A2:A20,A2:A20,0))), ROW(A
3456 State Y
indicates that cell A2 value ("AAA") occurs 3 times in the column at A2, A5 & A10 and
3rd occurrence). Note that the FREQUENCY function returns the Frequency ie. numbe
value only at the position of its 1st occurrence in the column. So those values with a f
multiple occurrences of the same value. If a value occurs multiple times, say thrice, th
determination of UNIQUE values. Using th IF statement with the FREQUENCY function
in column A where column B <> "Local" with a frequency of 1 or more return 1, only o
total number of unique values in column A where column B <> "Local".

3 Count Unique values in column A where column B is <> "Local" AND <> "State" (ie. co
This formula is similar to E4 formula, except that there is an additional condition in ce
2 Count Unique values in column A where column B is "CA" - Array Formula uses Frequ
This formula is similar to E4 formula, except that the condition in cell E14 formula is th
2 Count Unique values in column A where column B is "CA" - Array Formula uses COUN

COUNTIFS(B2:B20,"CA",A2:A20,A2:A20): returns an array of numbers and zeros - {2;1


value occurs in the column, where column B = "CA". Zeros indicate blank cells or whe
indicates that a value appears twice, and so on. For example, the 1st number 2 indicat
A2 and A3. Using the IF statement where column B = "CA" and dividing 1 with these n
array of decimals and zeros - {0.5;1;FALSE; FALSE;FALSE; FALSE;FALSE; FALSE;0.5
twice returns 0.5 twice and adding these will return 1 (0.5+0.5), a value appearing 3 tim
always returned on adding for each separate or unique value irrespective of the numb

Condition in column B and Additional Condition in column C:


1 Count Unique values in column A where column B is "CA" and column C is "Y" - Arra
This formula is similar to cell E4 formula, except that there is an additional condition i

"Search" Condition in column B:


5 Count Unique values in column A, wherein "A" appears in Column B: Array formula u
ISNUMBER(SEARCH("A",B2:B20)) - returns an array of TRUE and FALSE values - {TR
"A" is present in a column B cell, for ex. the1st TRUE indicates that cell B2 contains "
not contain "A", and so on. All other logic is similar to cell E4 formula. Also, instead o
Frequency > 0 to return TRUE and uses the double negation to return 1 for all values w
3 Count Unique values in column A, wherein "A" appears in Column B and column C = "
Logic of this formula is similar to cell E37 formula except for an additional condition fo
3 Count Unique values in column A, wherein "A" appears in Column B and column C = "
Logic of this formula is similar to cell E22 formula except for the conditions. Note that
2 Count Unique values (applicable ONLY to Numbers) in column A, wherein "A" appears
IF(ISNUMBER(SEARCH("A",B2:B20)),A2:A20): returns all values from column A where
All values of column A (A2:A20) are used as the bins_array argument of FREQUENCY

FREQUENCY(IF(ISNUMBER(SEARCH("A",B2:B20)),A2:A20),A2:A20): returns an array


arguments - data_array and bins_array. Hence only those values in column A are cons
cell A4 which does not count because corresponding value in cell B4 does not contain
in the array is for the numerical value of "1234" in cell A6 which appears 1 time in colu
is the 2nd numerical in column A. The formula uses IF statement to return TRUE wher
Frequency is 1 or more. Using SUM returns the total number of Unique numerical valu
on(s) - each distinct value is counted only once irrespective whether it appears once or multiple times

- count each distinct value only once whether it appears once or multiple times - Array Formula uses Frequency
:A20,0))): returns an array of numbers and FALSE values - {1;2;3;1; FALSE;3;FALSE; FALSE;1;10; FALSE; FALSE;...} - the
in column A (where column B <> "Local") with similar values having the same position. Blank cells, or where column B values are
t of the FREQUENCY function.
utive numbers 1 to 19 - {1;2;3;4;5;6;7;8;9;10;…} - against which the Frequency of each column A positional value is determined ie.
on.

CH(A2:A20,A2:A20,0))), ROW(A2:A20)- ROW(A2)+1): returns the array - {3;1;2;0; 0;0;0;0; 0;1;0;0;0; 0;0;0;0;0; 0;0} - the 1st number 3
he column at A2, A5 & A10 and 3 is returned in the postion of 1st occurrence whereas zero is returned in positions 4 & 9 (2nd &
eturns the Frequency ie. number of times each value appears in column A, but this number or Frequency is returned for each
olumn. So those values with a frequency of 1 or more return a number only at one position (ie. 1st position of occurrence) even for
urs multiple times, say thrice, then its Frequency is returned as 3 but the value is considered only once. This enables
t with the FREQUENCY function returns an array of 1s and FALSE values - {1;1;1; FALSE; FALSE;FALSE;...} - the non-blank cells
ncy of 1 or more return 1, only once even for multiple occurrences of the same value, and used with the SUM function returns the
mn B <> "Local".

> "Local" AND <> "State" (ie. column B is neither "Local" NOR "State") - Array Formula uses Frequency
is an additional condition in cell E14 formula - IF(B2:B20<>"Local",IF(B2:B20<>"State",
CA" - Array Formula uses Frequency
ondition in cell E14 formula is that column B ="CA", instead of cell E4 where the condition was column B <> "Local".
CA" - Array Formula uses COUNTIFS

rray of numbers and zeros - {2;1;0;2;0; 0;0;0;2;0; 0;0;0;0;0; 0;0;0;0} - the numbers indicate the number of times each column A cell
eros indicate blank cells or where column B is not equal to "CA", 1 indicates that the value appears only once in the column, 2
ample, the 1st number 2 indicates that cell A2 value appears 2 times in column A where corresponding column B = "CA" ie. in cell
CA" and dividing 1 with these number of occurrences - IF(B2:B20="CA", 1/COUNTIFS(B2:B20, "CA", A2:A20, A2:A20)) - returns an
LSE; FALSE;FALSE; FALSE;0.5; FALSE; FALSE;...} - where a value appearing once will return the number 1, a value appearing
0.5+0.5), a value appearing 3 times returns 0.333333333333333 thrice and adding these three will return 1, and so on, so that 1 is
e value irrespective of the number of times it occurrs.

CA" and column C is "Y" - Array Formula uses Frequency


here is an additional condition in this formula for column C - IF(B2:B20="CA",IF(C2:C20="Y",.

s in Column B: Array formula uses Frequency


f TRUE and FALSE values - {TRUE;TRUE; FALSE;FALSE; TRUE;FALSE; TRUE;FALSE;...} - where TRUE indicates that the letter
ndicates that cell B2 contains "A", the next TRUE indicates that cell B3 contains "A", the next FALSE indicates that cell B4 does
cell E4 formula. Also, instead of using IF to return 1 (as in cell E4) for Frequencies of 1 or more, this formula determines
gation to return 1 for all values whose Frequency is 1 or more.
s in Column B and column C = "Y": Array formula uses Frequency
ept for an additional condition for column C (C2:C20="Y") in this formula.
s in Column B and column C = "Y": Array formula uses COUNTIFS
ept for the conditions. Note that IF functions are used for each argument as contained in COUNTIFS.
column A, wherein "A" appears in Column B: Array formula uses Frequency
all values from column A where column B contains the letter "A". This is used as data_array argument of FREQUENCY function.
array argument of FREQUENCY.

:A20),A2:A20): returns an array of numbers and zeros - {0;1;0;1;0} - the Frequency function considers ONLY numbers for both the
ose values in column A are considered which are numericals. The 1st number 0 in the array is for the numerical value of "5678" in
value in cell B4 does not contain "A" and it is in the 1st position because this is the 1st numerical in column A, the next number 1
A6 which appears 1 time in column A where corresponding cell of column B contains "A" and it is in the 2nd position because this
statement to return TRUE where Frequency > 0 and uses the double negation (double unary) to return 1 for all values whose
umber of Unique numerical values satisfying the said condition.
Count Number of Times, specific number of Consecutive Increasing Values, appear in a Column
5
6 3 Number of times there are 3 consecutive increasing values in column A (A2:A50)
42 2 Number of times there are 2 consecutive increasing values in column A (A2:A50)
42 3 3 Number of times there are n (ie. cell B5) consecutive increasing values in column A (A2:A50) - using Cell B
3 All the 3 formulas are Array formulas: Ctrl+Shift+Enter
16
24 Number of Times there are 3 consecutive increasing values in column A. This means exactly 3, no more n
25 groups of 3 consecutive increasing values. Similarl logic for 2 consecutive increasing values.
25
33 Explanation of cell C3 formula:
44 1) IF(A3:A50-A2:A49>0,ROW(A3:A50)): returns an array of numbers and FALSE values - {3;4;FALSE; FALS
44 the numbers indicate the row numbers where a cell value is greater than its preceding cell's value, ie. the
59 argument of the FREQUENCY function.
11 2) IF(A3:A50-A2:A49<=0,ROW(A3:A50)): returns an array of numbers and FALSE values - {FALSE;FALSE;
21 the numbers indicate the row numbers where a cell value is less than or equal to its preceding cell's value
31 bins_array argument of the FREQUENCY function against which the data_array values are grouped to det
35
8 3) FREQUENCY(IF(A3:A50-A2:A49>0, ROW(A3:A50)), IF(A3:A50-A2:A49<=0, ROW(A3:A50))): returns an ar
5
numbers indicate the number of consecutive cells where a cell value is greater than its preceding cell's va
data_array argument) upto row number 5 (bins_array argument value), where cell value is greater than its
3 in data_array argument) upto row number 10 (greater than 5 and less than 10 bins_array values), where ce
12 number is equated with 3 ie. =3, and then using the SUM function returns the total number of times (ie. nu
13
14
8 Explanation of cell C4 / C5 formulas:
The logic of cell C4 / C5 formulas is similar to the cell C3 formula.
r in a Column

A (A2:A50) - using Cell B5 reference

ans exactly 3, no more no less, and the 4th value should be equal or less than the 3rd value. This also means the number of
asing values.

alues - {3;4;FALSE; FALSE;7;8;9; FALSE;11;12; FALSE;14;FALSE; 16;17;18; FALSE;FALSE; FALSE;22;23; 24;FALSE; FALSE;…} -
eding cell's value, ie. the value of a cell increases with respect to its immediately preceding cell's value. This is the data_array

values - {FALSE;FALSE; 5;6;FALSE; FALSE;FALSE; 10;FALSE;FALSE; 13;FALSE;15; FALSE;FALSE; FALSE;19;20; 21;FALSE;…} -


its preceding cell's value, ie. the value of a cell does not increase with respect to its immediately preceding cell's value. This is the
alues are grouped to determine their occurrence and frequency..

(A3:A50))): returns an array of numbers and zeros - {2;0;3;2; 1;3;0;0; 3;0;0;0; 0;0;0;0; 0;0;0;0;0; 0;0;0;0; 0;0;0;0; 0;0;0;0; 0;0} - the
an its preceding cell's value. For example, the number 2 indicates that there are 2 consecutive cells (row numbers 3 & 4 - in
value is greater than its preceding cell's value. The number 3 indicates that there are 3 consecutive cells (row numbers 7, 8 & 9 -
s_array values), where cell value is greater than its preceding cell's value. The IF function is used with this to return 1 when this
l number of times (ie. number of groups) there are 3 consecutive increasing values.
Count Number of Rows with occurrence of atleast one 1
0 1 1 0 1 0 If a row in the range A2:F20 contains atleast a single 1, it is considered and counted
0 0 0 1 0 0
0 0 0 0 0 0 5 Uses Frequency Function - Enter formula as an array formula (Ctrl+Shift+Enter) in c
1 1 1 1 1 1 5 Uses MMULT Function - Enter formula as an array formula (Ctrl+Shift+Enter) in cell
0 0 0 0 0 1 5 Uses MMULT Function - Hardcode the number of columns in the Range ie. "ROW(1
0 2 0 0 0 0 Alternatively, "ROW(INDIRECT("1:"&COLUMNS(A2:F20)))" can also be used in cell
1 2 3 4 6 7
Explanation of cell H4 formula:
1) IF((A2:F20=1), ROW(A2:F20)- ROW(A2)+1): returns an array of numbers and FALSE valu
FALSE, FALSE,FALSE, FALSE, FALSE, FALSE;4,4,4, 4,4,4;FALSE, FALSE, FALSE, FALSE
occurs thrice in the 1st row (A2:F2) which means that the 2nd, 3rd & 5th value is 1 ie. cells
in the 2nd row (A3:F3) in the 4th column which means cell D2 contains 1 and the number 2
means that all cells in the range A5:F5 contain 1 and the number 4 indicates the 4th row o
FREQUENCY function.

2) ROW(A2:F20)- ROW(A2)+1: returns an array of values 1 to 19 - {1;2;3;4;5;6;7;8;9;10;…} -


argument of FREQUENCY function. Note that the FREQUENCY function enables calculatin
Frequency is returned as 3 but the value is considered only once. This enables determinat

3) FREQUENCY(IF((A2:F20=1), ROW(A2:F20)- ROW(A2)+1), ROW(A2:F20)- ROW(A2)+1): re


reference to each row and indicate the number of times the value 1 occurs in a row ex. the
number 1 in the 2nd position indicates that the number 1 occurs once in the 2nd row (A3:F
the position of each number indicates the row number. Equating the array numbers with "
TRUE;FALSE; FALSE;FALSE;...} - the rows with a frequency of 1 or more return TRUE, wh
return TRUE only once for that row), and then using the double negation converts TRUE to
occurrence of 1.

Explanation of cell H5 formula:


TRANSPOSE(COLUMN(A2:F20)^0): returns {1;1;1;1;1;1} which represents 6 rows and 1 co
with array1 argument. The MMULT function requires the number of columns in array1 to b
--(A2:F20=1): this is the array1 argument of the MMULT function and retruns an array of 1s
0,0,1;…} - the 1s indicate the cells where a cell = 1. This indicates that the 1st row (A2:F2)
Note: The double negation converts TRUE and FALSE values to 1s and zeros respectively

MMULT(--(A2:F20=1),TRANSPOSE(COLUMN(A2:F20)^0)): returns an array of numbers and


row and indicate the number of times the value 1 occurs in a row ex. the number 3 in the 1
position indicates that the number 1 occurs once in the 2nd row (A3:F3), and the number 6
number indicates the row number. Equating this with ">0" returns an array of TRUE and F
with a frequency of 1 or more return TRUE, which means that the row has atleast one occu
using the double negation converts TRUE to 1 and FALSE to zero. Using the SUM function

Explanation of cell H6 formula:

All logic is the same as in cell H5 formula, except that the H6 formula uses the hardcoded
the array2 of H5 formula is {1;1;1;1;1;1}, the final result of this will be the same as cell H5 f

Alternatively, "ROW(INDIRECT("1:"&COLUMNS(A2:F20)))" can also be used in cell H6 form


"=SUMPRODUCT(--(MMULT(--( A2:F20=1), ROW(INDIRECT("1:"&COLUMNS( A2:F20))))>0))
is considered and counted. Even if a row contains multiple 1s, it is counted as one.

mula (Ctrl+Shift+Enter) in cell H4.


a (Ctrl+Shift+Enter) in cell H5.
s in the Range ie. "ROW(1:6)" instead of "COLUMN(A2:F20)" - Normal (non-array) formula in cell H6.
" can also be used in cell H6 formula which returns - {1;2;3; 4;5;6} - instead of using "ROW(1:6)" in the cell H6 formula.

numbers and FALSE values for 6 columns and 19 rows - {FALSE,1,1, FALSE,1, FALSE; FALSE,FALSE, FALSE,2,FALSE, FALSE;
E, FALSE, FALSE, FALSE, FALSE,5;...} - the numbers are the row number for each cell containing 1. For example, the number 1
rd & 5th value is 1 ie. cells B2, C2 & E2 contain 1 and the number 1 indicates the 1st row of A2:F2; the number 2 occurs only once
ntains 1 and the number 2 indicates the 2nd row of A3:F3; similarly the number 4 occurs in all positions of the 4th row which
r 4 indicates the 4th row of A5:F5. Blank cells or cells which do not contain 1, return FALSE. This is the data_array argument of the

- {1;2;3;4;5;6;7;8;9;10;…} - against which the Frequency of each value of data_array is determined ie. this is the bins_array
unction enables calculating the FREQUENCY of a value ONLY ONCE (ie. if a value occurs multiple times, say thrice, then its
e. This enables determination of UNIQUE values.

W(A2:F20)- ROW(A2)+1): returns an arry of numbers and zeros for each row - {3;1;0;6; 1;0;1;0; 0;0;0;...} - the numbers are with
e 1 occurs in a row ex. the number 3 in the 1st position indicates that the number 1 occurs thrice in the 1st row (A2:F2), the next
once in the 2nd row (A3:F3), and the number 6 in 4th position indicates that the number 1 occurs 6 times in the 4th row (A5:F5) -
g the array numbers with ">0" return an array of TRUE and FALSE values - {TRUE;TRUE; FALSE;TRUE; TRUE;FALSE;
1 or more return TRUE, which means that the row has atleast one occurence of 1 (so that a row with 3 or 6 occurrences of 1 will
negation converts TRUE to 1 and FALSE to zero. Using the SUM function returns the total number of rows with atleast one

epresents 6 rows and 1 column. This is used as array2 argument of the MMULT function, to equate with the number of columns
of columns in array1 to be the same as the number of rows in array2.
and retruns an array of 1s and zeros, 6 columns in each of the 19 rows - {0,1,1, 0,1,0; 0,0,0, 1,0,0; 0,0,0, 0,0,0; 1,1,1, 1,1,1; 0,0,0,
s that the 1st row (A2:F2) has 3 occurences of 1, at B2, C2 & E2. The 2nd row (A3:F3) has one occurrence of 1 at D3. And so on.
1s and zeros respectively.

s an array of numbers and zeros for each row - {3;1;0;6; 1;0;1;0; 0;0;0;0; 0;0;0;0; 0;0;0} - the numbers are with reference to each
w ex. the number 3 in the 1st position indicates that the number 1 occurs thrice in the 1st row (A2:F2), the next number 1 in the 2nd
(A3:F3), and the number 6 in 4th position indicates that the number 1 occurs 6 times in the 4th row (A5:F5) - the position of each
ns an array of TRUE and FALSE values - {TRUE;TRUE; FALSE;TRUE; TRUE;FALSE; TRUE;FALSE; FALSE;FALSE;...} - the rows
e row has atleast one occurence of 1 (so that a row with 3 or 6 occurrences of 1 will return TRUE only once for that row), and then
o. Using the SUM function returns the total number of rows with atleast one occurence of 1.

mula uses the hardcoded number for the array2 argument of MMULT function - ROW(1:6), which equates to {1;2;3;4;5;6}. Though
ill be the same as cell H5 formula because of equating with ">0". This also enables the H6 formula to be entered as non-array.

lso be used in cell H6 formula which returns - {1;2;3; 4;5;6} - instead of using "ROW(1:6)", so that the non-array formula will be
COLUMNS( A2:F20))))>0))". This obviates the need to enter an absolute / hardcoded amount for the number of columns.
COUNTIF with Array Criteria & OR / AND: Combine criteria from multi-columns using OR
John John John John Note: COUNTIFS / SUMIFS functions are generally more efficient than using SUMPROD
Jack Mary Stacy John
John John Steve John Jack 1 Countifs: hardcoded values; if column A = "Jack" AND column B = "Jill"; Con
Mandy Jack Jill John Jill 1 Sumproduct: cell references; if column A = F4 AND column B = F5; Consider o
John Peter John John Mary
Adam Tom John Jack Stacy 4 Countif: hardcoded values - if column A = "Jack" OR "Jill". Consider if EITHER
Jill Mary Stacy Stacy range, COUNTIF returns an array of values - {2,2} - the numbers indicate the re
Jill Mary Jack John total number of times each of them occur in column A.
Jack Jill John Peter
John Peter Stacy John 4 Countif: cell references - if column A = F4 OR F5. Consider if EITHER of the 2
Stacy Mary Jack John 4 Sumproduct: cell references - if column A = F4 OR F5. Consider if EITHER of
7 Countif: hardcoded values - if column A (A2:A15) = Blank OR "Jack" OR "Jill".

3 Countifs: hardcoded values - if column A = "Jack" OR "Jill" AND column B = "


A = "Jill" and column B = "Mary" in same row; (iii) both i) and ii) counts are ad
3 Countifs: hardcoded values - if column A = "Jack" OR "Jill" AND column B = "
3 Countifs: cell references - if column A = F4 OR F5 AND column B = F6. Similar

2 Countifs: hardcoded values - if column A = "Jack" OR "Jill" AND column B = "


C is added (similar to column B condition of AND).
2 Countifs: cell references - if column A = F4 OR F5 AND column B = F6 AND co

Count Multiple Columns for Occurrence of Same Value: Count if column D = "Jo
4
Uses SUMPRODUCT - Normal (non-array) formula. For AND condition of colum
(B2:B15="John")+(C2:C15="John"))>0): returns an array of TRUE and FALSE v
FALSE;FALSE} - and TRUE indicates rows where either one of the 3 columns
1s indicating atleast one column in A2:C15, alongwith column D, containing "J

4 Uses MMULT: Array formula (Ctrl+Shift+Enter). (A2:C15="John")*(D2:D15="Jo


0,0,0; 1,0,1; 0,0,0; 0,0,0; 0,0,0; 0,0,0; 1,0,0; 0,0,0; 0,0,0; 0,0,0; 0,0,0} - with 1s for
TRANSPOSE(COLUMN(A2:C15)^0): returns an array of 1s where semi-colons
numbers indicate the number of columns in each row satisfying both conditio
convert TRUE to 1, and using SUM will return the total number of rows satisfy
4 Uses MMULT - NonArray formula. Same formula as cell G30 except that this ha
"TRANSPOSE(COLUMN(A2:C15)^0)".
4
Uses FREQUENCY: Array formula (Ctrl+Shift+Enter). IF(D2:D15="John",IF(A2:
columns (A2:C15) in each row - {1,1,1;FALSE, FALSE,FALSE; 3,3,FALSE; FAL
row index number in the columns A2:C100 where the cell = "John" and whose
because range startd from A2) = "John" and D2 = "John". The 2nd 1 indicates
Using the FREQUENCY function - FREQUENCY(IF(D2:D15="John",IF(A2:C15=
{3;0;2; 0;2;0; 0;0;0; 1;0;0; 0;0;0} - the numbers indicating the number of cells in
and column D) will have a frequency of 1 or more, but will return 1 using the IF
SUM function returns the total number of rows which satisfy the 2 conditions.
eria from multi-columns using OR and AND.
ore efficient than using SUMPRODUCT.

ack" AND column B = "Jill"; Consider only if BOTH values are present in same row of respective columns A & B.
4 AND column B = F5; Consider only if BOTH values are present in same row of respective columns A & B.

ack" OR "Jill". Consider if EITHER of the 2 values are present in column A. COUNTIF(A2:A15,{"Jack","Jill"}): using an array criteria for a
2,2} - the numbers indicate the respective occurrence(s) of each of the 2 values ("Jack" & "Jill") in column A, and using SUM returns the
olumn A.

F5. Consider if EITHER of the 2 values are present in column A. Similar logic as cell G7 formula.
4 OR F5. Consider if EITHER of the 2 values are present in column A. Similar logic as cell G7 formula.
A15) = Blank OR "Jack" OR "Jill". Similar logic as cell G7 formula, except that another option of blank cells is added and counted.

Jack" OR "Jill" AND column B = "Mary". Counts occurrences of (i) column A = "Jack" AND column B = "Mary" in same row; OR (ii) column
; (iii) both i) and ii) counts are added.
Jack" OR "Jill" AND column B = "Mary". This is not ideal for large number of multiple values. Similar logic as cell G15 formula.
R F5 AND column B = F6. Similar logic as cell G15 formula.

Jack" OR "Jill" AND column B = "Mary" AND column C = "Stacy". Similar logic as cell G15 formula, except that another condition of column
AND).
R F5 AND column B = F6 AND column C = F7". Similar logic as cell G20 formula.

me Value: Count if column D = "John" AND atleast one of the columns A, B & C = "John"

mula. For AND condition of column D, multiplicaton (*) is used. For OR condition of columns A / B / C, add (+) is used. (((A2:A15="John")+
ns an array of TRUE and FALSE values - {TRUE;FALSE; TRUE;FALSE; TRUE;TRUE; FALSE;FALSE; TRUE;TRUE; FALSE;FALSE;
here either one of the 3 columns (A2:C15) contain "John". Multiplying this with - (D2:D15="John") - returns an array of 1s and zeros with the
longwith column D, containing "John". Using SUMPRODUCT will return the sum of 1s ie. the total number of rows satisfying the condition.

r). (A2:C15="John")*(D2:D15="John"): returns an arry of 1s and FALSE zeros for each of the 3 columns in each row - {1,1,1; 0,0,0; 1,1,0;
0; 0,0,0; 0,0,0; 0,0,0} - with 1s for cells in columns A2:C100 which contain "John" where column D also contains "John" in the same row.
n array of 1s where semi-colons represent row-separators - {1;1;1}. Using MMULT returns an array - {3;0; 2;0;2; 0;0;0; 0;1;0; 0;0;0} - where
ach row satisfying both conditions (columns A:C & column D). Using ">0" will return TRUE for each number and using double negation will
the total number of rows satisfying both conditions.
ula as cell G30 except that this hardcodes the number of columns in the Rangeand uses "ROW(1:3)" instead of

+Enter). IF(D2:D15="John",IF(A2:C15="John",ROW(B2:C15)-ROW(B2)+1)): returns an array of numbers and FALSE values for each of the 3
, FALSE,FALSE; 3,3,FALSE; FALSE,FALSE, FALSE;5, FALSE,5; FALSE,FALSE, FALSE;FALSE, FALSE,FALSE;...} - the numbers indicate the
here the cell = "John" and whose corresponding value in column D = "John". Example, the 1st 1 indicates that cell A2 (1st row index
D2 = "John". The 2nd 1 indicates that B2 = "John" and D2 = "John". The 1st 3 indicates that A4 = "John" (3rd row index) and D2 = "John".
CY(IF(D2:D15="John",IF(A2:C15="John",ROW(B2:C15)-ROW(B2)+1)),ROW(A2:A15)-ROW(A2)+1) - returns an array of numbers and zeros -
s indicating the number of cells in each row which satisfy the 2 conditions. The non-blank rows satisfying both conditions (columns A:C
more, but will return 1 using the IF function (ie. only once even for multiple cells of a row satisfying both the conditions), and used with the
s which satisfy the 2 conditions.
array criteria for a
ng SUM returns the

nd counted.

e row; OR (ii) column

formula.

er condition of column

. (((A2:A15="John")+
LSE;FALSE;
f 1s and zeros with the
tisfying the condition.

{1,1,1; 0,0,0; 1,1,0;


n" in the same row.
0;1;0; 0;0;0} - where
ng double negation will

lues for each of the 3


e numbers indicate the
(1st row index
ex) and D2 = "John".
numbers and zeros -
ions (columns A:C
s), and used with the
AVERAGE of Last 10 values in a Column - Exclude Highest / Lowest
11
2 8.667 Average last 10 values in a column, exclude the 2 Largest & 2 lowest values and consider net 6
3
6 13.6 Average largest 5 out of last 10 values in a column (exclude blanks) - Array Formula (Ctrl+Shift+
1
22 9.1 Average last 10 values in a column excluding blanks
11 91 SUM last 10 values in a column excluding blanks
9 91 SUM last 10 values in a column excluding blanks
3
11 8.786 Average all values in a column, excluding the 20% highest & 20% lowest values (excludes blank
16
20 Explanation of Cell G3 formula:
1 1) LARGE(IF(A2:A30<>"", ROW(A2:A30)-ROW(A2)+1, ""), 10): this returns the cell position of 13
6 (ie. 13th non-blank cell starting from cell A2) there would be 10 cells with values.
8 2) INDEX(A2:A30, LARGE(IF(A2:A30<>"", ROW(A2:A30)-ROW(A2)+1, ""), 10)):A30: this returns a
5 4;12;14; 18;0;7;0; 16;0;0; 0;0;0} - the numbers are the 10 values in the last 10 non-blank cells in
4 considered blank only). Note that if a non-blank cell has zero then this is also considered as one
12 3) Using the TRIMMEAN function calculates the mean taken by excluding a percentage ("percen
14 4 points are trimmed from a data set of 10 points (10 x 0.4): 2 from the top and 2 from the bottom
18 of balance 6 values. Also Note that the fractional number of data points are ignored in the "perc
Largest & 2 Smallest (12 x 0.4 = 4.8, but rounded down to 4).
7
Explanation of Cell G5 formula:
16 INDEX(A2:A30, LARGE(IF(A2:A30<>"", ROW(A2:A30)-ROW(A2)+1, ""), 10)):A30: as alread explai
function with k argument of {1,2,3,4,5} will return the Largest 5 of these 10 values. Then AVERAG
(A2:A30) after ignoring blank cells.

Explanation of Cell G7 formula:


INDEX(A2:A30,LARGE(INDEX((A2:A30<>"")*(ROW(A2:A30)-ROW(A2)+1),0),10)):A30: as already
AVERAGE function will return the average of these Last 10 values in column A, after skipping b

Explanation of Cell G8 formula:


This formula is same as cell G7 formula, except that in cell G8 formula the SUM function is used

Explanation of Cell G9 formula:


1) ROW(A2:A30)-ROW(A2)+1: returns an array of row numbers starting from 1 to 29 - {1;2;3;4;5;
an array of TRUE and FALSE values, where TRUE is is for non-blank cells. Using "(ROW(A2:A30
19;20;#DIV/0!; 22;#DIV/0!; 24;#DIV/0!; #DIV/0!;#DIV/0!; #DIV/0!;#DIV/0!} - where the #DIV/0! errors
This is the array argument of the AGGREGATE function.

2) AGGREGATE(14,6, (ROW(A2:A30)-ROW(A2)+1)/(A2:A30<>""), 10): returns 13, which is the 10t


blank cells in the last 13 rows (ie. A14:A30) which provide the last 10 values. Using 14 as the fun
using LARGE function), and using the options argument of 6 in AGGREGATE function ignores t
"A2:A30" retuns the value 1, which is the cell A14 value. Using - INDEX(A2:A30, AGGREGATE(1
{1;6;8;5;4; 12;14;18; 0;7;0;16; 0;0;0;0;0}. Using SUM returns 91, which is the total of last 10 non-

Explanation of Cell G11 formula:


TRIMMEAN(A2:A30,0.4): Uses TRIMMEAN for a "percent" of 0.4 for all values in column A. This
excluding the 20% highest & 20% lowest values (excludes blanks) - out of total 22 values, 4 Larg
values and consider net 6 values (skip blanks) - Array Formula (Ctrl+Shift+Enter)

Array Formula (Ctrl+Shift+Enter)

est values (excludes blanks) - Out of total 22 values, Excludes 4 Largest & 4 Smallest.

urns the cell position of 13 (ie. cell A14) in column A from where the last 10 non-blank cells start. Starting from the 13th position
with values.
""), 10)):A30: this returns all values in the range starting from the 13th position (ie. cell A14) till the last cell of A30 - {1;6;8;5;
last 10 non-blank cells in column A where blank cells also appear as zeros but are not considered in calculation (these are
s is also considered as one of the 10 values.
ding a percentage ("percent" argument of the function) of data points from the top and bottom tails of a data set. If "percent" = 0.4,
e top and 2 from the bottom of the set. Hence this excludes the 2 Largest & 2 Smallest values out of the 10 and calculates Average
ts are ignored in the "percent" argument, so that if there are 12 values and "percent" is 0.4, it will still trim or exclude 4 points - 2

, 10)):A30: as alread explained above, this will return 10 values from the last 10 non-blank cells in column A. Using the LARGE
se 10 values. Then AVERAGE function is used which will return the average of Largest 5 out of the Last 10 values in column A

+1),0),10)):A30: as already explained above, this will return 10 values from the last 10 non-blank cells in column A. Using the
column A, after skipping blank cells.

a the SUM function is used to return the SUM of Last 10 values (last 10 non-blank cells) of column A.

g from 1 to 29 - {1;2;3;4;5; 6;7;8;9;10; 11;12;13; 14;15;16;17; 18;19;20;21; 22;23;24; 25;26;27; 28;29}. Using "(A2:A30<>"")" returns
cells. Using "(ROW(A2:A30)-ROW(A2)+1)/(A2:A30<>"")" returns an array of values - {1;2;3;4;5; 6;7;8;9;10; 11;12;13;14; 15;16;17;18;
} - where the #DIV/0! errors are for blank cells because dividing a value by zero (FALSE returns zero in an mathematical function).

returns 13, which is the 10th largest, non-blank row number in the array argument of 1) above. This means that there are 10 non-
values. Using 14 as the function_num argument of AGGREGATE returns the Largest values as per k argument (it is similar to
REGATE function ignores the error values. Using the value 13 as the row_num argument of INDEX function with array argument of
EX(A2:A30, AGGREGATE(14,6, (ROW(A2:A30)-ROW(A2) +1)/(A2:A30<>""), 10)):A30 - returns the values of the range A14:A30 -
h is the total of last 10 non-blank cells in the range A2:A30.

l values in column A. This function is already explained for cell G3 formula - it will return the Average all values in a column,
ut of total 22 values, 4 Largest & 4 Smallest are excluded.
Return Date of Last Sunday / Monday / Tuesday / Wednesday / Thursday / Friday / Saturday in a Month.

Date of Last Sunday in a Month Date of Last Monday in a Month


Given Date Day
Option 1 Option 2 Option 3 Option 4 Option 1 Option 2 Option 3
8/6/2019 Tue 8/25/2019 8/25/2019 8/25/2019 8/25/2019 Sun 8/26/2019 8/26/2019 8/26/2019
2/29/2016 Mon 2/28/2016 2/28/2016 2/28/2016 2/28/2016 Sun 2/29/2016 2/29/2016 2/29/2016
6/16/2018 Sat 6/24/2018 6/24/2018 6/24/2018 6/24/2018 Sun 6/25/2018 6/25/2018 6/25/2018
7/5/2015 Sun 7/26/2015 7/26/2015 7/26/2015 7/26/2015 Sun 7/27/2015 7/27/2015 7/27/2015
3/16/2018 Fri 3/25/2018 3/25/2018 3/25/2018 3/25/2018 Sun 3/26/2018 3/26/2018 3/26/2018
2/28/2011 Mon 2/27/2011 2/27/2011 2/27/2011 2/27/2011 Sun 2/28/2011 2/28/2011 2/28/2011
9/18/2013 Wed 9/29/2013 9/29/2013 9/29/2013 9/29/2013 Sun 9/30/2013 9/30/2013 9/30/2013
10/6/2011 Thu 10/30/2011 10/30/2011 10/30/2011 10/30/2011 Sun 10/31/2011 10/31/2011 10/31/2011

Column A contains random dates (column B mentions the Day of each corresponding column A date) with ref
Return Last Sunday Date, with reference to the Month of the column A Date - columns D to G return the Last S
columns P to S return the Last Tuesday of the respective Month, cols V to Y return Last Wed, cols AB to AE re
Enter separate formulas in cell D6 / E6 / F6 / G6 and copy down. Similarly enter separate formulas in cell J6 / K

Explanation of above Formulas:


Formulas are similar to the calcuation of "Date of Previous Sunday" - refer other tab:
In column D to F formulas of the other tab (and also formulas of columns J-L / P-R / V-X / AB-AD / AH-AJ / AN-
A6 month. The aim is to return the previous Sunday from the Last Date of the Month and hence this replacem
same A6 date if A6 is a Sunday. In column G formula of the other tab "A6" (and also formulas of columns M / S
returns the Date of Last Sunday prior to cell A6 date and even if cell A6 date is a Sunday it is not considered,
aturday in a Month.

nday in a Month Date of Last Tuesday in a Month Date of Last Wednesday in a Month
Option 4 Option 1 Option 2 Option 3 Option 4 Option 1 Option 2 Option 3
8/26/2019 Mon 8/27/2019 8/27/2019 8/27/2019 8/27/2019 Tue 8/28/2019 8/28/2019 8/28/2019
2/29/2016 Mon 2/23/2016 2/23/2016 2/23/2016 2/23/2016 Tue 2/24/2016 2/24/2016 2/24/2016
6/25/2018 Mon 6/26/2018 6/26/2018 6/26/2018 6/26/2018 Tue 6/27/2018 6/27/2018 6/27/2018
7/27/2015 Mon 7/28/2015 7/28/2015 7/28/2015 7/28/2015 Tue 7/29/2015 7/29/2015 7/29/2015
3/26/2018 Mon 3/27/2018 3/27/2018 3/27/2018 3/27/2018 Tue 3/28/2018 3/28/2018 3/28/2018
2/28/2011 Mon 2/22/2011 2/22/2011 2/22/2011 2/22/2011 Tue 2/23/2011 2/23/2011 2/23/2011
9/30/2013 Mon 9/24/2013 9/24/2013 9/24/2013 9/24/2013 Tue 9/25/2013 9/25/2013 9/25/2013
10/31/2011 Mon 10/25/2011 10/25/2011 10/25/2011 10/25/2011 Tue 10/26/2011 10/26/2011 10/26/2011

ing column A date) with reference to whose Month the Last Sunday Date is returned.
mns D to G return the Last Sunday of the respective Month, columns J to M return the Last Monday of the respective Month,
Last Wed, cols AB to AE return Last Thurs, cols AH to AJ return Last Fri, and cols AN to AQ return Last Saturday.
arate formulas in cell J6 / K6 / L6 / M6 and copy down, and so on. Columns H / N / T … are for check only.

#REF!
/ V-X / AB-AD / AH-AJ / AN-AP), replace "A6" with "EOMONTH(A6,0)" - using "EOMONTH(A6,0)" returns the last date of the cell
h and hence this replacement. Columns D to F of the other tab return the Date of Last Sunday from cell A6 date and return the
o formulas of columns M / S / Y / AE / AK / AQ) is replaced with "EOMONTH(A6,0)+1" because column G formula in the other tab
unday it is not considered, hence 1 is added to "EOMONTH(A6,0)" in this tab.
esday in a Month Date of Last Thursday in a Month Date of Last Friday in a Month
Option 4 Option 1 Option 2 Option 3 Option 4 Option 1 Option 2 Option 3
8/28/2019 Wed 8/29/2019 8/29/2019 8/29/2019 8/29/2019 Thu 8/30/2019 8/30/2019 8/30/2019
2/24/2016 Wed 2/25/2016 2/25/2016 2/25/2016 2/25/2016 Thu 2/26/2016 2/26/2016 2/26/2016
6/27/2018 Wed 6/28/2018 6/28/2018 6/28/2018 6/28/2018 Thu 6/29/2018 6/29/2018 6/29/2018
7/29/2015 Wed 7/30/2015 7/30/2015 7/30/2015 7/30/2015 Thu 7/31/2015 7/31/2015 7/31/2015
3/28/2018 Wed 3/29/2018 3/29/2018 3/29/2018 3/29/2018 Thu 3/30/2018 3/30/2018 3/30/2018
2/23/2011 Wed 2/24/2011 2/24/2011 2/24/2011 2/24/2011 Thu 2/25/2011 2/25/2011 2/25/2011
9/25/2013 Wed 9/26/2013 9/26/2013 9/26/2013 9/26/2013 Thu 9/27/2013 9/27/2013 9/27/2013
10/26/2011 Wed 10/27/2011 10/27/2011 10/27/2011 10/27/2011 Thu 10/28/2011 10/28/2011 10/28/2011
day in a Month Date of Last Saturday in a Month
Option 4 Option 1 Option 2 Option 3 Option 4
8/30/2019 Fri 8/31/2019 8/31/2019 8/31/2019 8/31/2019 Sat
2/26/2016 Fri 2/27/2016 2/27/2016 2/27/2016 2/27/2016 Sat
6/29/2018 Fri 6/30/2018 6/30/2018 6/30/2018 6/30/2018 Sat
7/31/2015 Fri 7/25/2015 7/25/2015 7/25/2015 7/25/2015 Sat
3/30/2018 Fri 3/31/2018 3/31/2018 3/31/2018 3/31/2018 Sat
2/25/2011 Fri 2/26/2011 2/26/2011 2/26/2011 2/26/2011 Sat
9/27/2013 Fri 9/28/2013 9/28/2013 9/28/2013 9/28/2013 Sat
10/28/2011 Fri 10/29/2011 10/29/2011 10/29/2011 10/29/2011 Sat
H1 H2 H3 H4 H5 Column & Row Headers of a Value having Multiple Occurrences in a Range, wher
R1 100 110 120 130 140 Cell H4 value may have multiple occurrences in the range B2:F10 - return Heade
R2 200 210 420 420 440 Return Column Header (from range B1:F1) or Row Header (from range A2:A10) f
R3 300 310 320 330 340 420 I9: Last Row in 1st Column of H4 occurrence; (iv) cell I11: Last Column of H4 oc
R4 400 410 420 430 440 H4 occurrence; and so on. All formulas are Array formulas (Ctrl+Shift+Enter).
R5 500 510 520 530 540
R6 600 420 430 420 640 H2 1st Column Explanation of I7 formula - 1st Column:
R7 700 710 720 730 740 R6 1st Row in 1st Column 1) IF(H4=B2:F10,IF(B2:F10<>"",COLUMN(B2:F10)-
R8 800 420 420 440 450 R8 Last Row in 1st Column {FALSE,FALSE, FALSE,FALSE, FALSE; FALSE, F
R9 900 910 920 930 940 numbers indicate the column positions in the rang
H4 Last Column that cells D3 & E3 have the cell H4 value (420).
R2 1st Row in Last Column 2) SMALL(IF(H4=B2:F10,IF(B2:F10<>"",COLUMN(B
R6 Last Row in Last Column determine the 1st column, and then using the IND
3) Note: The formula works for finding the header
R2 1st Row behave as zeros.
H3 1st Column in 1st Row
H4 Last Column in 1st Row Explanation of I8 formula - 1st Row in 1st Column:
1) SMALL(IF(H4=B2:F10,IF(B2:F10<>"", COLUMN(
R8 Last Row 1st column position in range B2:F10 where H4 val
H2 1st Column in Last Row 1st column values where H4 value occurs (column
H3 Last Column in Last Row
2) MATCH(H4,INDEX(B2:F10,,SMALL(IF(H4=B2:F1
lookup_array argument of 1) above which is the 1
Return Address: column (ie. 6). Using the INDEX function - "INDEX
$C$7 1st Row in 1st Column
$E$7 Last Row in Last Column
Explanation of I9 formula - Last Row in 1st Column:
1) SMALL(IF(H4=B2:F10,IF(B2:F10<>"",COLUMN(B
column position in range B2:F10 where H4 value o
other columns. Using this as the column_num arg
(column C2:C10) - {110;210;310; 410;510;420; 710

2) (H4=INDEX(IF(B2:F10<>"",B2:F10),, SMALL(IF(H
values - {FALSE;FALSE; FALSE;FALSE; FALSE;T
H4 value. Dividing this by 1 returns an array of #D
cells containg H4 value (TRUE is converted to 1 a
explained in 3) below.

3) LOOKUP(2,1/(H4=INDEX(IF(B2:F10<>"", B2:F10
ROW(A2)+1): Using 2 as the looup_value in this m
from the result_vector of "ROW(A2:A10)-ROW(A2
range) corresponding with this Last Match. This r
C2:C10. Using this value of 8 with the INDEX func

Explanation of I11 formula - Last Column:


1) LARGE(IF(H4=B2:F10,IF(B2:F10<>"",COLUMN(B
value occurs. This is similar to the I7 formula as e
INDEX function - "INDEX(B1:F1," - returns the Col

Explanation of I12 formula - 1st Row in Last Column


1) INDEX(IF(B2:F10<>"",B2:F10),,LARGE(IF(H4=B2
wherein H4 value occurs. Note: The formula work
formula to ignore blank cells which may behave a
INDEX returns the values from the 4th column ie.
2) MATCH(H4,INDEX(B2:F10,,LARGE(IF(H4=B2:F1
lookup_value and the 1) above as the lookup_arra
above. This mans that cell H4 value appears in the
the corresponding header from column A which is
Explanation of I13 formula - Last Row in Last Colum
1) INDEX(IF(B2:F10<>"",B2:F10),,LARGE(IF(H4=B2
explanation of cell I12 formula and returnes the va
2) (H4=INDEX(IF(B2:F10<>"",B2:F10),, LARGE(IF(H
values - {FALSE;TRUE; FALSE;FALSE; FALSE;TR
H4 value. Dividing this by 1 returns an array of #D
cells containg H4 value (TRUE is converted to 1 a
explained in 3) below.

3) LOOKUP(2,1/(H4=INDEX(IF(B2:F10<>"",B2:F10)
ROW(A2)+1): Using 2 as the looup_value in this m
from the result_vector of "ROW(A2:A10)-ROW(A2
range) corresponding with this Last Match. This r
E2:E10. Using this value of 6 with the INDEX funct

Note: All other formulas are a variation of 1st / Las


using row_num and column_num arguments of ab
ccurrences in a Range, where it appears First or Last
range B2:F10 - return Headers where it appears First or Last in Columns / Rows.
Header (from range A2:A10) for: (i) cell I7: 1st Column of H4 occurrence; (ii) cell I8: 1st Row in 1st Column of H4 occurrence; (iii) cell
ell I11: Last Column of H4 occurrence; (v) cell I12: 1st Row in Last Column of H4 occurrence; (vi) cell I3: Last Row in Last Column of
rmulas (Ctrl+Shift+Enter).

la - 1st Column:
:F10<>"",COLUMN(B2:F10)-COLUMN(B2)+1)) - returns an array of FALSE values and numbers, for 5 columns & 9 rows of the range -
SE,FALSE, FALSE; FALSE, FALSE,3,4, FALSE; FALSE, FALSE,FALSE, FALSE,FALSE; FALSE, FALSE, 3,FALSE,FALSE;...} - the
column positions in the range B2:F10 where H4 value occurs, for example the numbers 3 & 4 in the 3rd cells of the 2nd row indicate
ve the cell H4 value (420).
10,IF(B2:F10<>"",COLUMN(B2:F10)-COLUMN(B2)+1)),1): the SMALL function (returns 2), used with k argument of 1, is used to
umn, and then using the INDEX function returns the Column Header from range B1:F1.
works for finding the header for zero value also in the range - IF(B2:F10<>"" - is used in the formula to ignore blank cells which may

la - 1st Row in 1st Column:


10,IF(B2:F10<>"", COLUMN(B2:F10)-COLUMN(B2)+1)), 1) - As explained in point no 2) above for cell I7 formula, this determines the
n range B2:F10 where H4 value occurs. Using this as the column_num argument of INDEX function - "INDEX(B2:F10,," - returns the
ere H4 value occurs (column C2:C10) - {110;210;310; 410;510;420; 710;420; 910}.

B2:F10,,SMALL(IF(H4=B2:F10,IF(B2:F10<>"",COLUMN(B2:F10)-COLUMN(B2)+1)),1)),0): using the MATCH function, with the


nt of 1) above which is the 1st column in the range where H4 value occurs, returns the position of 1st occurrence of H4 value in this
the INDEX function - "INDEX(A2:A10," - returns the Row Header from the range A2:A10 (ie. R6 which is in 6th position in cell A7).

la - Last Row in 1st Column:


10,IF(B2:F10<>"",COLUMN(B2:F10)-COLUMN(B2)+1)),1): As explained in point no 2) above for cell I7 formula, this determines the 1st
nge B2:F10 where H4 value occurs. It returns 2 which indicates that cell H4 value appears first in the 2nd column - C2:C10, among
this as the column_num argument of INDEX function - "INDEX(B2:F10,," - returns the 1st column values where H4 value occurs
0;210;310; 410;510;420; 710;420; 910}.

10<>"",B2:F10),, SMALL(IF(H4=B2:F10,IF(B2:F10<>"", COLUMN(B2:F10)-COLUMN(B2)+1)), 1))): returns an array of FALSE and TRUE


SE; FALSE;FALSE; FALSE;TRUE; FALSE;TRUE; FALSE} - TRUE indicates the cells in the column as per 1) above which have the cell
s by 1 returns an array of #DIV/0! errors and 1s - {#DIV/0!;#DIV/0! ;#DIV/0!;#DIV/0!; #DIV/0!;1;#DIV/0!;1; #DIV/0!} - the 1s represent the
ue (TRUE is converted to 1 and FALSE ro zero when divided by 1. This is the lookup_vector argument of the LOOKUP function as

NDEX(IF(B2:F10<>"", B2:F10),, SMALL(IF(H4=B2:F10,IF(B2:F10<>"", COLUMN(B2:F10)-COLUMN(B2)+1)),1))), ROW(A2:A10)-


as the looup_value in this manner, will return the LAST Match or Last occurrence of 1 in the lookup_vector, and thereby the value
r of "ROW(A2:A10)-ROW(A2)+1" (which returns consecutive numbers from 1 to 9 which is equivalent to the number of rows in the
with this Last Match. This returns 8 which means that the last position of cell H4 value appearance is the 8th position in column
lue of 8 with the INDEX function - "INDEX(A2:A10," - returns the Row Header from the range A2:A10 (ie. R8 which is in 8th position).

ula - Last Column:


10,IF(B2:F10<>"",COLUMN(B2:F10)-COLUMN(B2)+1)),1) - returns the Last column number (ie. 4) in the range B2:F10 in which the H4
similar to the I7 formula as explained above except that in I11 the LARGE function is used instead of SMALL used in I7. using the
EX(B1:F1," - returns the Column Header from B1:F1 ie. the 4th position which is H4.

ula - 1st Row in Last Column:


"",B2:F10),,LARGE(IF(H4=B2:F10,IF(B2:F10<>"",COLUMN(B2:F10)-COLUMN(B2)+1)),1)) - returns the values in the Last Column
urs. Note: The formula works for finding the header for zero value also in the range because "IF(B2:F10<>"", B2:F10)" is used in the
nk cells which may behave as zeros. The LARGE function is similar as explained in cell I11 explanation above & returns 4, and using
ues from the 4th column ie. E2:E10 - {130;420; 330;430; 530;420; 730; 440;930}.
B2:F10,,LARGE(IF(H4=B2:F10,IF(B2:F10<>"",COLUMN(B2:F10)-COLUMN(B2)+1)),1)),0): using the MATCH function with cell H4 as the
1) above as the lookup_array, returns the position of 1st occurrence of cell H4 value (ie. 2) in the Last column as determined in 1)
t cell H4 value appears in the 2nd position in column E2:E10 (ie. in cell E3) and using the INDEX function - "INDEX(A2:A10," - returns
ader from column A which is R2.
ula - Last Row in Last Column:
"",B2:F10),,LARGE(IF(H4=B2:F10,IF(B2:F10<>"",COLUMN(B2:F10)-COLUMN(B2)+1)),1)): this is the same as point 1) above in
2 formula and returnes the values in the Last column wherein H4 value occurs.
10<>"",B2:F10),, LARGE(IF(H4=B2:F10, IF(B2:F10<>"", COLUMN(B2:F10)-COLUMN(B2)+1)), 1))): returns an array of FALSE and TRUE
E; FALSE;FALSE; FALSE;TRUE; FALSE;FALSE; FALSE} - TRUE indicates the cells in the column as per 1) above which have the cell
s by 1 returns an array of #DIV/0! errors and 1s - {#DIV/0!;1; #DIV/0!;#DIV/0!; #DIV/0!;1; #DIV/0!;#DIV/0!; #DIV/0!} - the 1s represent the
ue (TRUE is converted to 1 and FALSE ro zero when divided by 1. This is the lookup_vector argument of the LOOKUP function as

NDEX(IF(B2:F10<>"",B2:F10),, LARGE(IF(H4=B2:F10,IF(B2:F10<>"", COLUMN(B2:F10)-COLUMN(B2)+1)), 1))), ROW(A2:A10)-


as the looup_value in this manner, will return the LAST Match or Last occurrence of 1 in the lookup_vector, and thereby the value
r of "ROW(A2:A10)-ROW(A2)+1" (which returns consecutive numbers from 1 to 9 which is equivalent to the number of rows in the
with this Last Match. This returns 6 which means that the last position of cell H4 value appearance is the 6th position in column
ue of 6 with the INDEX function - "INDEX(A2:A10," - returns the Row Header from the range A2:A10 (ie. R6 which is in 6th position).

as are a variation of 1st / Last Column / Row, and thus explanation is similar as above. Cells I24 / I25 use the ADDRESS function,
olumn_num arguments of above.
4 occurrence; (iii) cell
Row in Last Column of

& 9 rows of the range -


E,FALSE;...} - the
of the 2nd row indicate

nt of 1, is used to

blank cells which may

a, this determines the


B2:F10,," - returns the

ction, with the


nce of H4 value in this
position in cell A7).

this determines the 1st


mn - C2:C10, among
re H4 value occurs

ay of FALSE and TRUE


ove which have the cell
} - the 1s represent the
OOKUP function as

ROW(A2:A10)-
nd thereby the value
umber of rows in the
position in column
hich is in 8th position).

B2:F10 in which the H4


used in I7. using the

n the Last Column


B2:F10)" is used in the
& returns 4, and using

ction with cell H4 as the


n as determined in 1)
DEX(A2:A10," - returns
oint 1) above in

ray of FALSE and TRUE


ove which have the cell
!} - the 1s represent the
OOKUP function as

ROW(A2:A10)-
nd thereby the value
umber of rows in the
position in column
hich is in 6th position).

ADDRESS function,
6 5 0 4 2 6 5 4 0 2 2 Uses Frequency function - Array formula (Ctrl+Shift+Ente
6 5 4 0 2 2 Uses MMULT function - Array formula (Ctrl+Shift+Enter)
6 5 4 1 2
5 4 3 2 3 Match Row values with Multiple Rows - Array Matching - Number of Ro
6 5 4 2 Count number of rows in the array (A2:E7) with same values & exactl
6 5 4 0 2 Each value of G2:K2 should match and be in the same order. Blank c

Explanation of M2 formula:
1) ROW(A2:E7): returns an array of numbers from 2 till 7 - {2;3;4;5;6;7
grouped to determine their occurrence and frequency.

2) IF(IF(A2:E7<>"",A2:E7)=IF(G2:K2<>"",G2:K2),ROW(A2:E7)): this re
4,4,4,FALSE,4; FALSE,FALSE,FALSE,FALSE,FALSE; 6,6,6,FALSE,6; 7
returning a FALSE value. This formula compares the non-blank cell v
IF(G2:K2<>"",G2:K2) - and if there are matching values in a row(s) the
E2 values match cell G2, H2 & K2 values (the number 2 indicating the
indicating the row number). And so on. The aim is to determine row n
This is the data_array argument of the FREQUENCY function.

3) FREQUENCY(IF(IF(A2:E7<>"",A2:E7)=IF(G2:K2<>"",G2:K2),ROW(A
bins_array argument in 1) above, returns the number of times each n
of each number of bins_array returns the frequency. This means that
Frequencies - {3;5;4;0;4;5;0} - the numbers indicate the numebr of ce
(A2:E2) has 3 cells whose value match G2:K2, the next number 5 mea

4) COLUMNS(G2:K2) - this returns 5 and is used to check with the Fre


values of a row have an exact match with G2:K2. Using the IF functio
values match with the 5 cells of G2:K2.

Explanation of M3 formula:
--(IF(A2:E7<>"",A2:E7)=IF(G2:K2<>"",G2:K2)): this is the array1 of the
columns - {1,1,0,0,1; 1,1,1,1,1; 1,1,1,0,1; 0,0,0,0,0; 1,1,1,0,1; 1,1,1,1,1} -
1s (for example the 2nd row and the last row) is the one in which all v
TRANSPOSE(COLUMN(G2:K2)^0) - this is array2 of the MMULT funct
used to convert the 1s into row values because the number of colum
--(MMULT(--(IF(A2:E7<>"",A2:E7)=IF(G2:K2<>"",G2:K2)),TRANSPOSE
indicating that each value of a row matches (at the same position) wi
function returns the number of rows where all values match with G2:
tion - Array formula (Ctrl+Shift+Enter)
n - Array formula (Ctrl+Shift+Enter)

ws - Array Matching - Number of Rows in a Range where All Cells Match with All cells of a separate Row.
y (A2:E7) with same values & exactly in the same order as the row in G2:K2.
h and be in the same order. Blank cells are NOT equivalent to zeros.

of numbers from 2 till 7 - {2;3;4;5;6;7}. This is the bins_array argument of the FREQUENCY function against which the data_array values are
rence and frequency.

K2<>"",G2:K2),ROW(A2:E7)): this returns an array of values comprising of 6 rows and 5 columns (A2:E7) - {2,2,FALSE,FALSE,2; 3,3,3,3,3;
LSE,FALSE,FALSE; 6,6,6,FALSE,6; 7,7,7,7,7}. Using "IF(A2:E7<>"",A2:E7)" distinguishes between blank cells and zeros, with blank cells
mula compares the non-blank cell values in the range A2:E7 - IF(A2:E7<>"",A2:E7) - with the the non-blank cell values in the range G2:K2 -
e are matching values in a row(s) the returns the row number from 2 to 7. For example, the 1st row has three 2s which means that cell A2, B2 &
values (the number 2 indicating the row number). The 2nd row has five 3s which means that all 5 cells A3:E3 match with H2:K2 (the number 3
so on. The aim is to determine row numbers which appear 5 times (like A3:E3) which indicates that ALL values of a row have an exact match.
f the FREQUENCY function.

A2:E7)=IF(G2:K2<>"",G2:K2),ROW(A2:E7)),ROW(A2:E7)) - Using the FREQUENCY function with the data_array argument in 2) above, and the
returns the number of times each number in bins_array argument occurs (this is the frequency of occurrence). Note that only the 1st instance
urns the frequency. This means that frequency is returned for each unique number of bins_array argument. The formula returns an array of
numbers indicate the numebr of cells having the same values as G2:K2 in each row, for example the 1st number 3 means that the 1st row
match G2:K2, the next number 5 means that all the 5 values of the 2nd row (A3:E3) match G2:K2, and so on.

s 5 and is used to check with the Frequencies in 3) above - the aim is to determine the rows with the number 5 times which indicates that ALL
tch with G2:K2. Using the IF function to return 1 where a row has 5 matches, and then using SUM returns the number of rows wherein all 5
2:K2.

>"",G2:K2)): this is the array1 of the MMULT function and returns an array of 1s and zeros for each row and column of A2:E7 ie. 6 rows and 5
,1,0,1; 0,0,0,0,0; 1,1,1,0,1; 1,1,1,1,1} - where 1s indicate positional match with G2:K2 values and zeros indicate no-match. The row containing all
he last row) is the one in which all values match positionally with G2:K2.
) - this is array2 of the MMULT function and returns an array of 1s equivalent to the number of columns in G2K2 - {1;1;1;1;1}. TRANSPOSE is
alues because the number of columns in array1 must be the same as the number of rows in array2.
=IF(G2:K2<>"",G2:K2)),TRANSPOSE(COLUMN(G2:K2)^0))=COLUMNS(G2:K2)): returns an array - {0;1;0;0;0;1} - of 1s and zeros with 1s
w matches (at the same position) with H2:K2 ie. all 5 cells of a row in A2:E7 range match will each of the 5 cells of G2:K2. Using the SUM
ws where all values match with G2:K2 values.
ata_array values are

ALSE,2; 3,3,3,3,3;
s, with blank cells
n the range G2:K2 -
means that cell A2, B2 &
h H2:K2 (the number 3
have an exact match.

t in 2) above, and the


at only the 1st instance
a returns an array of
ans that the 1st row

hich indicates that ALL


f rows wherein all 5

A2:E7 ie. 6 rows and 5


. The row containing all

;1;1}. TRANSPOSE is

d zeros with 1s
2. Using the SUM
Increment or Repeat Numbers Sequence.
1 1 1.00 A-001 5 1 1 1 1
1 1 1.33 A-001 5 2 2 2 4 Column A & C:
1 1 1.67 A-001 5 3 3 3 7 Increment Numbers starting from 1, repeating each num
2 2 2.00 A-002 6 4 1 1 10 Enter formula in cell A2 / C2 (or start at any other cell) &
2 2 2.33 A-002 6 5 2 2 13
2 2 2.67 A-002 6 6 3 3 16 Column E:
3 3 3.00 A-003 7 7 1 1 19 Increment Numbers starting from 1, repeating the Intege
3 3 3.33 A-003 7 8 2 2 22 will consider only the Integer part and ignore the decima
3 3 3.67 A-003 7 9 3 3 25 could have precisely repeated 1 three times, then 2 three
4 4 4.00 A-004 8 10 1 1 28 Enter formula in cell C2 (or start at any other cell) & copy
4 4 4.33 A-004 8 11 2 2 31
4 4 4.67 A-004 8 12 3 3 34 Column G:
5 5 5.00 A-005 9 13 1 1 37 Increment Numbers starting from 1, repeating each num
5 5 5.33 A-005 9 14 2 2 40 Replace 3 in the formula with the number of times requir
5 5 5.67 A-005 9 15 3 3 43
6 6 6.00 A-006 10 16 1 1 46 Column I:
6 6 6.33 A-006 10 17 2 2 49 Increment Numbers starting from 5, repeating each num
6 6 6.67 A-006 10 18 3 3 52
7 7 7.00 A-007 11 19 1 1 55 Column K:
7 7 7.33 A-007 11 20 2 2 58 Increment Numbers starting from 1 - no repeats. Enter fo

Column M:
Enter consecutive numbers 1, 2 & 3 in three cells, and re
Enter formula in cell K2 (or start at any other cell) & copy

Column O:
Enter consecutive numbers 1, 2 & 3 in three cells, and re
Enter formula in cell M2 (or start at any other cell) & copy
Deleting a row will Not affect the sequence: The M2 form
"ROW()-ROW(M$2)" in M2 - column M results will not be

Column Q:
Increment Numbers by 3, starting from 1 - Enter formula
this becomes "(ROW(A2)-1)*3" in the next cell which retu
Alternatively this formula can be used - "=(ROW()-ROW(Q
umbers Sequence.

tarting from 1, repeating each number 3 times (replace 3 in the formula with the number of times required to be repeated).
A2 / C2 (or start at any other cell) & copy down.

tarting from 1, repeating the Integer part number 3 times each. Using this as the row_num argument of the INDEX function, the INDEX function
Integer part and ignore the decimal (an efficient formula with similar effect as cell A2 formula). This avoids using the ROUND function which
repeated 1 three times, then 2 three times, and so on.
C2 (or start at any other cell) & copy down.

tarting from 1, repeating each number 3 times, in text format ("000") and Precede each number with specific text: "A-".
ula with the number of times required to be repeated. Enter formula in cell E2 (or start at any other cell) & copy down.

tarting from 5, repeating each number 3 times. Enter formula in cell G2 (or start at any other cell) & copy down.

tarting from 1 - no repeats. Enter formula in cell I2 (or start at any other cell) & copy down.

mbers 1, 2 & 3 in three cells, and repeat this pattern going down. Replace 3 in the formula with the number of consecutive numbers required.
K2 (or start at any other cell) & copy down.

mbers 1, 2 & 3 in three cells, and repeat this pattern going down. Replace 3 in the formula with the number of consecutive numbers required.
M2 (or start at any other cell) & copy down.
t affect the sequence: The M2 formula is similar to cell K2 formula, except that "ROW(A1)-1" which is used in K2 has been replaced with
n M2 - column M results will not be affected by deleting any inbetween row and will also not give any #REF! error.

y 3, starting from 1 - Enter formula in cell Q2 and copy down. Using "(ROW(A1)-1)*3" returns zero and adding 1 returns 1 in the 1st cell, and
A2)-1)*3" in the next cell which returns 3 and then adding 1 returns 4 in the next cell. This way each succeeding cell is incremented by 3.
mula can be used - "=(ROW()-ROW(Q$2))*3+1" where "Q$2" can be replaced with the start cell.
d).

ion, the INDEX function


OUND function which

ve numbers required.

ve numbers required.

een replaced with

1 in the 1st cell, and


ncremented by 3.
From a String comprising of Comma Separated (Comma OR Semi-colon
12345678, 234567891234, abcdef , wxyz , 255
Cell A2 contains a string comprising of multiple sub-strings separated
12345678 Extract each comma separated sub-string in consecutive cells, in a col
234567891234
abcdef Cell A13 contains a string comprising of multiple sub-strings separated
wxyz Extract each comma (or semi-colon) separated sub-string in consecutiv
255
Explanation of cell A4 formula:
Refer this tab which has similar formula in cell D2, for explanation:
Cell A4 formula uses "ROW(A1)" which enters 1 in the 1st cell, 2 in th

She sells ; 100 seashells, by the ;seashore,345 Explanation of cell A15 formula:
This formula is similar to cell A4 formula, except that in cell A15, the c
She sells substituted with a comma, and then the comma separator is used sim
100 seashells
by the
seashore
345
a Separated (Comma OR Semi-colon Separated) Sub-strings, Extract each Sub-string in Consecutive Cells of a Column

g of multiple sub-strings separated by comma.


-string in consecutive cells, in a column - enter formula in cell A4 & and copy down till A10.

ng of multiple sub-strings separated by Comma OR Semi-colon.


n) separated sub-string in consecutive cells, in a column - enter formula in cell A15 & and copy down till 21.

ormula in cell D2, for explanation: #REF!


which enters 1 in the 1st cell, 2 in the next cell, 3 in the next and so on. This extracts the 1st, 2nd, 3rd … sub-strings.

ormula, except that in cell A15, the cell A13 string is entered as "SUBSTITUTE(A$13,";",",")" so that each semi-colon in cell A13 is
en the comma separator is used similar to cell A4 formula.
Names Gender Names Names Vlookup Multiple Values - Return MULTIPLE corresponding values for ONE Looku
Kelly M M Kelly Kelly
Stacey F John John Return all Names from Column A where column B Gender corresponds to cell D2
John M Tim Tim Column E: uses INDEX-SMALL functions - enter Array formula (Ctrl+Shift+Enter
Broad Broad Column F: uses INDEX-AGGREGATE functions - enter Normal Non-Array formu
Tim M Ron Ron
Mary F
Kim F Explanation of cell E2 Formula:
1) IF((B$2:B$20=D$2)*(A$2:A$20<>""), ROW(A$2:A$20)-ROW(A$2)+1): returns a
11;FALSE;…} - the numbers are the positions / row numbers for non-blank cells
Broad M example, the 1st number 1 indicates that cell A2 is not blank and cell B2 = "M",
Jane F 2) "ROW(A1)" enters 1 in the start cell and then 2 in the next cell, 3 in the next a
Ron M k argument of the SMALL function. Using SMALL with the array of 1) above retu
smallest in the 3rd cell ie. 5, and so on, and this is the row_num argument of the
3) INDEX(A$2:A$20,SMALL(IF((B$2:B$20=D$2)*(A$2:A$20<>""),ROW(A$2:A$20)
names for positions returned by the SMALL function in 2) above, in consecutive
the number 1), cell A4 name of "John" in the next cell (corresponding to the num
used to return blank cells after relevant cell values have all been entered.

Explanation of cell F2 Formula:

1) ROW(A$2:A$20)-ROW(A$2)+1: returns an array of consecutive numbers from


14; 15;16; 17; 18;19}. "(B$2:B$20=$D$2)*(A$2:A$20<>"")" - returns an array of 1s
A2:A20 where corresponding cells in range B2:B20 contain cell D2 value of "M"
3rd position indicates that cell A4 is not blank and cell B4 = "M", and so on. Usi
and error values - {1;#DIV/0!; 3;#DIV/0!; 5;#DIV/0!; #DIV/0!;#DIV/0!; 9;#DIV/0!;11;
corresponding column B cells contain cell D2 value of "M", and this is also the a

2) AGGREGATE(15,6,(ROW(A$2:A$20)-ROW(A$2)+1)/((B$2:B$20=$D$2)*(A$2:A$
for k argument for array of 1) above, returns the Smallest number (ie. 1) from the
3rd cell, and so on as the formula is copied down. Using 15 as the function_num
function), using the options argument of 6 in AGGREGATE function ignores the
explained in 3) below.
3) Using the INDEX function, with the array - "INDEX(A$2:A$20," - returns the co
AGGREGATE function - returns cell A2 name of "Kelly" in the 1st cell (correspo
name of "Tim" in the next cell (corresponding to the number 5), and so on.
rresponding values for ONE Lookup Value, using INDEX-SMALL or INDEX-AGGREGATE Functions

n B Gender corresponds to cell D2 value - return Multiple Names from column A for one Lookup value of D2
ter Array formula (Ctrl+Shift+Enter) in cell E2 and copy down.
ns - enter Normal Non-Array formula in cell F2 and copy down.

A$2:A$20)-ROW(A$2)+1): returns an array of numbers and FALSE values - {1;FALSE;3; FALSE;5; FALSE;FALSE; FALSE;9;FALSE;
/ row numbers for non-blank cells in the range A2:A20 where corresponding cells in range B2:B20 contain cell D2 value of "M". For
A2 is not blank and cell B2 = "M", the next number 3 indicates that cell A4 is not blank and cell B4 = "M", and so on.
en 2 in the next cell, 3 in the next and so on, thereby incrementing values starting from 1 as the formula is copied down. This represents the
ALL with the array of 1) above returns the smallest number in the 1st cell ie. 1, the 2nd smallest number in the next cell ie. 3, the next
his is the row_num argument of the INDEX function explained in 3) below.
2)*(A$2:A$20<>""),ROW(A$2:A$20)-ROW(A$2)+1),ROW(A1))): using the INDEX function with the array of "A2:A20" returns the column A cell
unction in 2) above, in consecutive cells as the formula is copied down. This returns cell A2 name of "Kelly" in the 1st cell (corresponding to
next cell (corresponding to the number 3), cell A6 name of "Tim" in the next cell (corresponding to the number 5), and so on. IFERROR is
alues have all been entered.

rray of consecutive numbers from 1 to 19, representing the number of rows / cells in the range A2:A20 - {1;2; 3;4; 5;6;7; 8;9; 10; 11; 12; 13;
:A$20<>"")" - returns an array of 1s and zeros - {1;0;1;0;1; 0;0;0;1; 0;1;0;0;0; 0;0;0;0;0} - where 1 represents non-blank cells in the range
2:B20 contain cell D2 value of "M". For example, the 1st 1 in 1st position indicates that cell A2 is not blank and cell B2 = "M", the next 1 in
k and cell B4 = "M", and so on. Using - (ROW(A$2:A$20)- ROW(A$2)+1)/ ((B$2:B$20= $D$2)*( A$2:A$20 <>"")) - returns an array of numbers
V/0!; #DIV/0!;#DIV/0!; 9;#DIV/0!;11; #DIV/0!;...} - the numbers indicate the row numbers or positions of non-blank column A cells where
2 value of "M", and this is also the array argument of the AGGREGATE function as explained in 2) below.

A$2)+1)/((B$2:B$20=$D$2)*(A$2:A$20<>"")), ROW(A1)): using the AGGREGATE function, with function_num argument of 15 and "ROW(A1)"
he Smallest number (ie. 1) from the array in the 1st cell, the 2nd smallest number (ie. 3) in the 2nd cell, the 3rd smallest number of 5 in the
own. Using 15 as the function_num argument of AGGREGATE returns the smallest values as per k argument (it is similar to using SMALL
AGGREGATE function ignores the error values. This value returned by AGGREGATE is the row_num argument of the INDEX function as

"INDEX(A$2:A$20," - returns the corresponding name from the range A2:A20 for the row_num positions returned in 2) above by using the
of "Kelly" in the 1st cell (corresponding to the number 1), cell A4 name of "John" in the next cell (corresponding to the number 3), cell A6
g to the number 5), and so on.
SE;9;FALSE;
ue of "M". For

n. This represents the


ell ie. 3, the next

rns the column A cell


cell (corresponding to
so on. IFERROR is

7; 8;9; 10; 11; 12; 13;


cells in the range
2 = "M", the next 1 in
an array of numbers
mn A cells where

of 15 and "ROW(A1)"
st number of 5 in the
ilar to using SMALL
INDEX function as

above by using the


e number 3), cell A6
Tax Rate Income Calculate Total Tax on Income per Slab Rates - can be used to calculate T
40% 0 300,000 > Total Income
10% 75,000
10% 150,000 165,000 Calculate Total Tax per slab rates, using cell references
15% 250,000 165,000 Calculate Total Tax per slab rates, using absolute numbers

Calculate Total Tax on Income (D2), per slab rates: Calculation:


For income 0 to 75,000, tax rate is 40% If Income<=75,000 then: D2*0.4 - at 75,000 income tax is 30,
For income over 75,000 and upto 150,000 tax rate is 50% If Income>75,000 but less than or equal to 150,000 then: 30,
For income over 150,000 and upto 250,000 tax rate is 60% If Income>150,000 but less than or equal to 250,000 then: 67
For income over 250,000 tax rate is 75% If Income>250,000 then: 127,500+(D2-250,000)*0.75

Explanation of cell D4 formula:


(D2>B2:B5): returns an array of TRUE or FALSE values - {TRUE;TRUE; TRUE;TRUE} - checks for D2 exceeding each of the B2:B5
considered only where D2 amount exceeds the corresponding B2:B5 value, else FALSE is returned. Multiplying with TRUE orFALS
(D2>B2:B5)*(D2-(B2:B5)): returns an array of 4 values - {300000;225000; 150000;50000} - each value represents the excess of Total
excess of D2 (300,000) over B2 (zero), the 2nd value represents excess of D2 (300,000) over B3 (75,000), and so on. If the cell D2 in
only upto the excess of D2 value over the slab amount within which it falls (excess of D2 over B3 ie. 90000 minus 75000, is 15000 w
return zero due to the 1st condition (D2 is not > B4 and returns FALSE which returns zero).
(D2>B2:B5)*(D2-(B2:B5))*(A2:A5): returns an array of values - {120000;22500; 15000;7500} - these are the tax amounts at each incr
75,000)*10% = 225,000; and so on. The Tax Rates mentioned in A2:A5 are the incremental rates so that excess of D2 over B2 is tax
amount of D2 is taxed at A2 rate and only the excess of D2 over B3 is taxed at A3 rate. Using SUMPRODUCT will return the SUM a

Explanation of cell D5 formula:


This is similar to cell D4 formula, except that cell D5 formula contains absolute numbers instead of cell references.
can be used to calculate Tax, Sales Commission, etc. where Incremental Slab Rates are used

at 75,000 income tax is 30,000


equal to 150,000 then: 30,000+(D2-75,000)*0.5 - at 150,000 income tax is 67,500
r equal to 250,000 then: 67,500+(D2-150,000)*0.6 - at 250,000 income tax is 127,500
(D2-250,000)*0.75

eeding each of the B2:B5 values, and returns TRUE where it exceeds which ensures that the respective slab is
tiplying with TRUE orFALSE returns 1 or zero respectively.
esents the excess of Total Income (cell D2) over each of the 4 income slabs (B2:B5) ex. the 1st value represents
and so on. If the cell D2 income is "90,000" this will return the array - {90000;15000; 0;0} - note that each slab covers
00 minus 75000, is 15000 which is the 2nd amount in array, and which will be taxed at A3 rate) and the next slab will

e tax amounts at each incremental slab - the 1st value is (300,000-0)*40% = 120,000; the 2nd value is (300,000-
xcess of D2 over B2 is taxed at A2 rate, excess of D2 over B3 is taxed at A3 rate which in effect indicates that the full
UCT will return the SUM after multiplication which is the final tax.

eferences.
Id Value
A 127 37 K Return Closest Value to a Specific Value, from an Array of Values in a Column appearing i
B 345 Get Closest Value which may be equal to or less than or more than the C2 value, from co
C 562 Enter Array formula (Ctrl+Shift+Enter) in cell D2.
D -45
E -36 Explanation of cell D2 formula:
F -124 1) IF(B2:B20<>"",ABS(B2:B20-C2)): returns an array of values - {90;308;525; 82;73;161; 3
G 360 column B value and the cell C2 value. Using ABS returns only the absolute value of the d
H 267 column B by using - IF(B2:B20<>"" - this ignores blank cells which otherwise appear as
I 48 2) Using MIN with the array of 1) above returns the minimum difference, which indicates
J 19 MATCH function with the 1) array of values being the lookup_array. Using the MATCH fu
K 28 array - "INDEX(A2:A20," - returns the corresponding Id from column A.
L 111
M -69
N 55
Values in a Column appearing in Random Order
more than the C2 value, from column B values appearing in random order, and return corresponding Id from column A.

lues - {90;308;525; 82;73;161; 323;230;11; 18;9;74;106; 18;FALSE; FALSE;FALSE;…} - these are the difference between each
only the absolute value of the difference, skipping the negative sign. And this difference is returned only for non-blank cells of
ells which otherwise appear as zeros, and return FALSE.
um difference, which indicates the column B value which is closest to cell C2 value. This is used as the lookup_value in the
kup_array. Using the MATCH function returns the position of this closest column B value, and using INDEX function with column A
om column A.

You might also like