The data type of a value field determines what kind of data can be displayed in the field. Many product attributes have the data type defined already, so you may not even have modify the value field data type.
To set or modify it, however, do the following:
Be sure that the data type matches the outcome of the value field formula. For string operations, for example, the Data type should be set to Text.