Exceljet

Quick, clean, and to the point

Make words plural

Excel formula: Make words plural
Generic formula 
IF(n>1,IFNA(VLOOKUP(A1,wordtable,2,0),A1&"s"),A1)
Summary 

To make a singular noun plural based on a given number of items, you can use a formula based on concatenation and the IFNAVLOOKUP, and IF functions. In the example shown, the formula in D5 copied down is:

=B5&" "&IF(B5>1,IFNA(VLOOKUP(C5,wordtable,2,0),C5&"s"),C5)

where wordtable is the named range F5:G11. If the number in column B is greater than 1, the result is a "pluralized" noun. If the number is one, the result is the original (singular) word.

Explanation 

In this example, the goal is to make a noun plural when the number of items is greater than one. In many cases, a noun can be made plural by adding an "s". However, many nouns have an irregular plural form, and the main challenge is to handle these exceptions.

Ingredients

In the example shown, the formula uses these ingredients:

Note: There are many ways to solve a problem like this in Excel, and this is just one approach.

Adding an "s"

In the simplest case, the only task is to add an "s" to the end of a word using concatenation. This can be done with a formula like this:

=C5&"s" // simple concatenation

The ampersand operator (&) is used to join an "s" to the word in column C.

However, we don't want to add an "s" unless the number in column B is greater than 1. For this, we can use the IF function to check the number in column B:

=IF(B5>1,C5&"s"),C5)

In this version of the formula, we only add an "s" when the number in B5 is greater than 1. At this point, the formula handles the base case without trouble, but it won't handle words with irregular plural forms.

Handling irregular forms

To handle words with an irregular plural form, we need to perform a lookup. In the example shown, we do this with the VLOOKUP function:

=VLOOKUP(C5,wordtable,2,0)

where wordtable is the named range F5:G11. Here, we use VLOOKUP to locate a word in a table and return the irregular plural from the second column. Obviously, this only works when the table contains an entry for a given word. If a word does not exist in the table, VLOOKUP will return a #N/A error, and we can use this error to take some other action. The trick is to nest VLOOKUP inside the IFNA function to trap the error like this:

=IFNA(VLOOKUP(C5,wordtable,2,0),other)

where "other" represents a different action. The idea is that words with an irregular plural form need to have an entry in the table. At this point in the formula, we know the word should be plural. If we check the table and can't find the word, we can assume the word does not have an irregular plural form and we can simply add an "s".

Putting it all together

We now have all the pieces we need for a single formula:

  1. Make plural only when number > 1
  2. Handle a regular plural form
  3. Handle an irregular plural form

We now need to assemble these pieces together in a logical flow like this:

If number is greater than one, make the word plural, otherwise, return the original word. When making a word plural, check a custom table first to see if there is an irregular form. If there is an irregular form, use it. If an entry is not found, simply add an "s".

The formula that implements this logic looks like this:

IF(B5>1,IFNA(VLOOKUP(C5,wordtable,2,0),C5&"s"),C5)

The formula that appears in the example performs one additional step: it concatenates the number from column B to the result from the formula above so that the number appears together with the plural form of the noun:

=B5&" "&IF(B5>1,IFNA(VLOOKUP(C5,wordtable,2,0),C5&"s"),C5)

This results in a text string like "3 apples" and it makes it easier to quickly check results.

Note: if a noun has an irregular form but is not listed in the custom table, this formula will incorrectly add an "s". Therefore, all words with an irregular plural form that you want to handle must exist in the custom table. This is a limitation of the formula.

Attachments 
Author 
Dave Bruns

Excel Formula Training

Formulas are the key to getting things done in Excel. In this accelerated training, you'll learn how to use formulas to manipulate text, work with dates and times, lookup values with VLOOKUP and INDEX & MATCH, count and sum with criteria, dynamically rank values, and create dynamic ranges. You'll also learn how to troubleshoot, trace errors, and fix problems. Instant access. See details here.

Download 100+ Important Excel Functions

Get over 100 Excel Functions you should know in one handy PDF.