With Microsoft 365, you get features as soon as they are released ensuring you’re always working with the latest.Ĭreate, view, edit, and share your spreadsheets using Excel for Mac. Microsoft 365 includes premium Word, Excel, and PowerPoint apps, 1 TB cloud storage in OneDrive, advanced security, and more, all in one convenient subscription. I'm not reimbursed by TechRepublic for my time or expertise, nor do I ask for a fee from readers.This application requires a qualifying Microsoft 365 subscription. When contacting me, be as specific as possible: For instance, "Please troubleshoot my workbook and fix what's wrong" probably won't get a response, but "Can you tell me why this formula isn't returning the expected results?" might. I answer readers' questions when I can, but there's no guarantee. Then, we used an expression to return the number of unique values in the same range. In this case, we used a function and two built-in features to count the number of times a value is repeated in the same range. Within the context of duplicates, definitions aren't the same. If you can't, subtract 1 from the final count, as shown in Figure G.įigure G Refining the expression. If you can delete the header text, this expression works. There's nothing wrong, but there are actually 4 unique values in column B, because the function evaluates the entire column - including the string Species in B1. sort of.įigure F Return the number of unique values in a column.
=SUMPRODUCT((range"")/COUNTIF(range,range&""))įigure F shows this function at work in our example data. When counting unique values, use the following expression: To the best of my knowledge, Excel still doesn't have a built-in function for counting unique values. This solution has been around for a long time, and I can't take credit for it. The traditional method is to use the SUMPRODUCT() function. The flip side of counting duplicates might be to count the number of unique values.
In this case, it also displays an optional grand total for the column ( Figure E).įigure E There's now a subtotaling row below each group. This feature will insert a subtotaling row below each group. In this case, select the Species field and specify the Count function ( Figure D).
Accept all the default values in the resulting dialog - simply click OK.Click the Insert tab and then click PivotTable in the Tables group.Click a Species value (any cell in B2:B5).In this case, you can use a PivotTable, as shown in Figure C.
#HIGHLIGHT DUPLICATE SERIAL NOS IN EXCEL FOR MAC FULL#
The COUNTIF() is adequate, but you might want a list of unique values rather than the full dataset. If you enter one of the values below to the dataset, the function will add it to the count, as shown in Figure B, even if it's not in the actual data range.įigure B The reference evaluates non-contiguous values. It's great if you add and delete records, but it'll also evaluate non-contiguous values. The main problem with this structure is the B:B reference. If we were counting strictly duplicates, we wouldn't include the first occurrence of the value.Īs you can see, the function returns the correct count, and it's a quick fix. We're not counting the number of actual duplicates but rather the number of times the value occurs within the given range. Figure A COUNTIF() counts duplicate species.