This formula uses spill to repeat previous value when there is a number in column B but no string, like Category, in column A.
The applied range is automatically expanded matching the number of rows in the value column - even if there should be empty cells in it.