This user's frustration is completely understandable, and it exposes a subtle but important truth about how Excel's smart tables handle data. The core issue isn't that CHOOSECOLS is broken or that structured references are unreliable. The problem is that CHOOSECOLS expects a simple list of column index numbers, while a structured reference like `Table1[CategoryD]` returns the *values* from that column, an entire array of data. You are asking the function to use a column of numbers as a position argument, and it simply cannot interpret a range that way. The function is doing exactly what it was designed to do; the mismatch is in how we are phrasing the request.
What does this mean for you in practice? It means you have stumbled onto an important design boundary. Structured references are brilliant for filtering, summing, and looking up data within a table, but they were not built to serve as numeric selectors in functions like CHOOSECOLS or INDEX that rely on positional arguments. The hard-coded numbers work because they are unambiguous integers. The structured references fail because they are data, not coordinates. This is not a bug or a limitation you need to work around with creative syntax; it is a signal that you need to switch your thinking between two different modes of addressing columns.
The fix is straightforward. If you want to keep using structured references for readability, you can pair them with the MATCH function. For example, `=CHOOSECOLS(Table1, MATCH("CategoryD", Table1[#Headers], 0), MATCH("CategoryP", Table1[#Headers], 0))` will return the columns you need, and it will still update automatically if you rename a column header. That approach gives you the flexibility of structured references without fighting the function's design. Alternatively, you can simply stick with the hard-coded numbers and treat them as a deliberate, stable choice for this specific task. Neither approach is wrong, but knowing when to use each one is the difference between a formula that works and one that returns a #VALUE! error.