Cleaning up text in Excel: CLEAN, TRIM, and SUBSTITUTE

In Excel, you will occasionally deal with text fields containing line breaks, multiple spaces, hyphenation, currency and letterlike symbols, etc. This is common when dealing with unrestricted user-inputted data and can cause issues. In particular, these kinds of values will be hard to connect with related values without cleanup. When we MATCH those values with related data tables, errors are bound to occur.   Basic cleanup approaches include manual replacement of all of the unnecessary characters with a desired or

EOMONTH function – calculate past or future date from the starting date

You will sometimes need to calculate one date based on another date. Most often, you will need the first or last date of the current month, the first or last date of the current year, the previous or future month, year, quarter dates etc. No matter what kind of dates you need, the simplest way to generate them will include EOMONTH function.   The EOMONTH function returns the last day of the month in relation to the start date.  

SUMIFS by text string length

Values that meet one or more criteria can be added up with the SUMIFS function. The sum of values next to cells containing specific text, i.e., a sum based on text criteria, is possibly the most common use-case. The sum of values next to cells containing (non) specific text of a defined length (the defined number of characters in a text string) is far less common need – but still crucial in specific situations.   We can accomplish this task

UNICODE and UNICHAR functions

The Unicode Standard is the primarily used scheme for internal processing and storage of text, with almost 150 thousand code points representing characters. The Unicode Standard is supported in Excel. However, some functions for text manipulation still support only ASCII or ANSI character sets. Examples of those include the CLEAN function and the TRIM function. The CODE function and the CHAR function used for character manipulation also fall into that category. Full character manipulation is available through the UNICODE function and

Combining INDIRECT with ADDRESS

We’ve previously covered how we can use any function to generate a text that could be a valid cell reference, both column and row part of the address, and then use the INDIRECT function to convert that text to a cell reference. This process can be greatly enhanced by the ADDRESS function.   The ADDRESS function returns a text string that represents the address of a particular cell. Row, column, type of reference (locked or absolute), reference style (A1 or

INDIRECT function

The INDIRECT function returns the reference specified by a text string. The INDIRECT function syntax is as follows: = INDIRECT ( reference_text ; reference_style ) Reference text can be any text that the function can “convert” to a cell reference. Reference style represents the style of referencing cells in Excel. If omitted or TRUE, reference text is interpreted as an A1 style reference i.e. the default style of referencing cells in Excel. If FALSE, reference text is interpreted as an

How to MATCH numbers formatted as text in Excel

You will sometimes encounter errors while trying to MATCH or LOOKUP data in Excel if your numbers are formatted as numbers in one of your tables, and as text in another table. While special formats are available in Excel, they are relatively rarely used and are limited. Some “numbers” such as identification numbers are more often stored as text. This is done in order to add leading zeros, hyphens and other characters to that numbers. However, if we try to

RANK functions

Ranking is data transformation in which values are replaced by their rank when the data is sorted. For any two items, the first is either ranked higher than ranked lower than ranked equal to the second. Values can be ranked from the smallest, or from the largest.   Ordinal ranking presumes that all items will receive distinct ordinal numbers, including items that compare equal. Distinct ordinal numbers for items that are equal can be assigned arbitrarily, but it is also

SMALL & LARGE functions

The SMALL function returns the k-th smallest number from an array of numbers. The SMALL function syntax is as follows: = SMALL ( array; k ) Array can be any row, column, or a combination of both. k is an integer number representing the position of a number in the array if data in that array would be sorted from the smallest.   Consider the following example: If k is 1, the smallest number will be returned. If k is

SUMIFS criteria: formulas, functions and conditional statements

We’ve previously established what are the rules of writing criteria in the SUMIFS function: we can reference any cell we can enter any number directly in the function we can enter text directly in the function, nested inside of quotation marks [“”] logical test is nested inside of quotation marks [“”], with comparison operator coming first and a number second. The story however does not end there, and advanced users can do even more with the SUMIFS function.   We