Hi,
I'm stumped. Am I missing something, or is there a glitch in Excel?
Basically, these two formulas are the same. They just point to different lists, meaning different columns. One points to the LOCATION column. For the other points to the LEAD column. Other than that they are the same.
One works, one does not.
ENTER THE ACCOUNT NUMBER IN CELL E2.
The formulas point to E2 during calculation.
This works: I'll call it the LOCATION formula since it returns a city name
Cell F3:This does not work. I'll call it the LEAD formula since it returns a salesperson's namePlease Login or Register to view this content.
Cell F4:Screenshot 2023-07-13 232206.pngPlease Login or Register to view this content.
Why?
A little background on the formula:
- The formula has 4 parts to it
- X counts the number of instances the account number appears in the list - that is, column A.
- Y executes an INDEX/MODE/MATCH thing to find the most frequent item, be it pointing to the LOCTION or LEAD column. INDEX/MODE/MATCH only works with more than 1 instance. Hence, the COUNTIFS to determine the number of instances of the account number are in column A.
- I found Y at Exceljet
- Z performs a simple XLOOKUP if only one instance is found since XLOOKUP works like that.
- The formula if X>1 then Y else Z allows for flow.
Spreadsheet attached.
Thanks.
Bookmarks