List of unique entries from column of space-separated strings 3

Given the list below in A1:A10, we may wish to create a list of unique, single words from that list, as per column B here.

Unique From Space Separated

We can do this with the following set-up: More…

Advanced Formula Challenge #6: Occurs once, non-contiguous range 9

The challenge this week is as follows: given a non-contiguous range, made up of an arbitrary number of single-column ranges, the values in each of which being either a numeric, text or null string, to generate a list, in numerical order and beginning in A2, of all numbers which occur precisely once within that range.

For example, in the below:

Occur Once Non-Contiguous Ranges


COUNTIFS: Multiple “OR” criteria for one or two criteria_Ranges 67

In this post I would like to clear up what appears to me to be a rather widespread misunderstanding of how COUNTIFS/SUMIFS operate, in particular when we pass arrays consisting of more than one element as the Criteria to one or even two of the Criteria_Ranges.

This latter technique is used when the criteria in question are to be considered as “OR” criteria, which is not to be confused with cases where we wish the criteria passed to be calculated rather as “AND” critieria.

For example, given the following data:


Advanced Formula Challenge #5: Results and Discussion 5

Last week I set readers the challenge which can be found here.

This is a reasonably complex problem, and certainly so if we want to present a solution which is relatively concise. However, despite its complexity (and arguably lack of practical use), the solution demonstrates some important techniques for working with strings, and so is not without merit.

The required set-up is as follows:


IFERROR techniques for excluding certain values from results 6

We are often in a position where we wish to exclude certain values from an array of results before passing that array to another function.

For example, a common, practical situation is that of finding the minimum value from a range whilst excluding zeroes. This can be done in several ways, for example using an array formula:


or, if we have Excel 2010 or later, using AGGREGATE:



Advanced Formula Challenge #5: Threes, Fives and Sevens Reply

The challenge this week is as follows: given an alphanumeric string of arbitrary length in A1, derive a single formula to return the number of numbers within that string which are divisible by either 3, 5 or 7.

By “divisible” here I mean of course that there is no remainder after division.

And by “numbers within that string” I mean all consecutive substrings of any length within that string which may be interpreted as a number. (It can also safely be assumed that there are no alphanumeric combinations within the string in A1 which would be interpreted by Excel as numeric, e.g. JAN01.)

For example, the string:


contains, by this definition, 13 numbers: 3, 0, 30, 5, 4, 2, 42, 7, 7, 1, 77, 71 and 771.


Advanced Formula Challenge #4: Results and Discussion Reply

Last week I set readers the challenge which can be found here.

This one turns out to be a good deal more complex than it at first appears, and so perhaps not surprisingly no correct results were received..

GreasySpot at first thought that Advanced Filter would be a viable solution, but quickly realised that it wasn’t actually appropriate here. Besides, as I mentioned, the idea of this (and of all these challenges in fact) is to try to achieve the results using worksheet formulas alone.

So how can we achieve our desired results?


Which numbers add up to total? 26

Sometimes we are in a situation where we have a target figure plus a series of values and we want to know which, if any, combination of those values has a sum which is equal to the target.

This can be done as follows:

Which numbers add up to total

Edit: this post has now been revised here to account for multiple returns, should that be a requirement.

Using the above set-up, with our target value in A2 and our (in this case 9) values in C1:K1, we will place formulas in C2:K2 which will contain an “X” if the value in the row above forms part of our solution.


Advanced Formula Challenge #3: Results and Discussion 3

Last week I posed readers the challenge which can be found here.

One solution was received, again from Bill, and this time it was not only correct, but a very good solution indeed. So congratulations again to Bill!

In fact, rather than dissect my own solution this week (which in any case differs only in minor details from Bill’s), I would like to present a breakdown of the solution given by Bill, as follows:


INDEX: Returning an array of values 26

Perhaps one of the most widely-believed myths surrounding INDEX is that it is not possible to coerce a return of more than one value from the array passed to it.

At first sight, and after various attempts at coercing such a return (including array-entry), it does indeed seem for all the world that INDEX cannot be so induced, and stubbornly persists in returning just the first element in any array generated.

Granted, the required coercions are not obvious (the first of which is borderline tautological: the necessary initial clause, IF(1,… – or any other suitable value in place of 1 – is self-evidently TRUE), though, for example, the following non-array formula:


Advanced Formula Challenge #3: Numbers From Hyphen-Separated List 17

Given the list in A1:A6, where some entries consist of a single number and some of a grouping of numbers (where e.g. 13-16 represents 13, 14, 15 and 16), the challenge this week is to come up with a single formula in D1 which, when copied down an arbitrary number of rows, produces a list of all individual, ungrouped numbers from the list in A1:A6, as here:


The formula is to return a blank in rows beyond the expected number of returns. What’s more, this must be done via reference to a second formula, in C1, also to be derived and whose value is to equal the total expected number of non-blank entries to be returned in column D for any given dataset.


INDEX: An alternative to array (CSE) formulas 1

The property of INDEX of being able to return entire rows/columns has several important applications, one of which is to force an array of returns to be passed to another function which otherwise would require entering as an array formula, i.e. with CSE.

For example, the following formula, one possibility for returning the relative position of the first non-blank cell in the range A1:A10: