Formulas & functions
How a function works, with worked examples you can paste.
- Excel: Sort Dates from Oldest to NewestTo sort dates from oldest to newest in Excel for Microsoft 365 on Windows, click a date cell in the list, then…
- Excel: How to Sort Dates by Month Without Mixing YearsTo sort Excel dates by calendar month, add a helper column with the month number, then sort the entire data range by…
- Excel Running Total: Formulas, Tables, and TroubleshootingTo create a running total in Excel, enter your amounts in B2:B7, type =SUM($B$2:B2) in C2, and fill the formula down column…
- Excel: How to Combine Names in Two Columns with a FormulaTo combine names in two Excel columns, enter =A2&" "&B2 in a blank cell on row 2, replacing A2 and B2 with…
- Excel Highlight Duplicates With Unique Colors?Yes—but Excel’s built-in duplicate-highlighting command applies one format to every duplicate, not a different color to each repeated value. To give duplicate…
- Excel GROUPBY With Multiple Criteria: Filter ArraysTo group Excel data while applying multiple row-level criteria, use the filter_array argument in GROUPBY and combine AND tests with multiplication. For…
- Excel GROUPBY: Filter by Multiple Criteria in ExcelIn Excel for Microsoft 365, pass a Boolean filter array to GROUPBY’s seventh argument to include only rows that meet your criteria.…
- Excel Group Dates by Month in a Filter: Steps & FixesTo group dates by month in an Excel filter, make sure the column contains real Excel dates, then open its filter arrow…
- Excel Grade Formula Examples: Scores, Weights and LettersFor a percentage score in B2, use =IF(B2>=90,"A",IF(B2>=80,"B",IF(B2>=70,"C",IF(B2>=60,"D","F")))) to return a letter grade; with 87 in B2, the result is B. This…
- Excel NETWORKDAYS: Count Workdays Between Two DatesTo count working days between two dates in Excel, use NETWORKDAYS. With the start date in A2 and the end date in…
- Excel Formulas to Find Matching Data in Your ListsTo check whether a value appears in another Excel list, use COUNTIF; to return information from the matching row, use XLOOKUP. COUNTIF…
- Excel Formulas for Difference in Numbers: A Practical GuideTo find the difference between two numbers in Excel, subtract the earlier or starting value from the later or ending value: with…
- Excel Formula to Turn a Vertical List Into a Horizontal RowTo turn a vertical list into a horizontal row in Excel for Microsoft 365, enter =TRANSPOSE(A2:A6) in the cell where the row…
- Excel Formula for Weekend vs. Weekday DatesIn Excel, use WEEKDAY to tell a weekend from a weekday: if the date is in A2, =WEEKDAY(A2,2)>5 returns TRUE for Saturday…
- Excel Formula to Subtract Dates From Today: Days and MoreTo find how many days have passed since a date in cell A2, use =TODAY()-A2. To find how many days remain until…
- Excel Formula to Shuffle Names RandomlyTo shuffle names in Excel for Microsoft 365, enter this formula in an empty cell: =SORTBY(A2:A20,RANDARRAY(ROWS(A2:A20))). It returns the names from A2:A20…
- Excel Formula to Check Whether a Value Is in a ListWith list items in A2:A10 and the value to check in D2, use =IF(COUNTIF($A$2:$A$10,D2)>0,"Found","Not found"). COUNTIF checks whether the value occurs in…
- Excel UNIQUE Formula: Return a List Without DuplicatesIn Microsoft 365, Excel 2021, or Excel 2024, use =UNIQUE(A2:A100) to return a list of distinct values from A2:A100. Enter it in…
- Excel Formula to Pull Out Text Between Two CharactersTo pull text out from between two characters in Excel, use MID with FIND. If A2 contains Order [Blue Widget] shipped, this…
- Excel Formula to Randomize a List (With Examples)To randomize a list in Microsoft 365, enter =SORTBY(A2:A20,RANDARRAY(ROWS(A2:A20))) in an empty cell, replacing A2:A20 with your list’s range. Excel spills the…
- Excel Formula to Randomly Select From a ListWith names in A2:A20, use =INDEX(A2:A20,RANDBETWEEN(1,ROWS(A2:A20))) to return one randomly chosen entry. The formula selects a row position from the list and…
- Excel Formula to Pick Randomly From a ListWith a contiguous list in A2:A10, use =INDEX(A2:A10,RANDBETWEEN(1,ROWS(A2:A10))) to return one randomly selected item. The result can change whenever Excel recalculates, and…
- Excel Formula to List All Sheet Names in a WorkbookExcel does not have a standard worksheet function that directly returns every tab name. In Excel for Microsoft 365 on Windows, you…
- Excel Formula to List Only Weekdays in a Date RangeWith actual Excel dates in A2:A100, use =FILTER(A2:A100,IFERROR(WEEKDAY(A2:A100,2)<=5,FALSE),"No weekdays") to return only Monday-to-Friday dates from that list. If you want Excel to…
- Excel Formula to List Unique Values in a Column with UNIQUEIn Microsoft 365 for Windows, use =UNIQUE(A2:A100) to list distinct values from cells A2:A100; Excel spills the results into the cells below.…
- Excel Formula to Highlight Dates Before Today in a RangeIf your dates are in A2:A100, select that range and create a formula-based conditional-formatting rule using =AND(ISNUMBER(A2),A2<TODAY()). Choose a fill color, and…
- Excel Formula to List All Sheet Names in a WorkbookExcel has no built-in worksheet formula that directly returns every sheet name. In Excel for Microsoft 365 on Windows, you can list…
- Excel Formula to Find Duplicate Names in a Name ListTo find duplicate names in Excel, use =COUNTIF($A$2:$A$20,A2)>1 beside a list in A2:A20, then fill the formula down. It returns TRUE for…
- Excel Formula to Find Unique Names in a List With ExamplesIn Microsoft 365 or Excel 2021 and later, enter =UNIQUE(A2:A100) to return each distinct name from the list in A2:A100 once. The…
- Excel Formula to Get a Distinct List (With Examples)In Excel for Microsoft 365, use =UNIQUE(A2:A20) to return a distinct list from the values in A2:A20, with each different value appearing…