'Use property in formula

I've added to my Excel file a new property prop.

picture of my property from the settings

enter image description here

I would now like to use the property in a formula, like =VERKETTEN(""; prop; "").

But this doesn't work :( Is there a way to use those properties in formula?



Solution 1:[1]

You can't directly use the property in a formula, you'd have to use a macro or UDF, and reference the workbook.customdocumentproperties object to get the value.

However, to suggest a slightly different approach, there is a way to link a custom property to a cell in the workbook, meaning that the property will update when that cell is changed. The cell is a normal cell so can also be referenced in formulas.
Whether this is a suitable approach is of course dependent on how and when the custom property is set / changed.

Solution 2:[2]

Why not use a name with a constant value?

enter image description here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Spencer Barnes
Solution 2 Ike