[Solved] I cant use Item specifier i.e #All and #Headers

%3CLINGO-SUB%20id%3D%22lingo-sub-2997751%22%20slang%3D%22en-US%22%3EI%20cant%20use%20Item%20specifier%20i.e%20%23All%20and%20%23Headers%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2997751%22%20slang%3D%22en-US%22%3E%3CP%3EHello.%20I'm%20learning%20the%20basics%20of%20Excel%20and%20was%20reading%20this%20%3CA%20href%3D%22https%3A%2F%2Fsupport.microsoft.com%2Fen-us%2Foffice%2Fusing-structured-references-with-excel-tables-f5ed2452-2337-4f71-bed3-c8ae6d2b276e%22%20target%3D%22_blank%22%20rel%3D%22noopener%20ugc%20noreferrer%22%3EExcel%20structured%20reference%3C%2FA%3E%3CBR%20%2F%3EThe%20problem%20is%20I%20cant%20replicate%20this%20in%20my%20own%20worksheet.%20I%20have%20named%20the%20table%20and%20typed%20the%20formula%20correctly.%20But%20both%20Tablename%5B%23All%5D%20and%20Tablename%5B%23Headers%5D%20returned%20as%20%23VALUE!%20.%20However%2C%20the%20formula%20worked%20on%20my%20wife's%20laptop.%20My%20version%20is%20Excel%202019%20Professional.%3CBR%20%2F%3EAny%20ideas%20to%20fix%20this%3F%20Thank%20you!%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22ExcelProblem.png%22%20style%3D%22width%3A%20747px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F328913i4944506A3B85D1F5%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22ExcelProblem.png%22%20alt%3D%22ExcelProblem.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2997751%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2997843%22%20slang%3D%22en-US%22%3ERe%3A%20I%20cant%20use%20Item%20specifier%20i.e%20%23All%20and%20%23Headers%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2997843%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1227592%22%20target%3D%22_blank%22%3E%40Mike_Vu_Ngo%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThose%20references%20return%20multiple%20cells.%20Excel%20in%20Microsoft%20365%20and%20Office%202021%20handle%20this%20automatically%2C%20but%20older%20versions%20don't.%3C%2FP%3E%0A%3CP%3EYou%20can%20use%20%3DData%5B%5B%23Headers%5D%2C%5BSales%20Person%5D%5D%20and%20drag%20it%20to%20the%20right.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2997870%22%20slang%3D%22en-US%22%3ERe%3A%20I%20cant%20use%20Item%20specifier%20i.e%20%23All%20and%20%23Headers%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2997870%22%20slang%3D%22en-US%22%3EWhat%20you%20show%20appears%20to%20be%20correct.%20Perhaps%20you%20could%20try%20re-entering%20the%20formulas%20by%20typing%20the%20%22%3D%22%20followed%20by%20selecting%20the%20desired%20region%20with%20the%20mouse.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2999663%22%20slang%3D%22en-US%22%3ERe%3A%20I%20cant%20use%20Item%20specifier%20i.e%20%23All%20and%20%23Headers%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2999663%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F127945%22%20target%3D%22_blank%22%3E%40Hans%20Vogelaar%3C%2FA%3EHello.%20I%20tried%20what%20you%20said%20and%20the%20result%20is...%20interesting.%3CBR%20%2F%3E-%20Data%5B%23Headers%5D%20only%20works%20if%20the%20cell%20I%20entered%20the%20formula%20is%20directly%20on%20the%20same%20column%20of%20the%20header%20i.e%20Sales%20Person%2C%20Sales%20Amount.%20etc...%3CBR%20%2F%3E-%20Data%5B%5B%23Headers%5D%2C%5BSales%20Person%5D%5D%20works%20anywhere%20(only%20return%20the%20headers)%2C%20as%20I%20drag%20right%20it%20shows%20other%20headers%20and%20works%20fine.%3C%2FP%3E%3CP%3E-%20Data%5B%5B%23data%5D%2C%5BSales%20Person%5D%5D%20don't%20work.%20I%20tried%20changing%20the%20name%20of%20table%2C%20can't%20make%20it%20work.%3CBR%20%2F%3E-%20Data%5BSales%20Person%5D%20show%20the%20value%20of%20cell%20of%20the%20same%20row%20and%20under%20the%20Sales%20Person%20header.%20So%20it%20must%20be%20placed%20on%20the%20same%20row%20of%20the%20table%20for%20it%20to%20work.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3EIn%20conclusion%20I%20can%20get%20around%20the%20problem.%20However%2C%20still%20can't%20make%20%5B%23all%5D%2C%5B%23data%5D%2C%5B%23totals%5D%20to%20work.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Mike_Vu_Ngo_0-1637723018617.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F329065iD1E516437069E8E8%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Mike_Vu_Ngo_0-1637723018617.png%22%20alt%3D%22Mike_Vu_Ngo_0-1637723018617.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

Hello. I'm learning the basics of Excel and was reading this Excel structured reference
The problem is I cant replicate this in my own worksheet. I have named the table and typed the formula correctly. But both Tablename[#All] and Tablename[#Headers] returned as #VALUE! . However, the formula worked on my wife's laptop. My version is Excel 2019 Professional.
Any ideas to fix this? Thank you!
ExcelProblem.png

6 Replies

@Mike_Vu_Ngo 

Those references return multiple cells. Excel in Microsoft 365 and Office 2021 handle this automatically, but older versions don't.

You can use =Data[[#Headers],[Sales Person]] and drag it to the right.

What you show appears to be correct. Perhaps you could try re-entering the formulas by typing the "=" followed by selecting the desired region with the mouse.

@Hans VogelaarHello. I tried what you said and the result is... interesting.
- Data[#Headers] only works if the cell I entered the formula is directly on the same column of the header i.e Sales Person, Sales Amount. etc...
- Data[[#Headers],[Sales Person]] works anywhere (only return the headers), as I drag right it shows other headers and works fine.

- Data[[#data],[Sales Person]] don't work. I tried changing the name of table, can't make it work.
- Data[Sales Person] show the value of cell of the same row and under the Sales Person header. So it must be placed on the same row of the table for it to work.

In conclusion I can get around the problem. However, still can't make [#all],[#data],[#totals] to work.

 

Mike_Vu_Ngo_0-1637723018617.png

 

hello Peter. I tried what you said and it doesn't work. You can read my follow up at my reply to Hans.

@Mike_Vu_Ngo 

@Hans Vogelaar has correctly identified your problem; I was simply suggesting a check for possible typing errors.

 

From what you describe, your wife's laptop has Excel 365, which treats arrays correctly.  Traditional spreadsheets (up to and including 2019) intentionally reduce an array reference to a single cell that happens to be in the same row or column as the formula cell; hence the need for 'and fill down' with each copy of the formula returning a single value.

 

I used to use CSE arrays or write the formulas as defined Names to avoid traditional spreadsheet behaviour but practically all other users see the cell-by-cell processing as wonderful in its simplicity.  Oddly, they do not appreciate my describing the result as a 'steaming pile of junk'.

yeah it seems the case. I will mark this as solved. Thank you very much!