A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Change the Fundbud definition so its height uses COUNTA, not COUNT; COUNT excludes text such as AAA.BBBB, which can cause an OFFSET-based name to stop before those entries even though a direct range works.
Correct the named range
- In Excel for Mac, open Formulas → Name Manager.
- Select Fundbud and inspect Refers to.
- If its
OFFSETheight contains something similar to:
replace it with a text-aware definition such as:COUNT(Data!$B$43:$B$200)
Replace=OFFSET(Data!$B$43,0,0,COUNTA(Data!$B$43:$B$1048576),1)Datawith the actual worksheet name. This assumes the Fundbud list begins at B43 and has no blank cells within it. - Keep the lookup formula as:
=MATCH(A127,Fundbud,0)FALSEand0both request an exact match.MATCHsupports text lookup values and returns#N/Aonly when it cannot find the value in the range it was given.^1^
OFFSET returns only the range described by its starting reference, height, and width.^2^ Therefore, if the calculated height counts only numeric cells, the named range can omit text records even though those records are visible in column B.
Prefer a nonvolatile definition
OFFSET is volatile, meaning Excel recalculates it at every recalculation. Microsoft recommends an INDEX-based dynamic range where practical.^3^
For a contiguous list beginning at B43, use:
=Data!$B$43:INDEX(Data!$B:$B,ROW(Data!$B$43)-1+
COUNTA(Data!$B$43:$B$1048576))
Enter that as one line in Fundbud → Refers to. This also assumes there are no internal blanks.
If the name already uses COUNTA
Verify that the name actually includes the problem cell:
- Open Name Manager and select Fundbud.
- Inspect the evaluated range shown in Refers to.
- Confirm that its first and last rows encompass the cell containing
AAA.BBBB. - Check that the definition returns only column B and does not accidentally start in or offset into another column.
Since trimming has already been performed and the direct B43:B200 reference succeeds, repeating the cleanup is unlikely to help unless the text lies inside the evaluated named range and still fails. In that narrower case, compare the lookup value and source cell’s data types; hidden characters and type mismatches are documented causes of #N/A in exact matching.^4^
More maintainable alternative
Convert the source list to an Excel Table and use its structured column reference. Tables automatically expand and contract as rows are added and generally have fewer performance disadvantages than volatile dynamic names.^3^
For example, if the table is named BudgetTable and its column is Fundbud:
=MATCH(A127,BudgetTable[Fundbud],0)
References