The group is a variable that may be changed at any time.
We need to create this as part of the formula.
The easiest way to solve this problem is with theXLOOKUP function.
Both approaches are explained below.
The result is “Jonathan”, which contains 8 characters and is the longest name in group A.
The result is returned directly to the MAX function, which returns 8.
XLOOKUP supports approximate and exact matching, wildcards (* ?)
you’re able to use INDEX to retrieve individual values, or entire rows and columns.
MATCH supports approximate and exact matching, andwildcards(* ?)
MAX ignores empty cells, the logical values TRUE and FALSE, and text values.
LEN will also count characters in numbers, but number formatting is not included.